Stephen Kuhn wrote:
I've got a client that just "introduced" me to his RH8 linux server -
nicely done, very simple, but the orginal "admin" had setup a backup
script that backed up stuff weekley TO THE HARD DRIVE - until they had
no hard drive space at all (gee, Ralph, that was smart, eh?)

Anyways, what I'd like to do is to create a backup to CDRW weekly, and
keep four weeks worth of backups on the drive - NOTHING MORE. Previously
I've done a very simple script for other customers, but nothing that
required "date" or keeping redundant copies and deleting what would be
the "fifth" week so that only four are on the HD, one on the CD...

(sniffles, gives puppy dog look)

I'm not a coder, I build boxes, administer boxes and setup
networks...and I'm far from being a bash script
master...laugh...yeah...that's cool...but I do need to figure this out
as I've tried and well, it keeps screwing me up...

HELP!

stephen kuhn - proprietor

I know there is a package to backup to CD - you can try looking on freshmeat for it. As far as getting rid of old backups, if you use the date command to date stamp your backup as part of the name, then the same cron job that creates the backups can get rid of the old ones.

Something like BNAME=$(date +backup.%d.%m.%y) to genetate the name, and then somethig like ONAME=$(date -d-5week +backup.%d.%m.%y) to generate the name of the backup to remove.

Or if you were realy creative, you could probably modify logrotate to manage your backups...

Mikkel
--

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


____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to