On Thursday 17 June 2004 08:54 am, Stephen Kuhn wrote:
> On Thu, 2004-06-17 at 23:40, Sergio fernandez wrote:
> > I am no expert but I think Dantz Retrospect might be able to help you.
> > Their web site is http://www.dantz.com/ but they charge for the product
>
> Nah - I'm just looking for a script - there's a script that lives on the
> box already - simple - like mine - I might just go so far as to modify
> the existing script so that it burns to CD for the moment - but I'd like
> to delete any "redundant" backup kept on the drive that exceeds four
> weeks...just didn't want to take the time away from my customers (and my
> making money) to fsck with delving into shell scripting any further than
> I really have to. Got bills to pay and food to buy.
What type of script is it currently using for the backups? Perl? Bash? Either
way, here's a simple one liner you can use to remove backups older than 30
days in a given directory:
find /backups -daystart -mtime 30 -type f -maxdepth 1 -name "Backup*.tar.gz"
-exec rm -f {} \;
You'll want to put the directory in that it'll search, and change the name to
fit. You can also change the number of days to keep as well. This is a simple
yet effective way to remove the older backups. Read up on the find command
for more control options.
--
Take care,
Randall Hobbs
Programmer - System Administrator - Chip Castle Dot Com, Inc.
Web Hosting * Programming * Software
http://www.chipcastle.com
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________