-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2013-05-07 at 09:46 -0400, Anton Aylward wrote:
Carlos E. R. said the following on 05/06/2013 10:38 PM:
rsync -rvn --delete /source/ /target | less
Does that tell you what its going to delete?
Yes, but mixed with the thousands of other things it does. And as there is no "--dry-run" above, by the time you notice it may be too late.
Ouch! As in *O*U*C*H*!*!*!
Wait, I was mistaken. The manual says: -n, --dry-run perform a trial run with no changes made so the "n" above in the command line is the dry-run option. I prefer using long options because they are easier to spot what they are, so I did not notice the 'n'.
A week later you do another backup of the same source and same target. Changed and new files will be copied to the destination, but the deleted files... what? They will simply remain in the backup copy.
Oh YES! Isn't that what a 'backup' means? How else might I be able to recover deleted files?
By keeping timestamped copies :-)
Yes, but there is a better way - for backups.
Right. Install a carousel with tape changer and handler and ...
Right. Together with the Ferrari in my parking lot. Yea. :-p
You can have a backup directory for week 1, another for week 2, etc. All of them contain only what was present at the time they were made, no more, no less. Deleted files during the week are in week_1 directory but not in week_2.
Or RCS or Subversion or Git.
Or many more variations.
Another one is "rdiff-backup". The older copies are converted to rdiff files, which are smaller. But more cpu time.
There are scripts that handle this type of backups automatically, like "rsnapshot". But the functionality is that of "--link-dest" in rsync.
Basically:
rsync $OPTIONS --link-dest=$PREVIOUS $SOURCE/ $DESTINATION
Well that isn't a lot of use for the use-cases I have. My use of rsync is across machines or moving a tree to a new partition to free up space.
Ah, yes, of course, rsync can be used for many different things. - -- Cheers, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlGJixwACgkQtTMYHG2NR9VxAQCfYpBvs49lS5horFoa1lWWrTg2 IosAn22UQ0Sp6Zr3ZcGYTdBPXRFWlxDc =4YCu -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org