jagexCoder has asked for the wisdom of the Perl Monks concerning the following question:
Hi
We have a server that creates daily backups, I wrote a script that successfully deletes backups that are older than 24 hours.
However sometimes the backups don't succeed therefore a fresh 24hr backup is not available, in which case we use the most recent backup and discard the older ones.
Any ideas on if a backup has not been created in past 24hrs that the most recent backup is kept and the rest are deleted?
All advice appreciated, also the backups are of the style mentioned above hence I wish to use regular expressions to detect all files of that naming style.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Delete all but the most recent backup file
by Kenosis (Priest) on Jan 24, 2013 at 05:54 UTC | |
by jagexCoder (Novice) on Jan 29, 2013 at 04:34 UTC | |
by jagexCoder (Novice) on Jan 27, 2013 at 14:54 UTC | |
by Kenosis (Priest) on Jan 27, 2013 at 23:12 UTC | |
by jagexCoder (Novice) on Jan 28, 2013 at 00:58 UTC | |
by Anonymous Monk on Jan 28, 2013 at 02:29 UTC | |
by soonix (Canon) on Jan 27, 2013 at 20:05 UTC | |
Re: Delete all but the most recent backup file
by vinoth.ree (Monsignor) on Jan 24, 2013 at 06:01 UTC | |
Re: Delete all but the most recent backup file
by kielstirling (Scribe) on Jan 24, 2013 at 04:44 UTC |
Back to
Seekers of Perl Wisdom