Re: RSYNC Question
From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 14 Sep 2005 19:56:38 GMT
>I appreciate everyones comments. As for the person who said "read the
>manpage". So, you are tellnig me that you have always understood and
>never needed advice when reading some documentation? It is quite
>possible that I just did not grasp the contents, and would like a bit
>of help. That is what these groups are here for........
>So, basically I want to run this rsync daily, and remove whatever is on
>/mnt/newroot/newcopy before the actualy copy takes place. I assume
>that is what the --delete is for..........
No. delete removes all files which are NOT on the source. Thus if you had
yesterday a file called /donaldduck and you erased it, then with --delete
that file will be erased from the backup today. However if you added
something to the file donaldduck then rsync will determine what was added
(by use of hashing subsections of the file) and only transfer the changes.
IE, DO NOT erase /mnt/newroot/newcopy. Use rsync and it will make the
update far far more efficiently than simply copying over everything.
Note-- it is actually a bad idea to use --delete for backups. One of the
key uses of backups is when you erase donaldduck and then a day later
remember it contained the complete list of all of your passwords, ones you
do not remember. without --delete, rsync would not have taken it out of the
backup. With --delete, you are screwed.
Of course this means the backup grows, so every once in while it is a good
idea to use --delete once you are damn sure that there are no deleted
files you really wanted to keep.