Linux – How to backup data from linux servers to linux server (incremental + snapshot)

backuplinux

We have a handful of hosted servers running RHEL4 and RHEL5 and would like to backup some key folders (I'm thinking /var /srv and /etc) to a local server we have in house.

The local server is running Ubuntu 9.10 Server edition.

I'm looking for a free (preferably OSS) way to grab (or push) incremental backups to my local server and once a month or so, make a new snapshot for incremental updates in between snapshots.

Also, while I'm comfortable with using a command line, others may need to use the system in the future, and I would like some kind of graphical or web interface to browse the backup repository.

Suggestions?

Best Answer

rsync is a free tool you can use to securely make copies of files and folders from one computer to another via the network. Once the initial copy is complete, only differences are sent on each future use.

Using rsync by itself will give you a copy of your data but there will be no retention, ie. once a file is changed in the source, when rsync runs again, that file will be changed in the target as well.

In order to get daily/weekly/monthly/yearly retention, you can combine rsync with some simple scripts that copy the target with hard links (so very little extra space is used in the target) before the next rsync executes.

By mounting the target backup location's parent folder read only, general users can browse historic backups and retrieve files without the need for any special graphical or web interface.

Take a look at http://www.mikerubel.org/computers/rsync_snapshots/ for a detailed explanation on how this works.

There is a package called rsnapshot which should make setup easy. In Ubuntu type sudo apt-get install rsnapshot.

rsnapshot details can be found at http://rsnapshot.org/

Related Topic