Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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: http://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.

share|improve this answer

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).

30 3    * * *       root    /usr/bin/rsnapshot daily
10 0  3    * * 1       root    /usr/bin/rsnapshot weekly
11 30 2    1 * *       root    /usr/bin/rsnapshot monthly

lines, like this

30 3    * * *       root    /usr/bin/rsnapshot -c /etc/rsnapshot.additional.conf daily
10 0  3    * * 1       root    /usr/bin/rsnapshot -c /etc/rsnapshot.additional.conf weekly
11 30 2    1 * *       root    /usr/bin/rsnapshot -c /etc/rsnapshot.additional.conf monthly

Which means that rsnapshot will be call two times with different config file and make two backups

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.