cPanel WebHost Manager control panel can be configured to run scheduled full backup for hosted websites automatically, or webmaster can manually download or generate full website backup through cPanel console. When backing up full and complete website contents, all files and directories on the web server’s root will be included in the backup, potentially making the backup file size grows big.

However, some files and/or directories on the website’s root directory is not critical for reliability and availability of the website, and can be skipped or excluded during backing up process to reduce and contain the file size of backup created.

Since cPanel/WHM version 11.24, the popular web hosting control panel allows user to specify files and folders to excluding from been included in backups during cpbackup-exclude.conf file. Note that cpbackup-exclude.conf configuration only works for full backups of a website. It does not apply to Home Directory backups.

To use the the cpbackup-exclude.conf configuration file to exclude some files or directories from backups, follow these steps in the guide provided by cPanel:

  1. If it does not already exist, create the file cpbackup-exclude.conf in the home directory of the user who owns the files or directories you wish to exclude.

    For example, type:

    touch /home/user_name/cpbackup-exclude.conf

  2. Inside the file, type each item you wish to exclude from backups, one per line. If you enter a directory name, all files inside the directory will be excluded from backups.

    Tip 1: Directories should not have a trailing slash

    Tip 2: Simple shell wildcard characters are allowed for matching control.

    Example of the cpbackup-exclude.conf configuration file content:

    */.wysiwygPro_*
    */core.[0-9] */core.[0-9][0-9] .MirrorSearch
    .cpan< .cpanel/caches .cpanel/datastore .cpcpan .wysiwygPro_* access-logs core.[0-9] core.[0-9][0-9] public_ftp/.ftpquota