--excludes not working?

I've been using rclone for a long time to backup to pcloud. Today, I was playing around with it, and it seems like excludes aren't working for me. I distilled it down to a trivial, entirely local example. I've tried many variations on the source path, like absolute and relative running while in my home directory, and exclude definition, like including a slash in the front. It seems to always wants to copy the file. I hope and fear that I am just doing something stupid! TIA.

What is the problem you are having with rclone?

The exclude option doesn’t appear to be working.

Run the command 'rclone version' and share the full output of the command.

% rclone --version
rclone v1.71.0
- os/version: fedora 42 (64 bit)
- os/kernel: 6.16.9-200.fc42.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.24.6
- go/linking: dynamic
- go/tags: none                                                                                       

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

The example is all local.

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

> /bin/rclone copy ./Dropbox/Mitchell.gpx ~/test --exclude "Dropbox/**" -vvv --dump filters --ignore-case
2025/10/03 12:00:51 NOTICE: Automatically setting -vv as --dump is enabled
--- start filters ---
--- File filter rules ---
- (?i)(^|/)Dropbox/.*$
--- Directory filter rules ---
- (?i)(^|/)Dropbox/.*$
--- end filters ---
2025/10/03 12:00:51 DEBUG : rclone: Version "v1.71.0" starting with parameters ["/bin/rclone" "copy" "./Dropbox/Mitchell.gpx" "/home/reid/test" "--exclude" "Dropbox/**" "-vvv" "--dump" "filters" "--ignore-case"]
2025/10/03 12:00:51 DEBUG : Creating backend with remote "./Dropbox/Mitchell.gpx"
2025/10/03 12:00:51 DEBUG : Using config file from "/home/reid/.config/rclone/rclone.conf"
2025/10/03 12:00:51 DEBUG : fs cache: renaming child cache item "./Dropbox/Mitchell.gpx" to be canonical for parent "/home/reid/Dropbox"
2025/10/03 12:00:51 DEBUG : Creating backend with remote "/home/reid/test"
2025/10/03 12:00:51 DEBUG : Mitchell.gpx: Size and modification time the same (differ by 0s, within tolerance 1ns)
2025/10/03 12:00:51 DEBUG : Mitchell.gpx: Unchanged skipping
2025/10/03 12:00:51 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.0s

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

> rclone config redacted                                                                                               ~12:00PM
[google_drive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
root_folder_id = XXX

[pcloud]
type = pcloud
client_id =
client_secret =
token = XXX
### Double check the config for sensitive info before posting publicly

What are you trying to do and what isn’t working?

I see I messed up the formatting pretty spectacularly there, pardon.

I posted a trivial example, I think. I specified a file in a Dropbox directory right under my home directory. I also specified an exclude of Dropbox, thinking that would filter it out, but it doesn’t seem to do so. I’m not clear why.

I use rclone to sync with my backup on pcloud. I use an exclude-from file for that. That didn’t seem to be working, and I eventually distilled it down to the very simple output I posted above. Basically, I can’t seem to get filtering to work at all.

Don’t worry about sync or copy. Start with ls and provide the structure and what you want to happen.

root@gemini:/mnt/user/data/scripts/rclone# ./rclone tree .
2025/10/03 14:50:18 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
/
├── Dropbox
│   └── one
├── Two
│   └── test.txt
└── rclone

2 directories, 3 files
root@gemini:/mnt/user/data/scripts/rclone# ./rclone ls .
2025/10/03 14:50:37 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
 69161144 rclone
        0 Two/test.txt
        0 Dropbox/one
root@gemini:/mnt/user/data/scripts/rclone# ./rclone ls . --exclude "Dropbox/**" -vv
2025/10/03 14:50:57 DEBUG : rclone: Version "v1.71.1" starting with parameters ["./rclone" "ls" "." "--exclude" "Dropbox/**" "-vv"]
2025/10/03 14:50:57 DEBUG : Creating backend with remote "."
2025/10/03 14:50:57 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2025/10/03 14:50:57 DEBUG : fs cache: renaming cache item "." to be canonical "/mnt/user/data/scripts/rclone"
2025/10/03 14:50:57 DEBUG : Dropbox: Excluded
 69161144 rclone
        0 Two/test.txt
2025/10/03 14:50:57 DEBUG : 4 go routines active

Is that your layout? Something like that?

Something very similar to your layout in a subdirectory of my home directory does indeed work. That’s encouraging. Thanks.

If I do something very similar, doing a “ls .” in my home directory, it also appears to work. Woo! I guess there’s something finicky going on with the specification of my home directory in the first example.

I need to map the trivial examples here back to my larger issue. I think I ended up going down an unhelpful rabbithole. Thank you for your response.

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