Typically, backups encompass the preservation of data from all web files on a server. However, when utilizing a cPanel server, you have the option to omit certain files from the backup process. To exclude files from the backup, follow these steps:
-
Log in to your cPanel account.
-
Within the "FILES" area, select the "File Manager" option.
The File Manager interface will launch in a new tab. In this interface, you need to generate a new file within the home folder of your hosting.
-
Select the +File button located in the top-right corner.
A new window with the title "New File" will emerge.
-
Input the name "cpbackup-exclude.conf" for the new file and then click on "Create New File."
The cpbackup-exclude.conf file will now be visible in the file list.
-
Right-click on the cpbackup-exclude.conf file and choose "Edit" from the context menu. The file will be accessible in the text editor.
-
Insert the following code into the file:
*.jpa
backup-*.tar.gz
cpmove-*.tar.gz
site-*.tar.gz
*/com_akeeba/backup/*
*/backupbuddy_backups/*
public_html/cache/*
tmp/*
logs/*
softaculous_backups/*
*/wp-content/uploads/wpcf7_captcha/*
*/wp-content/widget-cache/*
*/wp-content/cache/*
*/wptsc-cachedir/*
*/wp-content/ai1wm-backups
Note: The files and directories listed above are associated with popular backup utilities like BackupBuddy and Akeeba. You can customize this list by adding additional lines to exclude other items from cPanel backups.
Please be aware that the backup system excludes these files and directories for all users' backups by default:
*/.wysiwygPro_*
*/core.[0-9]
.MirrorSearch
.cpan
.cpanel/caches
.cpanel/datastore
.cpcpan
.sqmailattach
access-logs
public_ftp/.ftpquota
-
After that, select "Save Changes" and end the file.
cPanel will automatically exclude these files and directories from the server backup.