Need help understanding rclone message when using --dry-run

Trying to setup a backup and need to exclude specific directory. When using --dry-run I getting message that at least to me is little confusing. The command I am using is:

rclone --exclude=/mnt/RAID5/Backups/Images/ --dry-run sync /mnt/RAID5/Backups/ google:/Backups

When I execute the command I get messages for every file including those in the exclude path, with the text “Not copying as --dry-run”

So does this mean that file is not copied, because of the --dry-run option and rclone does not understand/ignoring the --exclude filter?

or

Rclone it will not copy the file because of the exclude filter?

You probably want

 --exclude='/mnt/RAID5/Backups/Images/**'

To exclude all the files within the Images directory

That did not help…

Sorry. - I didn’t think that through properly Firstly the exclude needs to be relative to the root of the sync, and secondly you need the /**, so try this

rclone --exclude='/Images/**' --dry-run sync  /mnt/RAID5/Backups/ google:/Backups

Thanks that fixed it. Don’t quite understand why that would make a difference, guess I need to do little reading…

1 Like