Microsoft
Software
Hardware
Network
Question : backup file maintenance / cleanup.
Hi.
I have a daily backup which stores file everyday as yyyy-mm-dd.sql.tgz
for example, 2010-07-20.sql.tgz
recently, i looked in and i have 70 gigs of backups at 300mb each. way too many backups.
Is there a feature in Linux which can delete all but the 5 previous days and last day of previous 3 months. I see it does some sort of log maintenance, so did want to have to write something if its already there.
Points to either solution: point me to program that does that, or script that does it.
files i expect to keep using my rules above are
2010-07-20
2010-07-19
2010-07-18
2010-07-17
2010-07-16
2010-06-30
2010-05-31
2010-04-30
because of the different length months i could change my requirements to an earlier day in the month.
Answer : backup file maintenance / cleanup.
find backups -not -name \*-28.* -and -mtime +5 -exec rm {} \;
That should do it
Random Solutions
Javascript to get <TD> inner text in MSIE, FF and Chrome
Out of Office Assistant not working w/Forwarding Configured
How to get lightbox to show over Flash banner?
Strip out ’s in mySQL query | XML Parsing Error: undefined entity
Net Use returns "System error 64 has occurred. The specified network name is no longer available."
How can I dynamically switch web service addresses in .NET without a recompile?
How to run db2 script from control center windows
Adobe - monitor profile [..] appears to be defective. Please rerun your monitor calibration software
OS X Server 10.5 and OS X Laptops Joining accounts to Open Directory?
Email is being received but cannot send out