Linux – How to make rsnapshot backups in different locations

backuplinuxrsnapshotUbuntu

I have backup server that gathers backups from few other servers. I want to make directory structure like this

/backup/snapshots/<hostname>/<period>.0/<files>

Instead of default

/backup/snapshots/<period>.0/<hostname>/<files>

How to do this? I tried to specify parameter

backup  root@remote-host:/backup/snapshots/hourly.0        .       snapshot_root=/backup/snapshots/myhost/

but it doesn't work

Best Answer

As far as I can tell, rsnapshots only configuration for this is the "snapshot_root" directive.

Man page: "snapshot_root Local filesystem path to save all snapshots"

These are a few examples from: https://askubuntu.com/questions/20603/what-does-snapshot-root-do

snapshot_root /var/backups/me

...

backup /home/me/movies/ /media/
backup /home/me/music/ /media/
backup /home/me/drafts/ /documents/

After running rsnapshot hourly, for example, the snapshots would be stored under

/var/backups/me/hourly.0/media
/var/backups/me/hourly.0/documents

So, pretty much what I'm saying is that I belive there's no easy way of changing that, and that you might need to change the source for this, but of course I can be wrong and if that's the case, please ignore this answer.