[Discuss] When you omit rsync '--update' option
Richard Pieri
richard.pieri at gmail.com
Thu May 3 16:28:09 EDT 2012
On 5/3/2012 2:16 AM, Rich Braun wrote:
> 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.
Because rsync is a copy utility. It copies files from source to target.
Suggesting that -u be the default rsync behavior is akin to suggesting
that -n be the default cp behavior.
> 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.
Foresight: have your backup system log everything and notify you of
what's going on. Especially important is notification of completions.
That way you know something isn't right when you don't receive an
expected notice.
I have never had rsync unintentionally clobber data. I myself have
mistakenly done so using rsync but that was my fault. I swapped my
source and target.
Sync is not a substitute for a good backup policy. Sync can be used to
stage backups. rsnapshot is one way to do it. I use Unison to keep
several computers in sync using my file server as a hub, and I use ZFS
snapshot replication (send/receive) to perform backups of that.
--
Rich P.
More information about the Discuss
mailing list