How to exclude files and folders from automated cPanel backups

How to exclude files and folders from automated cPanel backups

There are two ways to exclude files and folders from cPanel backups. Either by using the server’s global exclude file whereas you exclude certain files and folders server wide or, by using a local exclude file in the users home directory. We’re going to cover both.

Globally exclude files and folders – cPanel backups

To exclude files or directories from your backups for all user accounts, add those files or directories to the file. /etc/cpbackup-exclude.conf In an ssh console, you can issue

nano /etc/cpbackup-exclude.conf

Then place the files and directories into the file like so;

/public_html/cgi-bin
/public_html/folder
/public_html

Free cPanel VPS License

Users local exclude file

To exclude files or directories from an individual user’s backups, add the files or directories to exclude to the file in the cpbackup-exclude.conf user’s directory, one per line.

If the file does not already exist, you must create it. To do this, run the following command:

nano /home/cpusername/cpbackup-exclude.conf

Then place the files and directories into the file like so;

/public_html/cgi-bin
/public_html/folder
/public_html

How was this article?

How to exclude files and folders from automated cPanel backups
How was this post?
cPanel VPS Server

cPanel Dedicated Servers VPS Servers

Select Language
We are currently updating our website. Please accept our apologies for any disruption you may see.
+