Certain exclusion flags seem to be ignored

What is the problem you are having with rclone?

Certain exclusion flags are being ignored. This flag seems to be ignored:

-exclude "[{JP,KR,HK,CN,RU,PL,AU,GB,FR}]"

What is your rclone version (output from rclone version)

rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 16.04.7 LTS

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync stash: romdrive:Switch --transfers 10 --exclude "[{JP,KR,HK,CN,RU,PL,AU,GB,FR}]" --exclude NSZ/dlc/language-packs/** --exclude NSZ/updates/duplicates/** --exclude NSP/** --exclude Extras/** --exclude XCI/** --exclude CXCI/** --exclude NSZ/demos/** --drive-stop-on-upload-limit --checksum --log-level INFO --log-file /home/plex/logs/sync/stash/stash-${datestr}-sync.txt

The rclone config contents with secrets removed.

[romdrive]
type = drive
client_id = 
client_secret = 
scope = drive
token = 

[stash]
type = drive
client_id = 
client_secret = 
scope = drive
token = 
team_drive = 
root_folder_id = 

A log from the command with the -vv flag

I had to cut this down as my original file was way too big for pastebin. If the full log is needed I will have to figure out another way to send it.

Note that [ and ] mean something in the filter glob language, so you need to escape them.

I suspect you meant this - note the \ to escape the ] and the single quotes so your shell doesn't interpret the \ and the leading and trailing * to match this anywhere in the string.

--exclude '*\[{JP,KR,HK,CN,RU,PL,AU,GB,FR}\]*'

That's what I was missing. Thank you!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.