For cPanel & WHM version 58
What are my backup options?
You can configure backups for your server in WHM's Backup Configuration interface (Home >> Backup >> Backup Configuration). This interface allows you to configure the way in which backups run on your server.
What does the system store in a backup?
System backup files include system files and directories.
Account backup files include home directory contents, databases, email and email settings, DNS records, and other account-related information.
Which files does each cPanel user's backup include?
After you enable account backups, the backup process runs as the cPanel user who owns the backed-up 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 users' accounts to back up?
Use WHM's Backup User Selection interface (Home >> Backup >> Backup User Selection) to select specific cPanel accounts to back up.
How does the system back up 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.
By default, backups are cluster-aware and pull the account's zone from the DNS cluster itself. To pull the account's zone from the local machine, enable the Use Local DNS option in WHM's Backup Configuration interface (Home >> Backup >> Backup Configuration).
How can I use the
rsync script with a cPanel & WHM backup?
We do not support backup procedures that use the
While it is possible to use the
rsync script with cPanel & WHM backups, we strongly recommend that you use cPanel-provided tools to ensure reliable backups. Under certain conditions, the
rsync script may corrupt SQL database backups.
Which scripts run backups?
The following scripts are the main scripts that run backups:
Where does the system store backup logs?
The system stores backup logs in the
/usr/local/cpanel/logs/cpbackup/ directory. The log filenames correspond to the second at which the system created them, in Unix epoch time.
Where does the system store backups?
You can select the location in which you wish to store backups in the Configure Backup Directory section of WHM's(Home >> Backup >> Backup Configuration).
You must provide an absolute path to the local backup directory.
BACKUPDIR variable to retrieve the system's current setting from the
/var/cpanel/backups/config files, as in the following example:
What does the system back up when I select configuration files? Where can I find the backups?
When you back up configuration files, the system automatically stores the files in the
files directories. When you back up the entire MySQL directory, its contents are stored in the
cPanel & WHM backs up the following files and directories: To configure system backups to include custom files or directories, create a new file or directory in the Note: The server administrator can edit the
/var/cpanel/backups/extras directory (for example,
/var/cpanel/backups/extras/etc). In that file, enter an absolute path to any files that you wish to back up (for example,
/etc/my.cnf file to change the MySQL data directory location. In such a case, WHM will back up the directory at its new location.
To configure system backups to include custom files or directories, create a new file or directory in the
The server administrator can edit the
Can I run backups to locally mounted remote filesystems?
- If you use a mounted filesystem to store backups, we strongly recommend that you mount the system with the
noexecoption. If you pass the
noexecparameter to the
mountparameter, 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.
noexecoption by default. To do so, edit the
/etc/fstabfile. 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:
Users who wish to mount or unmount a partition must place the partition in the
/etc/fstab file. The backup utility only mounts or unmounts partitions that appear in the
The example above describes the following configuration options:
|Device||Default mount point||file system type||Mount options||Dump option||fsck order|
To remount a backup disk while the system boots, run the following command:
Why do I see "Permission denied" errors when I back up to a CIFS-mounted drive?
When you try to back up to a CIFS-mounted drive, you may see errors that resemble the following:
This may be due to missing extended attributes on the CIFS mount.
To resolve this issue, perform the following steps:
/etc/fstabfile so that the CIFS mount uses the
user_xattroption. For more information about this option, read the mount command's manual page.
remount mountcommand to remount the CIFS mount.
lsattr /CIFS_mount command returns the following error, the mount does not support extended attributes:
A mount that does not support extended attributes will not function with cPanel's backup.
Can I control when backups run?
To choose which days to run backups and how many backups to retain, use the Scheduling and Retention section of the Backup Configuration interface (Home >> Backup >> Backup Configuration).
- You must manually alter the times at which backups run.
- You can manually edit the dates on which backups run in the
To choose the time at which backups run, manually edit the
root user's crontab.
For example, by default, the backup runs at 2:00 am. To change this time to 3:30 pm, run the following commands:
crontab -lcommand to retrieve the time at which the Backups crontab runs. You will receive output that is similar to the following example:
- Run the
crontab -ecommand to open the cron editor.
0 2 * * * /usr/local/cpanel/bin/backupline to resemble the following line:
For more information about the time syntax of Crontab, read the Wikipedia Cron page.