Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

Warning
titleImportant:

We deprecated the Legacy Backup system in cPanel & WHM version 64 and will remove it in cPanel & WHM version 80.

  • New installations of cPanel & WHM version 64 and newer do not include the Legacy Backups system.
  • Use WHM's Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration) instead.

What are my backup options?

You can use either of our two backup systems:

  • WHM's Legacy Backup Configuration interface (WHM >> Home >> Backup >> Legacy Backup Configuration),
  • WHM's Backup Configuration interface (WHM >> Home  >> Backup >> Backup Configuration).

Both interfaces allow you to configure how automatic backups run on your server.

This FAQ focuses on the Legacy Backup Configuration system.

What does a backup store?

By default, backups only include system files and directories. When you enable account backups, they copy and store accounts' home directory contents, databases, email filters and forwarders, and DNS records. Enable account backups with the Backup Accounts option in the  Legacy Backup Configuration interface (WHM >> Home  >> Backup >> Backup Configuration).

Which files does a cPanel user's backup include?

After you enable account backups, the backup process runs as the cPanel user who owns the backup data. The system does not back up anything that a user does not own and cannot access.

  • The system includes all of the files that the user owns in the backup.
  • The system includes any files that the user does not own but has access to in the backup.

Can I select specific user accounts to back up?

Yes. Select specific user accounts to back up with the Select Specific Users option in the  Legacy Backup Configuration interface (WHM >> Home  >> Backup >> Backup Configuration). To do this, perform the following steps:

  1. Click Select >>.
  2. In the Legacy column, set the Backups column to On for specific users.
  3. Click Save.

How can I use rsync with a cPanel backup?

We do not support a backup procedure that uses rsync. While it is possible to use the rsync script with cPanel backups, we strongly recommend that you use our tools to ensure reliable backups. Under certain conditions, the rsync script may corrupt SQL database backups.

How do backups handle DNS zones?

If you use a DNSONLY™ cluster, the pkgacct script examines all of the DNS zones in the DNS cluster to find the record with the newest serial number. It then stores that DNS zone in the backup.

Which scripts run backups?

The following scripts run backups:

Code Block
languagebash
/scripts/cpbackup
/scripts/pkgacct

Where can I find backup logs?

The system stores backup logs in the /usr/local/cpanel/logs/cpbackup directory.

Where does the system store backups?

Warning
titleWarning:

We  strongly recommend that you do not perform backups to remote filesystems (for example; NFS, CIFS, smbfs, or other types of network drive systems). While you can store a backup directly to a remote filesystem, cPanel & WHM does  not support this configuration. We strongly recommend that you work with a qualified system administrator to manage this custom backup path to avoid potential risks.

Select the location in which to store backups in WHM's  Legacy Backup Configuration interface (WHM >> Home  >> Backup >> Legacy Backup Configuration).

To select the location in which to store backups, perform the following steps:

  1. Navigate to WHM's Legacy Backup Configuration interface (WHM >> Home  >> Backup >> Legacy Backup Configuration).
  2. In the Backup Destination text box, enter the location in which to store the backups.

    Note
    titleNote:

    Use a directory, network filesystem, or coda mount with at least twice the space of your /home directories or partitions. Do not set this value to your /home directory or partition.


  3. Click Save to save your changes.

What does cPanel & WHM back up when I select configuration files? Where can I find the backups?

When you back up configuration files, the system automatically stores them in the dirs and files directories. When you back up the entire MySQL directory, the backup stores its contents in the dirs directory

Multiexcerpt include
MultiExcerptNameBackupFiles
PageWithExcerptSystem Backups

Can I run backups to locally mounted remote filesystems?


Warning
titleWarning:
  • If you use a mounted filesystem to store backups, we strongly recommend that you mount the system with the noexec option. If you pass the noexec parameter to the mount parameter, the binaries cannot run on the mounted filesystem.
  • We strongly recommend that you do not perform backups to remote filesystems (for example; NFS, CIFS, smbfs, or other types of network drive systems). While you can store a backup directly to a remote filesystem, cPanel & WHM does not support this configuration. We strongly recommend that you work with a qualified system administrator to manage this custom backup path to avoid potential risks.

You can configure a file system to use the noexec option by default. To do so, edit the /etc/fstab file. This file contains a list of mountable file systems and their configuration options.


To configure a mountable file system that automatically uses the noexec option, edit its entry in the /etc/fstab file to resemble the following example:

Code Block
languagetext
/dev/sda5 /backup ext3 defaults,noexec 0 0


Note
titleNote:

Users who wish to mount or unmount a partition must enter the partition in the /etc/fstab file. The backup utility only mounts or unmounts partitions that appear 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 boots, run the following command:

Code Block
languagetext
mount -o remount,noexec /backup

How does cPanel & WHM determine when to run backups?

If you run the /usr/local/cpanel/scripts/cpbackup script without the --force option, then the following are true:

  • cPanel & WHM creates a monthly backup if the existing monthly backups are more than 29 days old.
  • cPanel & WHM creates a weekly backup if the existing weekly backups are more than six days old.
  • cPanel & WHM creates a daily backup if the existing daily backups are more than 12 hours old.

    Note
    titleNote:

     If backups require more than 12 hours to run, they will skip a day.


Can I manually edit my backup schedule?

Automatic backups run via a cronjob. Edit the crontab to control when backups run. The /usr/local/cpanel/scripts/upcp script does not overwrite this cronjob. Perform this action via SSH as the root user with the crontab -e command.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "backups" and label = "restore" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("backups","restore") and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("restore","backups") and label = "whm" and space = currentSpace()


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("backups","restore") and space = "DD"