Results 1 to 5 of 5
  1. #1
    Join Date
    May 2001

    Rsync -> restore?


    I know Rsync and backing up has been discussed many times before on these boards, and seems like a good way to keep backups of servers, however I have a couple of questions that I have not seen answered on these boards...

    First, say you have a backup server that is fully synched with your main server using Rsync. Your main server fails, how would you go about restoring this server?

    I am thinking of having a central backup server that will backup multiple machines using Rsync. If a server fails, I would like to be able to do a clean OS restore and then Rsync all of the files back. A fully loaded server would have roughly 30GB of data on it. Assuming a full 100Mbps ethernet link, it would take ~40 mins to get the information back (which is acceptable to me for a major failure).

    How hard is it going to be to implement this using Rsync?

  2. #2
    Personally, I would rather rebuild the server by hand (tar files and ftp), so I know whats going on.

    But with a little thinking and planning, I don't think it would be hard at all to implement.

  3. #3
    Join Date
    May 2001
    Houston, TX
    We actually have the same setup for our servers. The necessary data is backed up to the remote machine every night (use the --delete option for rsync to keep your backups up to date and be sure to use ssh) and then snapshots (cp -al) are taken each week and kept for weekly reserves. It may also be a good idea to have a restore script setup in the event you have to restore the backups.

    <edit>I've seen too many corrupt tar files to be able to recommend that and ftp probably isn't the best way to transfer data securely</edit>

  4. #4
    Corrupt tar files? Can you elaborate on the circumstances, or do they just happen out of the blue?

    I've run across plenty of corrupt gzipped files, but never a tar file.

    I'm just curious because I tar up most everything and depend those files as my backups for one server in particular.

  5. #5

    Re: Rsync -> restore?

    Originally posted by mpope
    If a server fails, I would like to be able to do a clean OS restore and then Rsync all of the files back.

    How hard is it going to be to implement this using Rsync?
    I'm doing something very similar for my backups, and it's not very hard at all. I'd like to share two things I've learned through painful experience with rsync backups:

    1. Make sure you keep a compiled version of rsync that will work on the "clean OS restored" machine (and that is compatible with the one you run on the backup machine). You don't want to waste time finding or compiling one when BAD THINGS have happened.

    2. Carefully investigate and document the rsync options needed when performing the restore from backup. You can screw up the system royally if device files are restored incorrectly, for example. (The same certainly applies for other restore procedures, but it's easier to forget about such details when you are using something new.)

    The above points may seem obvious now, but I managed to make both mistakes when I needed to restore the first time. Second time around everything worked just fine and it was much easier and faster than with my previous (tar files and FTP) backups.

    Good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts