What will you miss when this site closes?

198 votes ~ 6 comments

This site will turn read-only at the end of September 2017.

XML logo

Double folder backup
Posted by jcdr on Fri 11 Nov 2005 at 15:41
Tags: none.
When you manage a production server you wants to secure with backups two diffrents situations:

1) In case your server is destroyed, you wants the latest backup and tend to backup very often;

2) In case your server is corrupted, you wants to recover the latest know good state and this is maybe not the last backup, mainly because you discover the problem while reading the backup log!

To solve this problem I use the batch option of rsync to create a "double folder" backup.

The first folder is a keep up to date by making a rsync very often. At each rsync with the first folder I also create an batch file using the "--write-batch" option of rsync.

The second folder is keep up to date only after I have review the log of the backups into the first folder. If nothing is suspect, then I use the batch files to make the second folder the same as the first one. To verify that this is the case, I make a "nothing" rsync with the "-n" option between the two folders. The result must be no transfert at all.

Of cource this methode use two times the disk space, but disk are cheap this day, far more than the time lost in case of a filesystem problem into a production server... This make also possible to automaticaly backup all the time the server and review the log when you have time to do so. In case something happens, you can restors the latest good state into the second folder by using the rsync batch files.

I also use the "--bwlimit" option to let the backup running all the times without disturbs normal operations.