Skip to main content

How to Configure Backups on a VPS Package

This article provides step-by-step instructions on how to setup backups on your VPS in WHM. If at any point you need assistance with this process, please feel free to contact us via a ticket or Live Support and we would be happy to further assist.

ℹ️ Before getting started, it is crucial to determine how many backups you can retain. 

To determine how much space you'll need for backups, add up the size of all your cPanel accounts, then multiply that for every 1 backup you retain. Since cPanel creates new backups before deleting old ones, you will need roughly double that number (A more detailed walk through of this process is provided further in this article).

Because VPS packages do not come with significant amounts of disk space by nature, it is not uncommon for clients on VPS packages to utilize a combination of local storage and remote storage, and to not store any backups on the VPS itself. We highly recommend keeping this in mind while developing a backup plan.**

To configure the backups for your VPS, please use the following steps:

  1. Login to WHM and select "Backup Configuration":

 

  1. Select "Enable" on turn backups on:

 

  1. Select the "Backup Type".

    There are 3 options available:

    • Compressed - Select this setting to save all of your information in a compressed format. This setting uses less disk space, but requires more time to complete.

    • Uncompressed - Select this setting to save all of your information in an uncompressed format. This setting uses more disk space, but is faster than Compressed backups.

    • Incremental - Select this setting to store only one uncompressed backup file. The system saves updated account information to the existing backup file, and remove the old information that these updates replace. This setting limits your restoration settings, but runs faster and uses less disk space than other backup types.

      ⚠️ An important note for Incremental backup: If you choose to use Incremental backups, you cannot restore the account to a time before your last backup.

 

  1. Decide on a backup and retention schedule:

    • Backup Daily - Your system creates a new backup on each of the days of the week that you select. When you select this setting, you must also configure the following settings:

      • Select the days of the week on which you wish to run backups.
      • In the Retain Daily backups text box, enter the maximum number of daily backup files to store on your system at any given time.
    • Backup Weekly -  Your system creates a new backup once each week, on the day that you select. When you select this setting, you must also configure the following settings:

      • Select the days of the week on which you wish to run backups.
      • In the Retain Weekly backups text box, enter the maximum number of weekly backups to store on your system at any given time.
    • Backup Monthly - Your system creates a new backup either once or twice per week, on the days of the month that you select. When you select this setting, you must also configure the following settings:

      • Select the day or days of the month on which you wish to run backups.
      • In the Retain Monthly backups text box, enter the maximum number of monthly backups to store on your system at any given time.

      ⚠️ If you run daily and monthly backups on the same day, the daily backup runs first, and then the monthly backup copies the daily backup.

      ℹ️ With the above options, you can design a backup and retention schedule that fits your business needs. To determine how much space you'll need for backups, add up the size of all your cPanel accounts, then multiply that for every 1 backup you retain. Since cPanel creates new backups before deleting old ones, you will need roughly double that number. Let's use the above setup as an example:

      1. I have backups set to run every day, storing 1 copy of the daily backup, 1 copy of the weekly backup, and 1 copy of the monthly backup, for a total of 3 backups.

      2. Let's say all my accounts together take up 5 GB of disk space. That's 5 (size in GB of accounts) * 3 (number of backups) = 15 GB.

      3. We double that size to accommodate the creation of the backups for a grand total of 30 GB.

      Depending on the type of backups you selected, there will be some variation and the above method will not be exact, but it should help provide a good starting point while designing your backup and retention schedule.

  2. Select which files you wish to back up:

    • Backup Accounts - This MUST be checked in order for your accounts to be backed up!

      • Select Users - This is where you can select which specific accounts are backed up. Accounts must be enabled in this list to be backed up!
    • Backup Suspended Accounts - Select the Enable button to back up suspended accounts.

    • Backup Access Logs - Select the Enable button to back up your server's access logs and the /usr/local/cpanel/domlogs file.

    • Backup Bandwidth Data - Select the Enable button to back up your server's bandwidth data.

    • Use Local DNS - Select the method to use to back up DNS information:

      • Disable - The system backs up DNS information from the DNS cluster.

      • Enable - The system backs up DNS information from the server for the domain.

    • Backup System Files - Back up your server's system files.

      ⚠️ You must enable this setting for server restoration, but it is not necessary for account restoration. We strongly recommend that you enable this setting. For more information, please consult cPanel's official documentation on System Backups.

  3. Select database backup options:

    • Per Account Only - Only back up the databases for each account. This setting uses the mysqldump utility.

    • Entire MySQL Directory - Back up all of the databases on the server. This backs up the entire /var/lib/mysql/ directory.

    • Per Account and Entire MySQL Directory - Perform a comprehensive backup that copies all of the databases for each individual account, as well as all of the databases on the server. We generally recommend this setting for best results.

  4. Configure Backup Directory:

    • Default Backup Directory - This is set to "/backup" by default, which is traditionally it's own mount on your server's filesystem.

    • Retain backups in the default backup directory - Select this checkbox to retain each account backup in the /backup/ directory after the backups transfer to another destination. Please note that due to the nature of VPS packages, you will usually want to leave this UNchecked to avoid running out of diskspace (this assumes you are storing backups on an additional destination, such as a Remote FTP Storage package). If you do not select this setting, your server deletes account backup files from the /backup/ directory only after the following events occur:

      • The system successfully transfers the backup file to at least one additional destination.

      • The system attempts, successfully or unsuccessfully, to transfer the backup file to all of your additional destinations.

    • Mount Backup Drive as Needed - Select the Enable button to mount a backup drive. This setting requires a separate mount point and causes the Backup Configuration process to check the /etc/fstab file for a backup mount.

      • If a mount exists with the same name as the staging directory, the Backup Configuration process mounts the drive and backs up the information to the mount.

      • After the backup process finishes, it dismounts the drive.

      ⚠️ This feature is for advanced users, and you more than likely do not need to enable this. Please contact us if you are unsure, as altering this setting or /etc/fstab can leave your backups or even server in an unusable state.

  5. Configure Additional Destinations:

    If you would like to configure an additional backup destination (which we recommend), this is where you can do it. There are a number of important factors to consider when setting up additional destinations, and we recommend consulting cPanel's official documentation for best results. If you do not have an off-site location for backup storage, we highly recommend checking out our Remote FTP Storage packages.

Additional Information:

After configuring backups, we recommend keeping an eye on your "/backup" mount over the next few weeks to ensure that your configuration is appropriate for the amount of resources you have available. If you notice you are running out of space, we recommend archiving and/or deleting old accounts and content, as well as retaining fewer backups. For VPS packages, it is not uncommon to forgo backups on the server entirely, and instead storing backups only on local machines and/or Remote FTP Packages.

If you have any questions at any time, require assistance with configuring backups, or are interested in increasing the available backup space on your server, please do not hesitate to contact us at any time, 24/7/365. Thank you!