Using rsync to keep a folder sync'd across two computers and a server

22 November, 2016

I use an rsync script to keep my pictures synced between two computers and a cloud host. Here's my method:


rsync -option --options sourcefolder/
rsync -option --options destination/folder/


-v verbose
-t preserve modification time of files
-r recurse
-a both -t and -r combined plus it preserves symlinks
-u skip things that have not been modified in the source
-c use checksum instead of modification date and size
-z compress during transfer (generallt between 1 and 1.2 is my rate for pictures)
-h human readable
--delete remove things from destination that don't exist in source
--progress show copy progress of each file
--rsh=ssh use ssh

As with most of my resused commands, I place them in my .bashrc or my .bash_profile files as follows:

alias'rsync -vauzh --delete --rsh=ssh /Users/myname/Pictures/'
alias'rsync -vauzh --delete --rsh=ssh /Users/myname/Pictures/'