To exclude files or directories from your user backups, perform either of the following actions:
The global and local exclude files apply to the account backups that you manage in WHM's Backup section (WHM >> Home >> Backup) and the Download a Full Website Backup feature in cPanel's(cPanel >> Home >> Files >> Backup).
To exclude files or directories from your backups for all user accounts, add those files or directories to the
/etc/cpbackup-exclude.conf file. The
/etc/cpbackup-exclude.conf file excludes the files that you specify relative to any location from which the backup script runs.
The backup system excludes the following files and directories for all users' backups by default:
*/.wysiwygPro_* */core.[0-9] .MirrorSearch .cpan .cpanel/caches .cpanel/datastore .cpcpan .sqmailattach access-logs public_ftp/.ftpquota
To exclude files or directories from an individual user's backups, add the desired paths (relative to the user's home directory) to the
cpbackup-exclude.conf file in the user's home directory, with one entry per line.
If the file does not already exist, you must create it. To do this, run the following command:
For example, to exclude the
/home/username/example/ directory and the
/home/username/dir/example.php file from the
username user's backups, create the following
When you exclude a directory path, you must include the trailing slash.