PDA

View Full Version : Disk Space Issues



HMTKSteve
05-14-2009, 06:12 PM
I added a 500GB drive to my server three months ago and it is now near 79% capacity.

The disk usage from my "show all users' section is less than 10GB total.

I found my problem and it is related to the weekly system backup I run. (I do nightly domain level backups as well).

Is there any way to set the backup routine to only hold four weeks worth of backups? The process creates directory names based on date so a basic script would have to take that into account.

tillo
05-15-2009, 02:52 AM
I use this in cron.daily to hold one week of system backup:


find /path/to/system/backup -maxdepth 1 -ctime +6 -exec rm -rf {} \;

Just change "6" to the number of days minus one. To hold four weeks it would be 27.

Make sure the path is correct!