Configure Backup

For WHM version 11.30

(Main >> Backup >> Configure Backup)

This feature allows you to configure the way your backup files are created and stored. You can configure automatic backups and backup retention schedules, and define where the backups should be stored (locally or remotely).

Options and descriptions

Configuration Option Description
Backup Status 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 Daily, Weekly, or Monthly. Selecting Daily will give you both monthly and weekly backups. Selecting Weekly will also run monthly backups.
Backup Retention Select the backups you wish to retain.
Days to Run Backup Select the days on which you wish to run backups.
Remount/Unmount Backup Drive Select whether or not you wish to remount and unmount the specified backup drive while backups are running.
note Note: Enabling this option requires a separate drive, coda, or network filesystem (NFS) drive.
Bail Out If Backup Drive Mount Fails Select whether or not you wish to cancel the backup process if the backup drive fails to mount.
Incremental Backup Select whether you wish to only back up what has changed.
note Note: You cannot enable this option with FTP backups. This option does not use file compression.
Backup Accounts Select whether or not you wish to back up accounts. (By default, only system files are contained within backups.)
Compress Account Backups Select whether or not you wish to compress backup files.
Backup Configuration Files Select whether or not you wish to back up configuration files. (Configuration files are not required to restore a backup.) For more information, see our list of configuration files included in the backup.
Backup SQL Databases 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 Logs Select whether or not you wish to store access logs.
Use local DNS zone files rather than retrieving the latest zones updates from the cluster. Selecting Enabled will cause the pkgacct script to grab the local DNS zone file, rather than searching the cluster for the latest zone record. This may improve performance, but may result in outdated DNS information whenever an account is restored.
Backup Type Standard — Selecting this option stores backup files locally or on a network file system.
Remote FTP (Accounts Only) — Selecting this option allows you 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 monthly backups. You can read more about hard links.
EXPERIMENTAL: Enable use of optimized account backup tool. Enabling this setting instructs the backup utility to use /usr/local/cpanel/bin/pkgacct if it exists and is executable.
Remote FTP Host (Remote FTP Backup Only) If you have opted to use Remote FTP backups, enter the remote FTP server's hostname in the corresponding text field.
FTP Backup User (Remote FTP Backup Only) If you have opted to use Remote FTP backups, enter the FTP account's username in the corresponding text field.
FTP Backup Password (Remote FTP Backup Only) If you have opted to use Remote FTP backups, enter the FTP account's password in the corresponding text field.
FTP Backup Directory If you have opted to use Remote FTP backups, enter the directory in which backup files will be stored.
FTP Backup Passive Mode If you have opted to use Remote FTP backups, enable this option if the remote server is behind a firewall, or if FTP backups fail.
Backup Destination If you are using Standard backups, enter the directory in which you wish to store backups.
Select Specific Users Click the Select button to select users whose accounts should be backed up automatically.

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

configbackup.png
The Configure Backup screen.

More about hard links

Traditionally, our back up system copies and stores backup files in multiple locations. This means that for a period of time, your server has 2 identical files on the file system. Furthermore, the process of copying and storing a new file increases disk I/O significantly when working 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 having to copy and store 2 different backup files. Ultimately, this prevents redundancies and reduces disk I/O.

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

Using a mounted filesystem

When you use a mounted filesystem to store backups, we strongly recommend that you mount the filesystem using the noexec option. Mounting the filesystem using the noexec option prevents binaries from running on the mounted filesystem.

You can configure a filesystem to use noexec by default. To do so, you will need to edit /etc/fstab This file contains a list of mountable filesystems and their configuration options. To configure a mountable filesystem that will automatically use noexec, you will need to edit its entry in /etc/fstab to reflect the following:

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

The example above describes the following configuration options:

Device Default Mount Point Filesystem Type Mount Options Dump Option fsck Order
/dev/sda5 /backup ext3 defaults,noexec 0 0

To remount a backup disk while the system is booted:

Linux mount -o remount,noexec /backup
FreeBSD mount -o update,noexec /backup

note Note: This assumes that /backup is already mounted.

Running backups manually

To run a backup manually, use the following command:

/usr/local/cpanel/scripts/cpbackup

If the backup is up-to-date and you wish to run backups anyway, use:

/usr/local/cpanel/scripts/cpbackup --force

A note about backups

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

This means:

  • All of the files owned by the user are included in the backup.
  • Files the user does not own but has access to are included in the backup.
  • Files the user does not own and cannot access are not included in the backup — even if they are stored in the user's home directory.

Additional information about backups

Learn more about backups by reading our Backup FAQ.

Topic revision: r35 - 09 Feb 2012 - 20:31:06 - Main.MelanieSeibert