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
You need to use another configuration file, where you can set different snapshot_root directory (and other backup params).
For example /etc/rsnapshot.additional.conf
After what you need to add to your rsnapshot cron file (if you use Ubuntu - you can find it /etc/cron.d/rsnapshot).
lines, like this
Which means that rsnapshot will be call two times with different config file and make two backups
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
After running rsnapshot hourly, for example, the snapshots would be stored under
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.