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.
cpbackup-exclude.conf can be edited for current user or globally, the files are located (usually) at the following location :
-> Input directory paths without a trailing slash.
-> Simple shell wildcard characters are allowed for pattern matching.