On Thu, May 28, 2009 at 11:32:16AM -0400, Matt McCutchen wrote:
> - Each day, generate a reverse batch (by running rsync in the reverse
> direction with --only-write-batch) and then update the destination file.

In order to avoid any inconsistency between the files when the reverse
run is done and when the backup copy is done, you could use a second
full backup copy (though someone using something like LVM could use
snapshots instead).

To be explicit, a two-dir method would start by duplicating the backup
dir (let's assume to a separate host, though it would also work without
"bhost:" in all these commands):

    rsync -av /backup/ bhost:/backup2/

Then a backup operation would be:

    rsync -av srchost:/src/ /backup/
    rsync -av --only-write-batch=/batches/$DATE bhost:/backup2/ /backup/
    rsync -av /backup/ bhost:/backup2/

That results in the daily double-backup dirs and a batch that lets you
get back to the prior day's files.

A restore operation would require running a sequence of batch files into
the /backup/ dir (without any backups running):

    rsync -av --read-batch=/batches/$DATE1 /backup/
    rsync -av --read-batch=/batches/$DATE2 /backup/
    ...

Then, after restoring the file(s), revert /backup to the most recent
backup data:

    rsync -av bhost:/backup2/ /backup/

..wayne..
-- 
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