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.40

What are my backup options?

You have two backup options:

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 (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 (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:

/scripts/cpbackup
/script/pkgacct

Where can I find backup logs?

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

Where are backups stored?

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

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

  1. Navigate to WHM's Legacy Backup Configuration interface (Main >> Backup >> Legacy Backup Configuration).
  2. Scroll down until you see the Backup Destination configuration option.
  3. Enter the location where you wish to store the backups in the text box next to the Backup Destination option.

    Note:

    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.

  4. 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

Backups store the following directories in the dirs directory:

/etc/proftpd/ 
/etc/ssl/ 
/etc/valiases/ 
/etc/vdomainaliases/ 
/etc/vfilters/ 
/usr/local/cpanel/3rdparty/mailman/ 
/usr/local/frontpage/ 
/usr/share/ssl/ 
/var/cpanel/ 
/var/lib/mysql/ 
/var/lib/rpm/ 
/var/log/bandwidth/ 
/var/named/ 
/var/spool/cron/

 

Backups store the following directories in the files directory:

/etc/exim.conf 
/etc/exim.conf.localopts 
/etc/fstab 
/etc/group 
/etc/httpd/conf/httpd.conf 
/etc/ips 
/etc/localdomains 
/etc/my.cnf 
/etc/named.conf 
/etc/passwd 
/etc/pure-ftpd.conf 
/etc/quota.conf 
/etc/remotedomains 
/etc/rndc.conf 
/etc/secondarymx 
/etc/shadow 
/etc/wwwacct.conf 
/root/.my.cnf 
/usr/local/apache/conf/httpd.conf

Can I run backups on a mounted filesystem?

Important

If you use a mounted filesystem to store backups, we strongly recommend that you mount the system with the noexec parameter. If you pass the noexec mount, bianaries will not run on the mounted filesystem.

Configure a filesystem to use the noexec parameter by default whenever it mounts. To do so, edit the /etc/fstab file. This file contains a list of filesystems that you can mount on your system.

To configure a mountable filesystem that will automatically use noexec, edit its entry in the /etc/fstab file to reflect the following example:

nfs        /path/to/nfs       ext3        defaults,noexec        0  0

The example above describes the following configuration options:

DeviceDefault Mount PointFilesystem TypeMount OptionsDump Optionfsck Order
nfs/path/to/nfsext3defaults,noexec00

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:

     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, because 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.

My backup partition is locked and will not unmount itself. How do I fix this?

There is a known incompatibility when cPanel & WHM runs on CloudLinux under Centos 5.X. After a nightly backup runs or a restore runs, the backup partition gets stuck in an active lock.

The next time you perform a backup or a restore, you will see an error similar to the following example:

[backupmount] Cannot umount: /backup. This mountpoint is still in use and has an active lock 

mount: /dev/sdb1 already mounted or /backup busymount: according to mtab, /dev/sdb1 is already mounted on /backup

To resolve this issue, run the following commands as the root user:

mount -r /backup
mount -o remount,rw /backup
umount /backup