Effective backups or mirroring with rsync

RSYNC it’s a fast incremental file transfer protocol developed by Samba. It’s very smart – for example if you modify one byte in a 600mb ISO file rsync will know and will update the file by transferring only few bytes between the source and the destination.

It’s reliable? Shortly yes. As an example: all Linux package distribution is made by mirroring with rsync.

If you are a Windows guy, you should know that you could use cwRsync

About backups

An another very useful function of rsync is to make backups using rsnapshot – a simple perl for making backups of local and remote system. It does use rsync and the biggest advantage of using it is that you can mirror daily your entire OS installation by minimizing the disk usage. If you wonder how it does this: it does this by creating hardlinks between unchanged files between backups. By the way, configuring rsnapshot is very easy – only one line to add in the configuration file: “backup source destination” – where source and destination can be local paths or rsync shares.

How to setup a simple, safe and cheap backup system using rsync

  1. Find a cheap spare machine that is going to do nothing else than backups. Nobody else than the sysop must have access to it.
  2. Add a big harddrive to it – speed is not important. You’ll need around twice the size of one snapshot for maintaining a history of backup of 6 months IF your are going to use rsnapshot.

How is this possible? Rsnapshot does initially mirror your harddrive but for the additional snapshots it will create hardlinks to existing files so the space increase between two snapshots is minimal.

Other remarks

  • There is no archival process involved so you don’t need to assign CPU time
  • Network transfer is big only at first snapshot.
  • Remember to create the RSYNC share on the machines you want to backup from and put rsnapshot on the backup server. This is important because if someone breaks one of the machines it will not be able to remove the backups.
  • You’ll be able to put back online any of your machines very easy
  • You may be able to run diff tools in case you need to see the changes between two snapshots.
Monday, July 7th, 2008 software

No comments yet.

Leave a comment

Notice

Recently I moved all my articles related to internationalization to blog.i18n.ro

Language