Skip to main content

Exclude backing up specific filetype globally with cpbackup-exclude.conf

Comments

5 comments

  • Infopro
    Yes. :) The documentation should be of some use: How to Exclude Files From Backups - cPanel Knowledge Base - cPanel Documentation
    0
  • mvandemar
    I read the documentation, as indicated in my post. I wasn't totally clear on it though. Why, for instance, do the file specific exclusions start with "*/"?
    */.wysiwygPro_* */core.[0-9]
    In the example I posted I did not specify that, does that make a difference? -Michael
    0
  • Infopro
    Yes it makes a difference. From the docs: The /etc/cpbackup-exclude.conf file exclude files with a filespec relative to anywhere that the backup script functions. To exclude files or directories from your backups for all user accounts, add those files or directories to the /etc/cpbackup-exclude.conf file. The backup system excludes the following files and directories for all users' backups by default:
    Add the items you asked about to the file on the specific account:
    *.mp3 *.tar.gz *.zip
    Next, assuming you have .mp3's on the account, take a backup. Download it and check it for .mp3's.
    0
  • mvandemar
    Next, assuming you have .mp3's on the account, take a backup. Download it and check it for .mp3's.

    The issue is that the account is over 100GB, the backup process is dying before completing, and we're winding up with a 0 byte backup. Those files are taking up ~70Gb of the space, so I was hoping that excluding them would allow the backup to complete, but either the pattern isn't working, or it's still not enough trimmed off. I will create a smaller test cpanel with those exclusions and see if it works on there. Thanks. -Michael
    0
  • cPanelMichael
    The issue is that the account is over 100GB, the backup process is dying before completing, and we're winding up with a 0 byte backup. Those files are taking up ~70Gb of the space, so I was hoping that excluding them would allow the backup to complete, but either the pattern isn't working, or it's still not enough trimmed off.

    Hello @mvandemar, The "*" character represents a wildcard. For instance, let's say you add:
    *.mp3
    This will exclude any file that ends with ".mp3". I added this line to /etc/cpbackup-exclude.conf on a test system and confirmed that a file named "123.mp3" in the "/home/$username/public_html" directory was excluded from the backup generation. Thank you.
    0

Please sign in to leave a comment.