We have had a few customers who have much more data to back up, and taking a copy of that every day uses a LOT of disk space and can be time consuming. The answer is rdiff-backup . It does incremental backups whenever you run it, only backing up the difference from the initial complete backup. This saves you, and us, a lot of cost in disk and backup space.
Since we have enabled sftp on backupspace.rimuhosting.com you can now use rdiff-backup. The problem being that you can't send it directly to the server because of the limited commands, however you can mount it using sshfs (aka sshmnt ) and then do an rdiff-backup to it.
With this in mind, I have written a script which will automatically do this. Its tested and going on debian/ubuntu and Centos.
Steps to get this going
mknod /dev/fuse -m 0666 c 10 229
ssh username@backupspace.rimuhosting.com "mkdir .ssh/;chmod 700 .ssh"
scp .ssh/id_rsa.pub username@backupspace.rimuhosting.com:.ssh/authorized_keys
chmod +x backup.sh
(or whatever you named it)Things to note: First time will take a while to sync things. Pays to test with a smaller dir of files. If you have any errors at all, have a look at the code and uncomment some of the debugging to check what its doing. If you get really stuck just drop an email into support and let us know.
To restore or list what backups you have, mount backup space
sshmnt username@backupspace.rimuhosting.com /mnt/
List the backups
rdiff-backup -l /mnt/vpsname
Restore from the backups
rdiff-backup -r now /mnt/file /local/file #you can set up a new vps using current backups
rdiff-backup -r 10D /mnt /tmp/file # 10 day old backups etc
rdiff-backup -r /mnt/hostname/rdiff-backup-data/increments/file.2003-03-05T12:21:41-07:00.diff.gz /local/file
Notes:
debian/ubuntu:
apt-get install sshfs rdiff-backup
Centos:
You will need to enable the DAG/rpmforge repos
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum update
yum install sshfs rdiff-backup
OR download the rpms manually from http://dag.wieers.com/rpm/packages/rdiff-backup/ & http://dag.wieers.com/rpm/packages/fuse-sshfs/