On Thu, 2010-07-29 at 19:41 -0500, Rahul Nabar wrote:
> I used to maintain "mirror" backups of the /home dir on our
> production_server using rsync to a backup_server.
> 
> The primary server had a rsyncd daemon running and the backup_server
> had this line in the crontab:
> 
> 10 01 * * * rsync -av  --delete r...@production_server::home
> /production_server_home_bkup
> 
> Things worked fine and whenever we tested backup_server it always had
> a faithful image of the production_server. Unfortunately, one day the
> RAID array on primary_server had a failure. As a result /home mount
> was lost temporarily. This happened over the weekend and by the time
> we got around to checking, the backup_server had a chance to run its
> cron job. This job merrily erased every file on the backup since it
> thought /home was now supposed to be empty when it synced the two.

If you can arrange for the source directory to appear nonexistent rather
than empty in the event of a disk failure, rsync would exit with code 23
instead of cleaning out the destination.  One hacky way to do that would
be to put a symlink "me -> ." in the source directory and specify the
source as r...@production_server::home/me/ .

-- 
Matt

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to