Control Web Panel

WebPanel => CentOS 5 Problems => Topic started by: askinj on August 10, 2016, 03:48:02 PM

Title: Continuous reduction of hosting space
Post by: askinj on August 10, 2016, 03:48:02 PM
Hello
The VPS server I use CWP panel, decreasing the area to be used about 100 MB each day. We had 12GB of free space from 6GB. Can you help with this?
Title: Re: Continuous reduction of hosting space
Post by: idovecer on June 20, 2022, 07:33:23 AM
Hello
The VPS server I use CWP panel, decreasing the area to be used about 100 MB each day. We had 12GB of free space from 6GB. Can you help with this?

Firstly install ncdu with
# yum install ncdu.

After that start ncdu. With that tool you can easily see what's taking your space.


Also you can clean some system apache logs.
Notice: First command list them all, so you can check them before cleaning, second command truncates to nothing.

# apache domain logs
# find /usr/local/apache/domlogs/ -type f -name "*.log" -exec ls -if {} \;
# find /usr/local/apache/domlogs/ -type f -name "*.log" -exec truncate --size 0 {} \;

# php-fpm system logs
# find /opt/alt/php-fpm*/usr/var/log/ -type f -name "php-fpm.log" -exec ls -if {} \;
# find /opt/alt/php-fpm*/usr/var/log/ -type f -name "php-fpm.log" -exec truncate --size 0 {} \;

# apache logs
# find /usr/local/apache/logs/ -type f -name "*log" -exec ls -if {} \;
# find /usr/local/apache/logs/ -type f -name "*log" -exec truncate --size 0 {} \;

# dovecot logs
# find /var/log/dovecot-* -type f -name "*log" -exec ls -if {} \;
# find /var/log/dovecot-* -type f -name "*log" -exec truncate --size 0 {} \;

# cwp_stats home folder clean
# find /home/*/cwp_stats/goaccess/ -type f -name "*.html" -exec ls -if {} \;
# find /home/*/cwp_stats/goaccess/ -type f -name "*.html" -exec rm {} \;

Title: Re: Continuous reduction of hosting space
Post by: josemnunez on June 20, 2022, 05:52:52 PM
remember to restart the services after deleting the files