Disk Space Issues

HMTKSteve

Verified User
Joined
Jan 18, 2009
Messages
78
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.
 
Last edited:
I use this in cron.daily to hold one week of system backup:
Code:
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!
 
Back
Top