The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exclude directory from System Backup

Discussion in 'Data Protection' started by roba, Jul 9, 2015.

  1. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    Hello,

    is it possible to exclude a directory from the System Backup?

    https://documentation.cpanel.net/display/1148Docs/System+Backups

    The documentation mentions a way how to add directories, but not how to remove.

    I would like to remove /usr/local/cpanel/3rdparty/mailman because it eats a lot of space and is redundant (the Mailman lists are already backuped with corresponding user accounts).

    Thank you,
    Robert Bareš
     
  2. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    Update: I found the source of those directories

    /usr/local/cpanel/Cpanel/Backup/SystemResources.pm

    The Mailmail directory is added here:

    Code:
    my @DIRS = (
        $Cpanel::ConfigFiles::VALIASES_DIR,
        $Cpanel::ConfigFiles::VDOMAINALIASES_DIR,
        $Cpanel::ConfigFiles::VFILTERS_DIR,
        $Cpanel::ConfigFiles::FTP_PASSWD_DIR,
        Cpanel::Mailman::Filesys::MAILMAN_DIR(),
        qw(
          /etc/cpanel
          /etc/namedb
          /var/lib/rpm
          /var/lib/named/chroot/var/named/master
          /var/named
          /var/cpanel
          /var/spool/cron
          /var/cron/tabs
          /var/spool/fcron
          /var/log/bandwidth
          /usr/share/ssl
          /etc/ssl
          /var/ssl
          )
    );
    
    However I assume it is not a good idea to touch these files? Either I will break future cPanel updates of this file or my change will get overwritten with then next update...

    :confused:
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    There's no native support for excluding directories from system backups. Manually removing that line from the file you referenced might work, but the file is overwritten during cPanel updates. I suggest opening a feature request for this via:

    Submit A Feature Request

    Thank you.
     
Loading...

Share This Page