Anyone who runs a blog or other website will sooner or later face the "problem" of needing a backup strategy. There are different approaches conceivable, here I want to present a variant. The following requirements: a vServer with root access (Debian 6.0) is used for hosting, the backup should be independent of the provider. My choice fell on the provider Strongspace.comwhich offers 15 GB of space that can be accessed via SSH and rsync for $3.99 per month. Advantage in the end: no matter which backup program is actually used, the backup is backed up directly on Strongspace.com - without detours in the form of rsync.
First of all we need appropriate backup programs, my choice was backup-manager and automysqlbackup (but others do the same)
~# aptitude install backup-manager automysqlbackup
After the backup itself has been configured (please consult the instructions of the corresponding tools) you now have to realize the data transfer to strongspace.com. Mount the backup storage with sshfs, which uses fuse to mount the remote filesystem. sshfs must be installed first:
~# aptitude install sshfs
To avoid having to enter a password every time, the passwordless login should be configured; a corresponding Instructions can be found at StrongspaceBasically, only your own SSH key has to be stored at Strongspace. First, the connection should be established manually. The backup directory is mounted on a local directory:
~# sshfs [USERNAME]@[USERNAME].strongspace.com:/strongspace/[USERNAME]/[BACKUP_TARGET] /backup
This connects the directory "/backup" to the appropriate directory on Strongspace.com - in the backup tools you can now directly specify this directory, which will create the backup directly on Strongspace.com. Also the rotation of old backups works directly without taking up more space on the server and can be accessed via the Strongspace web interface. This way a backup could be transferred to a new server in case of an emergency or opened independently of a complete restore.
The call of the backup tools should be entered in the crontab at the end - after that the backup runs e.g. once a night. But sshfs has one disadvantage: after a certain time, the SSH connection is usually cut. This can be prevented, however, by setting a keep-alive interval in the SSH config:
~# nano -w ~/.ssh/config
If the file does not exist, simply create it and enter the following:
So everything is set up so far - certainly there may be other approaches, but everyone can come up with a concept on their own. The important thing is: everyone should have a backup, no matter if it is from your own blog or other important data. It doesn't really matter which provider it will be in the end.