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
freeware to modify Physical MAC address of a Win XP PC
The trust relationship between this workstation and the primary domain failed
RAID 10 array keeps failing on HP P410i
Guest Wireless Network
EASY VPN CISCO
migrate drupal from CentOS 4 to Centos 5 -----Also, Physical Machine to Virtual Machine
RHEL command to do an LS and have the result stop until you hit the space bar
How to Open a Console Session (xterm)
What is the best GUI for MySQLfor Windows and why?
asp.net: How to bind Images to a ListView from a Database - I have a special need! the Image have already be downloaded