Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.44

(Home >> Backup >> Legacy Backup Configuration)

Overview

This feature allows you to configure how your server creates and stores backup files. You can configure automatic backups, backup retention schedules, and backup storage locations.

 

Options

Configuration OptionDescription
Backup Status

This option allows you to specify whether the Legacy Backup feature is enabled, disabled, or only enabled for restorations:

  • Enabled — Enable backups and restorations. 
  • Disabled — Disable backups and restorations. 
  • Restore Only — Disable backups and allow restorations.
Backup Interval

Select the interval at which you wish to run automatic backups. You may select DailyWeekly, or Monthly.

  • If you select Daily, your server will create both monthly and weekly backups. 
  • If you select Weekly, your server will also run monthly backups.
Backup RetentionSelect the backups that you wish to retain.
Days to Run BackupSelect the days on which you wish to run backups.
Remount/Unmount Backup Drive

Select whether you wish to remount and unmount the specified backup drive while backups run. 

Note:

To enable this option, you must have a separate drive, coda, or network file system (NFS) drive.

Bail Out If Backup Drive Mount FailsSelect whether you wish to cancel the backup process if the backup drive fails to mount.
Incremental Backup

Enable this option if you wish to only back up and restore data that has changed.

Note:

 You cannot enable this option with FTP backups. This option does not use file compression.

Backup AccountsSelect whether you wish to back up accounts. If this option is disabled, the system will only back up system files. This option is disabled by default.
Compress Account BackupsSelect whether you wish to compress backup files.
Backup Configuration Files

Select whether you wish to back up configuration files.

Note:

Configuration files are not required to restore a backup.

Backup SQL Databases

You can choose the following options for this setting:

  • Per Account Only — Creates an individual database backup for each account. 
  • Entire MySQL Directory — Creates a single backup for the entire MySQL® directory. 
  • Per Account and Entire MySQL Directory — Creates both individual backups for each account and a single database backup that contains the entire MySQL directory.
Backup Access LogsSelect whether you wish to store access logs.
Backup Bandwidth DataSelect whether you wish to store bandwidth data.
Use local DNS zone files rather than retrieving the latest zone updates from the cluster.Select Enabled to cause the pkgacct script to grab the local DNS zone file, rather than search the cluster for the latest zone record. This may improve performance, but may result in outdated DNS information whenever you restore an account.
Backup Type

You can choose the following options for this setting:

  • Standard — Select this option to store backup files locally or on a network file system.
  • Remote FTP (Accounts Only) — Select this option to store backup files on a remote server.
EXPERIMENTAL: Use Hard Links for weekly and monthly backups to reduce disk usage and backup time.Select whether you wish to use hard links for weekly and yearly backups.
EXPERIMENTAL: Enable use of optimized account backup tool.This setting instructs the backup utility to use the /usr/local/cpanel/bin/pkgacct script if it exists and is executable.
Remote FTP Host (Remote FTP Backup Only)

If you opted to use Remote FTP backups, enter the remote FTP server's IP address in the Remote FTP Host text box. 

Note:

When you specify the backup host, exclude the FTP protocol.

FTP Backup User (Remote FTP Backup Only)If you opted to use Remote FTP backups, enter the FTP account's username in the FTP Backup User text box.
FTP Backup Password (Remote FTP Backup Only)If you opted to use Remote FTP backups, enter the FTP account's password in the FTP Backup Password text box.
FTP Backup DirectoryIf you opted to use Remote FTP backups, enter the directory in which you wish to store backup files.
FTP Backup TimeoutIf you opted to use Remote FTP backups, enter the number of seconds of inactivity after which the FTP transfer will time out. This option defaults to 120.
FTP Backup Passive ModeIf you opted to use Remote FTP backups, enable this option if the remote server is behind a firewall, or if FTP backups fail.
Backup DestinationIf you use Standard backups, enter the directory in which you wish to store backups.
Select Specific UsersClick Select to select users whose accounts should be backed up automatically.

When you have used these options to configure backups to your satisfaction, click Save.

 

Traditionally, our backup system copies and stores backup files in multiple locations. This means that for a period of time, your server has two identical files on the file system. Furthermore, when you copy and store a new file, it increases disk I/O significantly when you work with large accounts. Hard links aim to fix these issues.

A hard link is similar to a symlink but can make multiple references to a single inode. This allows our backup system to point a monthly or weekly backup file to an existing daily backup file (in accordance with your configuration), without the need to copy and store two different backup files. Ultimately, this prevents redundancies and reduces disk I/O.

You can read more about hard linkssymlinks, and inodes on Wikipedia.

Use a mounted file system

When you use a mounted file system to store backups, we strongly recommend that you mount the file system with the noexec option. If you mount the file system with the noexec option, binaries cannot run on the mounted file system.

You can configure a file system to use noexec by default. To do so, you will need to edit the /etc/fstab file. This file contains a list of mountable file systems and their configuration options. It is important to note that the backup utility will only mount or unmount partitions that appear in the /etc/fstab file. To configure a mountable file system that will automatically use noexec, edit its entry in the /etc/fstab file to resemble the following example:

/dev/sda5 /backup ext3 defaults,noexec 0 0

Note:

Users who wish to mount or unmount a partition must place the partition in the /etc/fstab file.

 

The example above describes the following configuration options:

DeviceDefault Mount PointFile System TypeMount OptionsDump Optionfsck Order
/dev/sda5/backupext3defaults,noexec00

 

To remount a backup disk while the system is booted, run the following command:

mount -o remount,noexec /backup

Note:

This command assumes that /backup is already mounted.

Run backups manually

To run a backup manually, run the /usr/local/cpanel/scripts/cpbackup command.

If the backup is up-to-date and you wish to run backups anyway, run the /usr/local/cpanel/scripts/cpbackup --force command.

A note about backups

The backup process runs as the cPanel user whose data it backs up. Anything a user cannot access is not backed up.

  • The backup includes all of the files that the user owns.
  • The backup includes files that the user does not own but that the user can access.
  • The backup does not include files that the user does not own and cannot access — even if they are stored in the user's home directory.

Note:

Files that are owned by the user nobody in the public_html directory are not backed up when cpbackup runs. Some third party software, such as phpBB, puts files in this directory. Files in this directory do not belong to a particular user. As a result, cpbackup will ignore these files. To prevent this complication, manually backup any desired files in a cron job. You can then exclude these files from cpbackup.

Additional information

For more information about backups, read our Legacy Backups FAQ