home

my cheat sheet on rsync

Nasser M. Abbasi, April 26, 2012

When on Linux

When on windows using cygwin

Start cygwin shell. Do not right-click and choose "run as adminstrator" but just click shell so that it runs as same user as me
Now, to backup the folder G:/data to L:/data then the command is
   cd /cygdrive/g
   rsync -apvtr --delete --chmod=ugo=rwX data/ /cygdrive/L/data/
Notice the use of "/" above. Also the use of chmod. If I do not use this, then all the files on L:/data/ will have permissions that does not allow me to read them. The fixes this. Credit for this trick is due to this post