Pages

Friday, October 4, 2013

Free Up Disk Space on a cPanel Server

1) Delete user cPanel and Fantastsico backups


To remove cPanel backups on the server with this command:
for user in `/bin/ls -A /var/cpanel/users` ; do rm -fv /home/$user/backup-*$user.tar.gz ; done

To remove Fantastico backups:
rm -rfv /home/*/fantastico_backups

2) Move your backups offsite

3) Delete cPanel File Manager temp files


You can remove these files using this command:

rm -fv /home/*/tmp/Cpanel_*


4) Move or archive logs

Most of the server’s logs are stored in /var/log, which can get rather large on more populated servers. You can change the length of time and frequency of the log rotation in /etc/logrotate.conf, and enable compression to save additional space (at the expense of CPU when the logs are being gzipped).

5) Remove cPanel update archives

The following can be deleted or moved to a backup server to free up a little bit of space:


/usr/local/apache.backup*
/home/cpeasyapache (actual name may vary depending on cpanel version)


6) Clean up Yum files

Yum updates leave package cache files on the server. You can clean up all unneeded yum files by running:

yum clean all

7) Remove pure-ftp partials

If the upload doesn’t complete, these files are left on the server. You can find and delete these by running:

locate .pureftpd-upload | xargs rm -fv







0 comments:

Post a Comment