Cleaning backups of unused domains

September 7, 2010 • By admincPanel



cPanel Clean Backup



cPanel backup functionality is a bit weird. It does not remove the taken backups of domains that are even removed years ago. If you do not regularly monitor this and clean unused backups, you may end up finishing you server’s storage.

However, when your server has hundreds of customers accounts hosted and people are coming and going regularly it is really tough, if not impossible, to monitor regularly an clean the backups of terminated domain names. To facilitate this, NDCHost developed a nice plugin named “Clean Backups”. The plugin is fully free! So you don’t need to calculate your ROI as you are getting 100% return .

Overview

cPanels backup script will not remove backups for accounts that no longer exist and these backups will remain on the backup drive until removed. This plug-in gives administrators the ability to clean up their backup directory by setting how long they want to keep backups for accounts that no longer exist and removing those backups when they expire. The script can be run by hand or after automatically after the cPanel backup script finishes.

Installation

"An excellent book!"
  — Paul Wilmott
Want to break into the lucrative world of trading and quantitative finance? You need this book!

You understand, for installing this plugin you will need root access to your server.  So, long to y our server using SSH as root. Then type the following commands:

# cd /home
# rm -f latest-cleanbackups
# wget http://www.ndchost.com/cpanel-whm/plugins/cleanbackups/download.php
# sh latest-cleanbackups

Your installation is completed. Now login to WHM with root privilege. You will get Clean Backup item in the Plugins section. The remaining part is self-explanatory. From the interface, you can enable and disable the auto cleaning process of backups of non-existent accounts, configure how long backups for non-existent accounts should be kept, see recent activity  log! You can also run the cleaning script by manually.


Un-installation

To uninstall the plugin you simply need to remove the following files.

/usr/local/cpanel/whostmgr/docroot/cleanbackups
/var/cpanel/cleanbackups/
/usr/local/cpanel/whostmgr/docroot/cgi/addon_cleanbackups.cgi
/scripts/postcpbackup
/scripts/precpbackup

SSH to your server as root and run the following commands

# rm /usr/local/cpanel/whostmgr/docroot/cleanbackups
# rm/var/cpanel/cleanbackups/
# rm /usr/local/cpanel/whostmgr/docroot/cgi/addon_cleanbackups.cgi
# rm /scripts/postcpbackup
# rm /scripts/precpbackup

That’s it! You are done! I hope you enjoyed the reading!

Cleaning backups of unused domains, 10.0 out of 10 based on 1 rating