Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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 backing up specific filetype globally with cpbackup-exclude.conf

Discussion in 'Data Protection' started by mvandemar, Dec 21, 2016.

Tags:
  1. mvandemar

    mvandemar Well-Known Member

    Joined:
    Jun 17, 2006
    Messages:
    45
    Likes Received:
    1
    Trophy Points:
    158
    Sorry to bump an old thread, but this comes up on top in Google and I really don't see it addressed elsewhere. The examples in the documentation for cpbackup-exclude.conf all appear to do with directories. If I want to exclude all of a specific filetype globally on an account, will this syntax work?

    Code:
    *.mp3
    *.tar.gz
    *.zip
    
    Thank you.

    -Michael
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,745
    Likes Received:
    312
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. mvandemar

    mvandemar Well-Known Member

    Joined:
    Jun 17, 2006
    Messages:
    45
    Likes Received:
    1
    Trophy Points:
    158
    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 "*/"?

    Code:
    */.wysiwygPro_*
    */core.[0-9]
    
    In the example I posted I did not specify that, does that make a difference?

    -Michael
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,745
    Likes Received:
    312
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes it makes a difference. From the docs:

    Add the items you asked about to the file on the specific account:
    Code:
    *.mp3
    *.tar.gz
    *.zip
    
    Next, assuming you have .mp3's on the account, take a backup. Download it and check it for .mp3's.
     
  5. mvandemar

    mvandemar Well-Known Member

    Joined:
    Jun 17, 2006
    Messages:
    45
    Likes Received:
    1
    Trophy Points:
    158
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @mvandemar,

    The "*" character represents a wildcard. For instance, let's say you add:

    Code:
    *.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.
     
Loading...

Share This Page