[Discuss] When you omit rsync '--update' option
Rich Braun
richb at pioneer.ci.net
Thu May 3 02:16:17 EDT 2012
I suffered a data loss yesterday and can't think of any possible recovery
mechanism. Perhaps I haven't thought it through completely; at the very least
I can warn others about the dangers of rsync...
Hindsight: *always* use the --update (or -u) option to rsync. I made the
faulty assumption that older data would not overwrite newer data, by default;
nope. You have to specify this option. I can't fathom *why* it's not the
default, but...nope.
So, once you've done this and seen the program start clobbering your
recently-updated files (in the midst of otherwise doing what I wanted, copying
some other files that weren't yet in my active volume), what recovery methods
(besides proper backups) could be attempted to un-do the nefarious action of
the rsync?
As for my backups: I'd configured the backup for this disk volume a few
months ago but it was silently failing. (Sound familiar?) Hindsight: one or
two days after configuring any new backup, perform a manual test restore;
don't wait a couple months because you *won't* notice the problem until--a
data loss.
In the olden days we had really good versioning filesystems that provided
assurance that unless you were running 99% full all the time, you could revert
to an earlier copy of a file. The Linux 'ext4' filesystem doesn't seem to
have versioning, but maybe it's got some hidden recovery methods that I don't
know about. My file is small, about 15 megs, but represents a lot of manual
effort that I dread repeating.
Suggestions? Commiseration? War stories about data losses you've suffered or
witnessed?
-rich
More information about the Discuss
mailing list