So I am using rsync (3.0.7 on MAC OSX) to backup one hard drive to a folder on another one. The is USB drive to USB drive and I have done the initial backup from one drive to a new formatted other drive with the following command:
This all appears to be going smoothly as I type. I am going to write a script to do subsequent backups in the future. What I was to do is make the destination an exact copy of the source. I want to only update things that have changed and to delete files and directories that I have deleted at source and obviously add new ones to the destination that I created since last backup. The code i was proposing was:
rsync -avX --progress /Volumes/Source /Volumes/Destination
I have a couple questions regarding this. Does "--delete" delete directories as well as files? From what I have read I would say it doesn't, however, I don't see a command to do otherwise except maybe "--prune-empty-dirs". I am not sure I fully understand that command. Can anyone help here?
rsync -avX --progress --delete /Volumes/Source /Volumes/Destination
Secondly, "--ignore-existing" do I require this to avoid rsync rewriting everything again?