The Idea


The basic idea here is to have some sort of backup solution. Incremental backup, preferably fast and secure without too much hazzle (NO nfs, NO Samba etc).

The Howto


1: Create a public/private key on your backup server
2: Copy the public key to ~/.ssh/known_hosts on the server(s) you are going to backup. Verify that you can login passwordless from backup server to target.
3: Setup local director, for example /backups/servername
4: Verify that your RSYNC uses "ssh" as shell
5: Run rsync. I use the following command

rsync -az --delete root@1.2.3.4:/etc /backups/servername/latest
This creates a copy of "/etc" on target in the "latest" dir on the backup server. Now you can run more paths, like :/home etc, all will be placed in "latest"
6: Finally, make backups of your latest folder from time to time
tar czf /backups/servername/`date --iso-8601`-servername.tar.gz /backups/servername/latest

A few notes:


  • You could very well combine this with my ssh2 howto to scrap openssh alltogether. Since many (all) distros comes with openssh it can be painful to replace though.
  • Back to index