How to combine exclude and max-size rules?

What is the problem you are having with rclone?

I would need to know how to combine --exclude and --max-size rules. I need to exclude *.ova, *.zip and *.iso files that are bigger than 5GB from synchronization. I am able to exclude the mentioned file extensions or I can sync only file smaller than 5GB. But how to combine the two conditions together? I went throught this manual but I could not find it there. Rclone Filtering

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

1.50.2

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

I sync from Google Drive to CIFS storage

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

This is my cron command to start syncing
13 18 * * * rclone sync Templates: /media/backdrive2/Templates/Full --backup-dir=/media/backdrive2/Templates/Incr/date +\%Y\%m\%d.\%H\%M\%S

The rclone config contents with secrets removed.

[Templates
type = drive
client_id = xxxxxxxxxxx
client_secret = xxxxxxxx
scope = drive.only
token = xxxxxxxxxxxxxx
Team_drive = xxxxxxxxxxxxx

A log from the command with the -vv flag

This isn't possible at the moment - --max-size applies to all the included files.

You could do this with two syncs - the first one would exclude everything except *.ova, *.zip and *.iso and have no --max-size and the second would include only *.ova, *.zip and *.iso and have the max size limit as well.

Hello Nick

Thank you. I think I can manage this

1 Like

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