WHM Backup Solutions Free, Opensource cPanel Reseller Backup Automation Script

Installation

Backup Script



  1. Download the latest version from https://whmbackup.solutions/download/
  2. Extract the files.
  3. Rename config.php.new to config.php.
  4. Open config.php in a text editor and enter your configuration details as documentated in our configuration page.
  5. Upload all files to your server, in a location outside of your public web directory e.g. /home/user/whmbackupsolutions/.
  6. Login to your cPanel account, click Cron Jobs and create 2 cron jobs as described below.
    (While setting up the script for the first time it may be advisable to set the cron email within cPanel to your email address so you can confirm the script is running as expected.)

    • Generate Backup List
      This cron job should run as frequent as you want backups taking e.g. once a day/week/month etc. The command line should look similar to the code below. Ensuring the directory path is correct as per your installation.

      php -q /home/user/whmbackupsolutions/whmbackup.php generate

      (Please note if you have register_argv_argc disabled on your server this will not work. A work around is available under the troubleshooting steps).

    • Run Account Backup
      This cron job should run every 10 minutes. This cron job checks if the generate backup list cron has run, if it has then this cron job gets the first account in the list and performs the backup. The next time this cron job runs it will backup the next account and so on until all accounts have been backed up. If there are 5 accounts to back up this cron will have to run 5 times for all accounts to be backed up.

      php -q /home/user/whmbackupsolutions/whmbackup.php
  7. Wait until your cron jobs have run then check the logs in /logs/ for any errors. Then tweak your configuration as required.



FTP Retention Script

While this script works independently of the backup script the config file backup destination and max_backups_per_account settings must be filled in. I recommend using the steps above before proceeding with the steps below.

  1. Login to your cPanel account, click Cron Jobs and create a cron job as described below.
    (While setting up the script for the first time it may be advisable to set the cron email within cPanel to your email address so you can confirm the script is running as expected.)

    • Run FTP Retention Script
      This script should be run after your backup script has been run, this will ensure you only store additional backups for a short period of time. However, the timing may require tuning based on how your web host has configured your server.

      php -q /home/user/whmbackupsolutions/ftp_retention.php




Now you’ve completed the installation process, you can look at our Configuration settings in more detail, resolve any issues with our Troubleshooter Guide or even take a peek at our GIT Repository.

WHM Backup Solutions Free, Opensource cPanel Reseller Backup Automation Script

Recent Posts

Get in touch

Need a bit of help or have a suggestion? Get in touch with us via Facebook or email [email protected].