Preferred Backup Configurations for Dedicated and VPS Systems

Introduction

The cPanel software provides a powerful flexible system which allows users to create and restore user account backups. There is no one size fit all configuration for the backups, however the average user will have a large number of common needs and may benefit from a well thought out set of recommended settings.

This article will cover the following topics:

Note: cPanel also has a Legacy Backup option in WHM. The Legacy system is no longer being developed and will be removed from the WHM menu in the near future. Its provided for administrators that have custom configurations and can not yet make the changes needed to transition to the new backup system.

How to Modify cPanel Backup Settings

To access your server's backup scheduling options:

  1. Login to WHM.
  2. Select Backup Configuration from the left menu.
  3. Once the backup is configured to suit your needs, you must click the large blue button labeled Save Configuration at the bottom of the page.

From here you will be able to enable and configure regularly scheduled backups. Proper care should be taken when configuring these options as improper configuraiton could cause high server load or lock up the server by filling up the entire disk space. Please see below for recommended options.

This backup will generate two recent backup archives with the oldest being up to 14 days and a single backup archive up to 31 days old. Uncompressed backups were chosen to avoid load spikes. This configuration will provide 3 date options to the client for a restore without them having to rely on the HG NAS backup (in the case of VPS accounts):

  • Backup Status: Enable (All other options will be grayed out until this is selected)
  • Backup Type: Uncompressed
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Unchecked
    • Backup Weekly: Checked
    • Select a day with the least traffic for creating backups. HostGator recommends Thursday.
    • Retain 2 weekly backups.
    • Backup Monthly: Checked
    • Select either the 1st or 15th of the month for creating your backup.
    • Retain 1 monthly backup.
  • Files:
    • Backup Suspended Accounts: Disable (Suspended accounts should be backed up manually at the time of suspension)
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional. The default setting may be used.
    • Use Local DNS: Optional. The default setting may be used.
    • Backup System Files: Checked
  • Databases:
    • Backup SQL Databases: Per Account Only
  • Configure Backup Directory:
    • Default Backup Directory: /backup
    • Retain backups in the default backup directory: Checked
    • Mount Backup Drive as Needed: Use the default setting.

Additionally, if you have an external file server configured to receive files, you may setup additional destinations for storing your backups before saving your new configuration.

General Guidelines For Alternative Settings

There are several things that must be considered when configuring backups for your server. This section is meant to highlight some of the alternative configuration options available for backups. Please keep in mind the following when adjusting your backup configuration settings:

  1. When using compressed archives, a server should have free disk space equal to at least 2 times the size of the largest account. The backup process creates a temporary copy of the account being archived. If there is not enough room on the disk, the process will greatly increase the hard disk input/output and load on the server as it tries to create the archive.
  2. Creation of compressed archives should be avoided during times when the server has heavy traffic. Creating such archives will also increase the hard disk input/output and load on the server.
  3. If the client accounts on the server are frequently being updated, it is advisable to create more frequent backups. If there is a need to keep several backups for the same account, the disk space requirements will increase. The user needs to take into account how often the sites are being updated versus how quickly it is anticipated that a user will discover the need for an account to be restored.
  4. Users frequently add plugins to create backups of their content management systems (WordPress, Joomla, etc.). Users who keep these backups stored in their user accounts on the server are adding a source of additional load on the server when the server runs backups. If the server tries to include an already compressed backup file (for example, one created by BackUpBuddy for WordPress), the server will waste time and cpu trying to compress a file that has already been compressed. If the user does not remove their backups, the size of the server archive can increase quickly.
  5. Care should be taken to perform regular housecleaning on user accounts. Users commonly allow their error logs or access logs to grow quite large. These should be truncated or removed periodically. Also the Trash directories of mail accounts should be emptied regularly and any cache directories should also be cleaned up regularly.
  6. Keep in mind that for VPS containers, HostGator does perform a weekly backup of the container to a NAS drive. However this service is not guaranteed and will cost $15 for each user account restored.

Terminology

Here is a glossary of terms to help with understanding backup settings:

  1. Backup Types:
    1. Compressed: All the account information is stored in a single compressed file. This file requires less disk space but takes more time to complete. If the accounts are large, this method may cause a load spike on the server. As a general rule of thumb, this type is recommended for archiving small user accounts (less than 10 GB).
    2. Uncompressed: All the account information is stored in an uncompressed format. This type takes much less time to complete but uses more disk space. This type is generally recommended for servers with a few large accounts and with plenty of storage available. The number of Daily, Weekly, and Monthly archives is limited only by the free disk space available.
    3. Incremental: This type saves an initial uncompressed copy of the account and thereafter saves only the changes made to the account. Once the initial backup has been created, this is the fastest of all options. It is recommended for servers with a few large accounts and limited storage. Only one each of Daily, Weekly, and Monthly backup can be archived and this method cannot be used with Remote Storage options.
  2. Backup Schedule
    1. Daily: Backups scheduled to run more frequently than once a week. This should be used only for accounts that are constantly updating.
    2. Weekly: Backups scheduled up to 4 times a month.
    3. Monthly: Backups scheduled once a month.
    Note: For each of these types, the user can configure the number of backups to keep.
  3. Backup directory: The location in which backups will be stored.

Example Alternative Configurations

Here are a few examples of situations where you may need to deviate from the recommended settings and why you might wish to do so:

Example #1

For servers hosting accounts that rarely change or for servers which need a bit more free space than what the Initial Backup Configuration offers. The server should have user accounts of fixed content, under 10 GB, on a server with free space equal to 2 times the amount of the largest user account. This backup will generate a recent backup archive up to 14 days old and a single backup archive up to 31 days old.

  • Backup Status: Enable (All other options will be grayed out until this is selected)
  • Backup Type: Compressed
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Unchecked
    • Backup Weekly: Checked
    • Select a day with the least traffic for creating backups. HostGator recommends Thursday.
    • Retain 2 weekly backups.
    • Backup Monthly: Checked
    • Select either the 1st or 15th of the month for creating your backup.
    • Retain 1 monthly backup.
  • Files:
    • Backup Suspended Accounts: Disable (Suspended accounts should be backed up manually at the time of suspension)
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional. The default setting may be used.
    • Use Local DNS: Optional. The default setting may be used.
    • Backup System Files: Checked
  • Databases:
    • Backup SQL Databases: Per Account Only
  • Configure Backup Directory:
    • Default Backup Directory: /backup
    • Retain backups in the default backup directory: Enable this if you wish to keep both a remote and a local copy.
    • Mount Backup Drive as Needed: Enable if you are using a SAN device.

Example #2

A server with a few large user accounts and free space equal to 2.5 times the the sum of all user accounts. This configuration is a good starting point if the server has trouble with load spikes occurring when backups are run. This would be an ideal configuration for users storing the backups remotely or on a SAN disk:

  • Backup Status: Enable (All other options will be grayed out until this is selected)
  • Backup Type: Uncompressed
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Unchecked
    • Backup Weekly: Checked
    • Select a day with the least traffic for creating backups. HostGator recommends Thursday.
    • Retain 2 weekly backups.
    • Backup Monthly: Checked
    • Select either the 1st or 15th of the month for creating your backup.
    • Retain 1 monthly backup.
  • Files:
    • Backup Suspended Accounts: Disable (Suspended accounts should be backed up manually at the time of suspension)
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional. The default setting may be used.
    • Use Local DNS: Optional. The default setting may be used.
    • Backup System Files: Checked
  • Databases:
    • Backup SQL Databases: Per Account Only
  • Configure Backup Directory:
    • Default Backup Directory: /backup
    • Retain backups in the default backup directory: Enable this if you wish to keep both a remote and a local copy.
    • Mount Backup Drive as Needed: Enable if you are using a SAN device.

Example #3

A server with a few large user accounts and free space equal to 2.5 times the the sum of all user accounts. This configuration is a good starting point for servers experiencing load spikes during backups and without having a remote storage option.

  • Backup Status: Enable (All other options will be grayed out until this is selected)
  • Backup Type: Incremental (Used when there is limited disk space and no ability to use remote storage)
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Unchecked
    • Backup Weekly: Checked
    • Select a day with the least traffic for creating backups. HostGator recommends Thursday.
    • Retain 1 weekly backups.
    • Backup Monthly: Checked
    • Select either the 1st or 15th of the month for creating your backup.
    • Retain 1 monthly backup.
  • Files:
    • Backup Suspended Accounts: Disable (Suspended accounts should be backed up manually at the time of suspension)
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional. The default setting may be used.
    • Use Local DNS: Optional. The default setting may be used.
    • Backup System Files: Checked
  • Databases:
    • Backup SQL Databases: Per Account Only
  • Configure Backup Directory:
    • Default Backup Directory: /backup
    • Retain backups in the default backup directory: Enable this if you wish to keep both a remote and a local copy.
    • Mount Backup Drive as Needed: Enable if you are using a SAN device.