- --update / -u # if file exists, overwrite only if fromfile is newer than tofile
- --archive / -a
- --partial --progress / -P # update with deltas, show progress. can be combined as
-P
- --compress / -z
- --exclude '.Trash*' # don't copy these files. Use multiple times if needed.
- --delete # delete anything on the remote that doesn't exist locally
- --delete-excluded # delete anything that is specified with --exclude
- --backup # make backups of anything overwritten
- --backup-dir ~/.rsync-backups # ...and put them here
These are kinda obsessive
- --acls
- --hard-links
- --rsync-path=/usr/local/bin/rsync
- --exclude 'Library'
- --exclude '.serverauth*'
- --exclude 'Google Drive'
- --exclude 'VirtualBox VMs'
example:
rsync -uaPz --exclude '.Trash*' --delete --delete-excluded --backup \
--backup-dir ~/.rsync-backups ~/Box Sync/ ~/box-backup