View Full Version : Full System Backup auto delete older backups
fishyghost
10-29-2006, 03:36 AM
If the Full System Backup system could delete older backups, say ones older than the last two or three made it would make life easier... At the moment we have to clear out our backups folder regularly otherwise the system will fill itself up with backups.....
Try my script, put it in cron daily, change the $backup to your backup folder and $days as you like
Download here
http://www.directadmin.com/forum/showthread.php?s=&threadid=15594
chatwizrd
10-29-2006, 03:21 PM
Nice.
chrisn
02-20-2008, 11:19 AM
If you can't get that one to work (I couldn't), here's mine:
Create a crontab with this code (probably need to be root):
find /backup -mtime +7 -type d -depth -exec rm -r {} \;
where "/backup" is the directory the backups are in and "7" is the number of days to keep the backups before they're deleted.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.