Jan 282016
 

OK after a few tries on safe directories and files :-

rsync -avz /source/with/trailing/slash/ /destination/with/trailing/slash/

Replicates /source/with/trailing/slash/ to /destination/with/trailing/slash

rsync -avz /with/trailing/slash/ /destination/with/trailing/slash/ however doesn’t delete missing files in /destination that have been removed or altered in /with/trailing/slash/ over subsequent runs at a later date.

rsync -avz --delete --dry-run /with/trailing/slash/ /destination/with/trailing/slash/ > whatwillhappen.txt

Will do a dry run through the source and destination and will list what it will remove on the /destination side and writes to whatwillhappen.txt the files and directories it will delete in /destination.

rsync -avz --delete /with/trailing/slash/ /destination/with/trailing/slash/

Syncs both /source and /destination – Watch and Double-Check your typing before hitting the return key.

 

 Posted by at 11:42 am