To exclude specific files and directories from cPanel backups, you can follow these steps:
-
Using a text editor from the command line or the cPanel File Manager, create a file named
cpbackup-exclude.conf
in the user's home directory. -
Open the
cpbackup-exclude.conf
file and add the following lines to exclude common backup files and directories:
*.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
- Save the changes to the
cpbackup-exclude.conf
file.
By following these steps, the files and directories listed in the cpbackup-exclude.conf
file will be excluded from future cPanel backups. You can add additional lines to exclude any other items you want from the backups.
Please note that excluding certain files and directories from backups should be done with caution, as it may affect the integrity and completeness of your backup data. Make sure to review the exclusions carefully before implementing them.