Eliminating log backups (.gz)
I'm running very low on server storage, so I'm trying to eliminate anything that's not necessary.
I vaguely remember setting something up a long time ago to link /home/user/logs to show log file backups for the account, but I can't think of any time that's ever been used. The times that I do need to look at a log file, I look at same-day or maybe 1 day ago... never a month ago.
I'm not sure if this is a real directory or an alias, but the backups aren't needed at all. Is there a way to eliminate these /home/user/logs directories and prevent the backups from being created at all?
-
Hi @GoWilkes, A great tool to see where disk space is being used is ncdu You could null the error_logs but obviously you wouldn't have log information to refer to debug website issues. Multiple copies of backup files should be stored on different servers. 0 -
The /home/$user/logs
directory can store user log backups if they've chosen (or you've provided them the option) to store archive logs.ncdu
is pretty nice, a lot of times I just go to/
andrun du -h --max-depth=1
find the largest few directories and descend into those directories and repeat0 -
I found that I could go to WHM > Tweak Settings > Stats and Logs, and turn off "Archive logs in the user's home directory at the end of each stats run unless configured by the user. " That stopped the default automatic backup for everyone, anyway. It looks like all of the .GZ files were left in place, but at least they're not growing. I have over 100 accounts, so deleting everything manually is a time consuming pain. How dangerous is it to try to delete all of the .GZ files with: rm /home/*/logs/*.gz While we're on the subject, any other suggestions on WHM settings I can change to stop creating unnecessary log files, or to at least limit the size of them? In the same Tweak section, I have everything at default except: Log rotation size threshold: 10MB Interval... to retain Exim stats: 1 Days to retain upcp logs: 3 I'm at 99% of my storage, so I'm getting close to desperate :-O 0
Please sign in to leave a comment.
Comments
3 comments