Michael Hahn wrote:
Duncan Anderson wrote:

As a further refinement, assuming that the amount of data being backed up is a fraction of the size of the CD, one could specify that one is writing to a multiple session CD in TAO mode. This may not work with all cd writers, though.
This way one could have, say, a week's backups on one CD.
(The last session has to fixate the CD, so the cron job on the last day would have to be different.


The backups are going to be about 10 megs tops - it's the attendance and sales data for a small swimschool. In any case, I was hoping to back up at midnight, and then each morning swap out the current CD for one that was used 3 days ago, the current one being put into our new fire safe. That way, even if there was a fire the most we would lose is the current day - we'd have yesterday's backup to work from.

Well, if you put your script in /etc/cron.daily, it will be run at a little after 4:02 in the morning. (The exact time depends on where in the order it falls, and how long the jobs before it take.) But you could change the time in /etc/crontab. Just make sure it is after midnight. Or you can use crontab -e as was first suggested. But the standard time should work fine for the amount of data you are talking about.

Do you want to save the backups past the 3 day rotation, or does the new backup replace the old one? Also, are you planning on using rewritable CDs? For the amount of data you are backing up, I would be tempted to use ether a ZIP drive or a memory card for the backups if you are only interested in keeping them for 3 days.

Thinking about it, you may want to use "date -d yesterday +%F" instead of "date +%F" to generate the date for your backup directory. That way, the date matches the day the data is for, instead of the day it was backed up.

One other thought - you could use memory cards or ZIP disks for the daily backups, but leave the backup directories on the hard drive as well. Then once a month, at the start of the new month, burn last month's backups to a CD, and delete the old month's backups. (A script in /etc/cron.monthly works well for this.)

Mikkel
--

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Reply via email to