rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Safe to mirror backup dir with rsync?


From: Steven Willoughby
Subject: Re: [rdiff-backup-users] Safe to mirror backup dir with rsync?
Date: Wed, 23 Dec 2009 19:39:05 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 12/23/2009 05:55 PM, Engel Sanchez wrote:
Hi Alex. My understanding could be wrong, but this is the scenario that I'm 
trying to avoid:

1) Machine 1 has the original data and backs it up locally to /backup
2) Machine 2 rsyncs /backup to local /backup every day
3) Machine 2 is rsyncing /backup, and right then machine 1 dies for good (fire, 
flood, apocalypse)

At that point in time, machine 1 is dead and /backup in machine 2 is not a 
valid rdiff-backup directory, so you can't restore your data from it anymore.  
If Machine 2 was instead using rdiff-backup on the original sources, /backup 
would have an incomplete backup, but previous data would not be lost, so you 
can restore from it even if it was interrupted.

Use rsync's --delay-updates. That will narrow the window of failure significantly.

If that's not enough, create a temporary hard-linked copy of /backup on machine 2:

set -e

cp -al /backup /backup.new
rsync -a --del machine1:/backup/ /backup.new/
mv /backup /backup.old
mv /backup.new /backup
rm -r /backup.old

Steven




reply via email to

[Prev in Thread] Current Thread [Next in Thread]