1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Preferred Backup Configurations for Dedicated and VPS Systems

Preferred Backup Configurations for Dedicated and VPS Systems

 

Introduction

The cPanel software provides a powerful, flexible system that allows users to create and restore user account backups. There is no one-size-fits-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. It's 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 WHM Backup Settings

Here are the steps in accessing your server's backup scheduling options:

  1. Log in to WHM.
  2. Navigate to Backup Configuration using the search bar on the left-side menu. This is found under the Backup section.

    WHM - Backup Configuration

  3. On the Backup Configuration page, put a checkmark on the Enable Backups.

    WHM - Enable Backups

  4. Using the available features and options, modify the settings with your preferred backup schedule and retention. Please see the recommended settings below.
  5. Once done, scroll down the page and click Save Configuration.

    WHM - Save Configuration

  6. A confirmation prompt will appear notifying you of the successful automatic backup setup.

    Successful Prompt

To know more about scheduled backups of different hosting accounts, you may want to visit the article:

Proper care should be taken when configuring these options, as improper configuration could cause a high server load or lock up the server by filling up the entire disk space. Please see below for recommended options.


Terminology

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

Backup Types

  • 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).
  • 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.
  • 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.

Backup Schedule

  • Daily: Backups are scheduled to run more frequently than once a week. This should be used only for accounts that are constantly updating.
  • Weekly: Backups are scheduled up to 4 times a month.
  • Monthly: Backups are scheduled once a month.
Note: For each of these types, the user can configure the number of backups to keep.

Backup Directory

This is the location where the backups will be stored.


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 Disaster Recovery (DR) backup (in the case of VPS accounts). 

We also created a video tutorial on  How to set up and run backups in WHM. This video outlines the backup configurations listed below.

  • 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:
    In setting up the backup schedule, select "Strictly enforce retention, regardless of backup success" to remove successful and unsuccessful backups. This will allow the system to remove all backups that are over the number in the Retention text box.
    • Backup Daily: Checked
      Select 3 days with a 1-day gap with either 1 or 2 retention
    • Backup Weekly: Checked
      Select a day with the least traffic for creating backups.
      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:
    • Back up User Accounts: Make sure that Users are not disabled here.
    • 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 set up additional destinations for storing your backups before saving your new configuration.

 


General Guidelines For Alternative Settings

Several things 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:

  • 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 that is 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.
  • The 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.
  • 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.
  • 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.
  • Care should be taken to perform regular house cleaning 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.
  • Keep in mind that for VPS containers, HostGator does perform a weekly backup of the container to a Disaster Recovery (DR) drive. However, this service is not guaranteed and will cost $25 for each user account restored.

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 that 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 
  • Backup Type: Compressed
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Checked (For example, Monday, Wednesday, Friday) with "Strictly enforce retention, regardless of backup success" selected and either 1 or 2 retention.
    • Backup Weekly: Checked (For example, Sunday) with "Strictly enforce retention, regardless of backup success" selected and 2 as retention.
    • Backup Monthly: Checked with "Strictly enforce retention, regardless of backup success" selected and 1 as retention.
  • Files:
    • Backup Suspended Accounts: Disable
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional
    • Use Local DNS: Optional
    • 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 is equal to 2.5 times 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: Checked (For example, Monday, Wednesday, Friday) with "Strictly enforce retention, regardless of backup success" selected and either 1 or 2 retention.
    • Backup Weekly: Checked (For example, Sunday) with "Strictly enforce retention, regardless of backup success" selected and 2 as retention.
    • Backup Monthly: Checked with "Strictly enforce retention, regardless of backup success" selected and 1 as retention.
  • Files:
    • Backup Suspended Accounts: Disable 
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional
    • Use Local DNS: Optional
    • 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 is equal to 2.5 times 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
  • Backup Type: Incremental
  • Maximum destination timeout: 2700
  • Maximum restore timeout: 21600
  • Scheduling and Retention:
    • Backup Daily: Checked (For example, Monday, Wednesday, Friday) with "Strictly enforce retention, regardless of backup success" selected and either 1 or 2 retention.
    • Backup Weekly: Checked (For example, Sunday) with "Strictly enforce retention, regardless of backup success" selected and 2 as retention.
    • Backup Monthly: Checked with "Strictly enforce retention, regardless of backup success" selected and 1 as retention.
  • Files:
    • Backup Suspended Accounts: Disable
    • Backup Access Logs: Optional
      Note: Sites with heavy traffic can generate very large log files.
    • Backup Bandwidth Data: Optional
    • Use Local DNS: Optional
    • 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.