I want to use rsnapshot for remote backups of my websites.
It is not clear this line in rsnapshot.conf:
snapshot_root /.snapshots/
In the documentation, it says snapshots are stored in this directory, but I actually want them to be stored on a remote server and this is specified later with the line
backup local_folder remote_server
so what's snapshot_root then ?
snapshot_root
is the root for the paths you specify underbackup
.For example:
After running
rsnapshot hourly
, for example, the snapshots would be stored underThe snapshot target must be a local filesystem (although the source can be remote).
I think the simplest option is to put the rsnapshot service on the remote server, and let it copy from your webserver. Using ssh, it would look something like
You would need to have the ssh daemon running on the "example.com" box, and configured so that the user (here "me") can ssh into "example.com" without being asked for a password.
See the rsnapshot HOWTO (section 4.3.8 Backup) for more details.
I had the same issue... and discovered that if I locally mount a folder from the remote system, then rsnapshot will allow me to set the "snapshot_root" configuration parameter to point to it.
This then allows me to store my snapshots and my backup on the same remote server.
eg.
Mount a folder from the remote system
mount 192.168.0.2:/volume1/Backup /mnt/Backup
Set the "snapshot_root" configuration parameter to point the mounted folder
snapshot_root /mnt/Backup/rsnapshot/
Set a rsnapshot backup point to backup a local folder remotely
backup /home/backup-source [email protected]:/volume1/Backup/backup-target/ rsync_short_args=-trvsz
Note: Although I could have simply designated the mounted remote folder instead as a backup destination, (see below), this would not have enabled me to utilise the Rsync server running on the remote target, (in this case a Synology NAS). I used shared keys to allow rsnapshot to access the remote backup target without a password
backup /home/backup-source /mnt/Backup/backup-target/ rsync_short_args=-trvsz