cPanel - Exclude Files From Backup Wizard

  Print

How To Exclude Files From Being Backed Up In The cPanel Backup Wizard



When using the cpanel Backup or Backup Wizard (Full Backup) tool, you'll back up lots of files/folders which you won't necessarily want included in the backup. These can include previous backups, email backups (emails are better backed up through your email client) and system files which don't make up an important part of your website content. There is a way (that exists outside of the Backup tool) by which you can specific specific directories to be excluded from all future backups made using the backup tools.

To do this, create a text file named cpbackup-exclude.conf (you can do this either using FTP, SSH or the File Manager tool in cPanel)


For an individual cPanel account, add the file into the /home/cpanelusername/ directory (the top directory in the cPanel account)


You can then add the relative directory of the files/folders you want to exclude. If, for example, you want to exclude the /home/yourweb/public_html/backups/ folder and the /home/yourweb/public_html/oldfiles.zip folder, the cpbackup-exclude.conf file would be created in the /home/yourweb/ folder and have this code:


public_html/backups/
public_html/oldfiles.zip



To have these exclusions apply server wide, add the file to the /etc/ directory (in this case, you'll need root access to the server and the file needs appropriate root permissions). Note that the file may have been created by default. In this case you can just edit it. If you want to stop the cPanel email folder from being backed up, you simply add /home/*/mail/ to the bottom of the file, so it looks something like this


*/.wysiwygPro_*
*/core.[0-9]
.MirrorSearch
.cpan
.cpanel/caches
.cpanel/datastore
.cpcpan
.sqmailattach
access-logs
public_ftp/.ftpquota
/home/*/mail/


Did you find this article useful?  

Related Articles

© Crucial