Free Subscription via Email:

How To Exclude Files Or Folders From An cPanel/WHM Backup Job

Being a server administrator requires some good tech skills as you face various scenarios requiring not-so-commonly used solutions, few days ago I faced a similar situation where a certain directory was needed to be skipped from regular WHM/cPanel backups. Luckily WHM/cPanel do provide a simple cpbackup-exclude.conf file which can be edited to exclude files and directories from the backup job, all that needs to be done is to input and save paths to items to be excluded via Shell/WinSCP.

cPanel Backup Config File Location

cpbackup-exclude.conf can be edited for current user or globally, the files are located (usually) at the following location :

Global Config :
/etc/cpbackup-exclude.conf

User Specific Config :

/home/user/cpbackup-exclude.conf

Edit cpbackup-exclude.conf File

Do note :

-> Input directory paths without a trailing slash.
-> Simple shell wildcard characters are allowed for pattern matching.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><span>
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.
  • Lines and paragraphs break automatically.

More information about formatting options

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.