How to exclude files/folders from cPanel backups

cPanel offers the possibility to exclude files and folders from all users backups or only from specific users backups. This can help if you know that some directories contain large files. Also, it is useful to exclude temporary directories and files.

cpanel backup folders
WHM backup interface

Server-wide exclude

With this method, you will exclude from backup files and folders for all users backups. The file of interest is:


The files/folders excluded by default are:


For example, you can exclude the /home/*/tmp/ directories by adding


to the list in /etc/cpbackup-exclude.conf

Individual exclude

To exclude files/folders only for specific users, you must edit the file /home/username/cpbackup-exclude.conf

# nano /home/username/cpbackup-exclude.conf

For example, to exclude directory /home/username/softaculous_backups/ and file /home/username/public_html/temp.html use:



cPanel Docs

Leave a Reply