Exclude files and folders from 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.
Think carefully before you exclude anything from backups. If something goes wrong like a hard drive failure you could lose your data. You should always have backups of everything you place on any server. If you are excluding a file because of its size there are other options you can choose. Plugins in CMS programs like WordPress have great backup options that can split files to make them more manageable.
Globally exclude files and folders
To exclude files or directories from your backups for all user accounts, add those files or directories to a cpbackup-exclude.conf file.
Then place the files and directories into the file. Remember these are the files and directories to exclude from cPanel backups;
/public_html/cgi-bin /public_html/folder /public_html
Exclude files with a local exclude file
If you have a Web Hosting or Reseller Web Hosting account you can exclude files or directories from your backups for your account. To exclude files or directories from an individual user’s cPanel backups, add the files or directories to an exclude file. Name the file cpbackup-exclude.conf. If the file does not already exist, you must create it. To do this, run the following command:
Then place the files and directories into the file like so;
/public_html/cgi-bin /public_html/folder /public_html/index.html
How was this article?
You might also like
More from cPanel
Free SSL Certificates from places like cPanel or Let's Encrypt are great. When Let's Encrypt first introduces free SSL Certificates …
SWAP is a memory type that Linux NVMe VPS Servers use to process requests. Memory will be held in SWAP …
The Error: last request failed: [AUTH] Authentication failed error can be caused by a range of things. It could be …