Cloud Sync Exclude Help

warllo

Contributor
Joined
Nov 22, 2012
Messages
117
Hi all,

I am trying to exclude some logs from a cloud sync but I'm unable to get the exclude filter to work. I am trying to exclude the next-cloud logs nextcloud.log, nextcloud.log.1 and nextcloud.log2. I have tried --exclude=mnt/DataVol1/Cloud/*.log and simply mnt/DataVol1/Cloud/*.log but neither seem to work. Hoping someone might have a suggestion.

1634048333500.png


1634048443618.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
--exclude=mnt/DataVol1/Cloud/*.log
mnt/DataVol1/Cloud/*.log
Seems to me that you would want to use a path that exists, like:
--exclude=/mnt/DataVol1/Cloud/*.log

Note that /mnt is a directory that exists, but mnt may not be (depending on where your software is working).
 

warllo

Contributor
Joined
Nov 22, 2012
Messages
117
I tried --exclude=/mnt/DataVol1/Cloud/*.log as suggested as well as dropping the /mnt but it still grabs the log files. It's very strange because I'm quite certain --exclude=/mnt/DataVol1/Cloud/*.log should work
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so I wasn't looking at the help text... you're already in an exclude field there, so just the /mnt/DataVol1/Cloud/*.log should be enough. (although you really only need **.log unless you particularly want logs out of other subdirectories).

You need to read this https://rclone.org/filtering/ to make sure you'll get what you're expecting.
 

warllo

Contributor
Joined
Nov 22, 2012
Messages
117
The **.log worked great, and for my purposes will be sufficient. Oddly, even though the linked documentation shows that /mnt/DataVol1/Cloud/*.log should work, the logs were still grabbed for sync.

Thank you very much for your insight and I'll consider this resolved.

Side note it's crazy those logs are 750+ MB each.
 
Top