How to remove user/account from cPanel backups (cpbackup)

cPanel Control Panel

Sometimes you may be required to remove a user from cPanel backups due to inode usage or directory size, in order to do that you can use the web interface to exclude those users in WHM, but i prefer to do everything through the backend, and for those of you who maybe want to write a shell script or something, you may need this as well.

There are two files you can use to remove a user or exclude specific directories from cPanels backup (cpbackup), those two files are:


This is the file where you can specify specific users that are excluded from daily backups. One user per line.


This is where you can specify specific folders to be excluded from backups. Since everything in this file is passed via pkgacct which uses tar -X (–exclude-from) /directory/cpbackup-exclude.conf.

Each entry in that file needs to be a PATTERN that tar understands. Here’s the info page for tar WRT its implemetation of exclude:

You can also place one of these files in the users home directory as cpbackup-exclude.conf

I’m currently working on a script that will scan through the entire home directory of a cpanel server and output the results to a file showing each users inode usage. From that script it will also add any users over a specified inode count to the cpbackup-userskip.conf file. Once I have that posted you will have a way to see how to use the file.


Orlando, FL

Did this post help you?

Give back and rate it for me!

Related Posts