Gossamer Forum
Home : Products : Links 2.0 : Customization :

Automate killing old db backups?

Quote Reply
Automate killing old db backups?
Hi, I just deleted 50mb worth of backups after wondering for a while where all my space was going Blush

Does anyone have the location or whereabouts of any mods to automate killing old backups?

I've tried searching but I cant seem to find anything here.

Thanks.
Quote Reply
Re: [roman365] Automate killing old db backups? In reply to
Quick solution.......

In admin_html.pl in the sub that generates the admin navigation frame add a new option "Delete Backups"

Link it to a new subroutine which is defined in admin.cgi but added to admin_html.pl

The sub would be _something_ like:

sub delete_backups {

opendir DIR, "$db_script_path/backup" or &cgierr($!);
@delete = readdir(DIR);
closedir DIR;

unlink("$db_script_path/backup/$_") foreach @delete;

}
Quote Reply
Re: [RedRum] Automate killing old db backups? In reply to
Thanks, sounds good. Could that be integrated with nph-build in some way as I use cron to automate rebuilds?

Is there any way such a thing could be simply done leaving x recent number of builds backups. I have cron rebuilding once a day, so say 5 days worth of backups or something?
Quote Reply
Re: [roman365] Automate killing old db backups? In reply to
here's some more info
http://www.gossamer-threads.com/...gi?post=39475;#39475
it was a backup program by widgetz. I used it before, and it worked great. I didn't use it in nph-build.cgi but it could be easy to add.
Lavon Russell
LookHard Mods
lavon@lh.links247.net
Quote Reply
Re: [Bmxer] Automate killing old db backups? In reply to
Ta, I'll take a look.
Quote Reply
Re: [roman365] Automate killing old db backups? In reply to
Superb, works perfectly!

No more wondering where all my space is going to and having to remember to kill backups manually!

Now I have 50 megs more space to play with SmileSmile