Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Delete all but the most recent backup file

by jagexCoder (Novice)
on Jan 28, 2013 at 00:58 UTC ( #1015602=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Delete all but the most recent backup file
in thread Delete all but the most recent backup file

Hi thanks, that works great! I modified the regular expression to the file naming format that we use at work. I just noticed that the system of sorting and preserving the latest backup and deleting the rest is the most efficient - my supervisor and dad (he's a programmer) said the same thing. I don't know why I stuck with the idea of using flags, I guess it's the little mistakes the not-that-experienced programmers make. This is a good learning experience! I'll figure out the syntax related to sorting that has been implemented and understand it fully. Thanks again to both of you - take care!


Comment on Re^4: Delete all but the most recent backup file
Re^5: Delete all but the most recent backup file
by Anonymous Monk on Jan 28, 2013 at 02:29 UTC

    Here is an alternative idea

    Archive the backups for a month before deleting them (like zip/7-zip)

    Since the files are nearly identical, it should compress really well, so in the same space you have of 24hrs of backups you can have ~20 days of backups (one zip per day), and if you combine those zip/day backups into a single archive, you'll have space for more days :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2015-07-03 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls