How to Exclude Files from Backup of a cPanel Server?

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:

  1. Log in to your cPanel account.

  2. Within the "FILES" area, select the "File Manager" option.

https://www.milesweb.in/hosting-faqs/wp-content/uploads/2021/03/file_manager-1024x239.png

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.

  1. Select the +File button located in the top-right corner.

https://www.milesweb.in/hosting-faqs/wp-content/uploads/2022/01/cp-add-new-file.jpg

 

A new window with the title "New File" will emerge.

  1. Input the name "cpbackup-exclude.conf" for the new file and then click on "Create New File."

https://www.milesweb.in/hosting-faqs/wp-content/uploads/2022/01/cp-backup-exclude-new-file.png

The cpbackup-exclude.conf file will now be visible in the file list.

  1. Right-click on the cpbackup-exclude.conf file and choose "Edit" from the context menu. The file will be accessible in the text editor.

  2. 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

  1. After that, select "Save Changes" and end the file.

https://www.milesweb.in/hosting-faqs/wp-content/uploads/2022/01/cp-backup-exclude-save-file-1024x223.png

cPanel will automatically exclude these files and directories from the server backup.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 365