cpbackup-exclude.conf working?

Smith Nevil

Registered
Oct 17, 2017
2
0
1
India
cPanel Access Level
Root Administrator
This is the entry in /etc/cpbackup-exclude.conf

Code:
cat /etc/cpbackup-exclude.conf
*/.wysiwygPro_*
*/core.[0-9]*
.MirrorSearch
.cagefs*
.cpan
.cpanel/caches
.cpanel/datastore
.cpcpan
.sqmailattach
access-logs
And I see this in the script /scripts/pkgacct
Code:
        # means we've already excluded the stuff it replaces from the

            if ( $isbackup || $isuserbackup ) { Cpanel::SafeSync::build_cpbackup_exclude_conf( $homedir, $user ); }
            "$homedir/cpbackup-exclude.conf",
            $Cpanel::SafeSync::global_exclude

Whenever I take backups I can see the excluded directories in the backup. for example ".cpanel/caches"


Code:
tar -tf /home/cpmove-xxx.tar.gz | grep ".cpanel/caches"
cpmove-xxx/homedir/.cpanel/caches/
cpmove-xxx/homedir/.cpanel/caches/filesys/
cpmove-xxx/homedir/.cpanel/caches/filesys/~
cpmove-xxx/homedir/.cpanel/caches/filesys/~.stat
cpmove-xxx/homedir/.cpanel/caches/filesys/~home~xxx
cpmove-xxx/homedir/.cpanel/caches/filesys/~home~xxx.stat
cpmove-xxx/homedir/.cpanel/caches/ns_cache_net
cpmove-xxx/homedir/.cpanel/caches/dynamicui/
cpmove-xxx/homedir/.cpanel/caches/dynamicui/paper_lantern_en_.cache
cpmove-xxx/homedir/.cpanel/caches/config/
cpmove-xxx/homedir/.cpanel/caches/config/_etc_cpanel_ea4_paths.conf___default_equal_space_seperated_config
cpmove-xxx/homedir/.cpanel/caches/statcache_persistant
cpmove-xxx/homedir/.cpanel/caches/user_manager/
cpmove-xxx/homedir/.cpanel/caches/rewriteinfo


 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hi @Smith Nevil

It looks as though you're testing this with pkgacct which does not respect the exclude files.

Please take a look at the documentation here: How to Exclude Files From Backups - cPanel Knowledge Base - cPanel Documentation

The following notes go over this:

Notes:

  • If you initiate a Home Directory backup in cPanel's Backup interface (cPanel >> Home >> Files >> Backup), the global and local exclude files do not affect the contents of the backup file.
  • If you perform a backup with the /scripts/pkgacct script, the global and local exclude files do not affect the contents of the backup file.