You are not logged in.

#1 2023-03-09 15:54:56

Registered: 2014-11-01
Posts: 7

rsync - Update in case of changed size or newer date


I want to use rsync for a backup on a cloud storage via webdav. In this case the rsync -a option cannot be used, because the modification date of the file on the webdav has the date of the backup and not the date of the original file. So each time all files would be uploaded.

I want to upload the files if:
- the size is changed
- the local date is newer than the date of the backup.

For this I currently run rsync twice:
1st run: rsync -- size-only, to backup in case the size is changed
2nd run: rsync -u, to backup in case the time is newer then the date of the backup

Is there a possibility to reach the same with one run? I think, if I combine both options, i.e. rsync -u --size-only, this would mean that the file is only uploaded in case the size is changed AND the time is newer. But I want to reach a OR and not a AND of both conditions.



Board footer

Powered by FluxBB