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.

A simple question about rsnapshot.

In order to perform daily backups I'm going to add lines to cron in my Ubuntu.

Then, why do I have also these lines in the rsnapshot.conf ?

#########################################
#           BACKUP INTERVALS            #
# Must be unique and in ascending order #
# i.e. hourly, daily, weekly, etc.      #
#########################################

interval        hourly  6
interval        daily   7
interval        weekly  4
#interval       monthly 3

If I use cron, should I disable them ? thanks

ps. I've just realized that in the crontab I still have "hourly" and "daily". Should I then uncomment only the one I use in the crontab ? And what's the point to specify hourly if it is already specified in cron ? I'm a bit confused.

# crontab -e
0 */4 * * * /usr/local/bin/rsnapshot hourly
30 23 * * * /usr/local/bin/rsnapshot daily
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The interval directives in your rsnapshot.conf are saying for the named backup (daily, weekly etc.) keep n copies.

In the above, you are keeping the last 6 copies of your hourly backups, the last 7 copies of your daily backup etc.

You then need to run the hourly, daily. etc backups using cron.

In your example above you are running the hourly backup every 4 hours (6 times a day) and the daily backup once a day at 23:30.

You need to uncomment the interval directives that you intend to use but uncommenting the onee you don't use shouldn't cause a problem.

share|improve this answer
    
So, what's confusing here is just the numerical example, Iguess. Let's say I have "interval hourly 2" and "0 */5 * * * /usr/local/bin/rsnapshot hourly". In this case I perform the hourly backup type every 5 hours and only 2 copies are kept. Is this correct ? –  Patrick Jan 8 '11 at 14:00
1  
@Patrick: Yes, you will be performing 5 hourly backups and keeping the last 2. –  Iain Jan 8 '11 at 14:11
add comment

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.