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.

Question about cpbackup-exclude.conf

Discussion in 'Workarounds and Optimization' started by Nick57, Oct 29, 2011.

  1. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi, not sure if this is the right forum but because I want to optimize the backup process i guessed so...

    I hope someone can tell me what the correct entry's would be in /etc/cpbackup-exclude.conf to exclude for all users in /home to skip files and folders.

    I tried but it doesn't work and not sure if it is because I use FTP backup to another server.
    I make full backups every day from all accounts.

    [it works when doing only 1 account with the cpbackup-exclude.conf file in the user folder]
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    @Infopro

    Thanks, I have read that, but to give an example any folder anywhere in the tree will be excluded with the notation [foldername] but only folders higher then public_html/ !!!

    notthisfolder

    but i haven't figured out how to exclude the tmp folder in the root of the account!

    The documentation says: Directories should not include leading or trailing characters of any kind, including slashes or periods.

    Any ideas?
     
    #3 Nick57, Nov 1, 2011
    Last edited: Nov 1, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I'm not certain I understand, since the example of public_ftp shows that a folder that isn't public_html can be put into the exclusion file.

    If you want /home/username/tmp not to be included, then you would put:

    Code:
    tmp
    Have you tried to simply use that folder name and then make a backup to see the results?
     
  5. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    @cPanelTristan: Yes, I have tried this and retrieved the backup file local and unzipped the account to compare.

    This is the content of the cpbackup-exclude.conf file;

    .cpanel/caches <- this folder is excluded in the backup
    public_ftp <- still there
    tmp <- still there
    */.spam <- this folder is excluded in the backup
    */.Drafts " "
    */.Junk " "
    */.Trash " "
    */.trash " "
    */error_log <- This file is excluded in any level after public_html
    */deprecation_* "" ""
    */temp_CACHED_* "" ""
    typo3temp <- This Folder is excluded in any level [tested 3 levels deep] after public_html

    As you can see, your documentation is a bit confusing to me, because it does exclude the folder .cpanel/caches
    But the documentation says: Directories should not include leading or trailing characters of any kind, including slashes or periods.

    Does it need to be in the notation 'tmp' see this document I found in another thread here in the forum.
    /http://www.nada.kth.se/cgi-bin/info?%28tar.info%29exclude
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you try the following to see if this works?

    Code:
    public_ftp/*
    tmp/*
    If it also doesn't work, I'll test it out further to see the results.
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    These all work fine and are not in the Full Backup homedir:
    I've just tested it myself to be sure.
     
  8. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi, I have done a new test with the following content in the cpback-exclude.conf

    .cpanel/caches
    public_ftp/*
    tmp/*
    */.spam
    */.Drafts
    */.Junk
    */.Trash
    */.trash
    */error_log
    */deprecation_*
    */temp_CACHED_*
    */ENABLE_INSTALL_TOOL*
    typo3temp
    *.tar.gz
    *.tar
    *.iso
    *.img
    *.tmp

    But both the folder public_ftp and tmp are still in it.
    I also found out that it didn't exclude the tmp folder under mail.

    Seems it works fine for everything under the public_html folder.

    * However all the .Draft, .Junk and .Trash folders are excluded for every mailbox.... [that's what I want anyway] but why does it work for those folders and not for the tmp folder?

    Hope you can find it. :)
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    According to the Docs linked above:
    *.tmp <- does not work.
    tmp <- does work.
    public_ftp/* <- does not work.
    public_ftp <- does work.

    */error_log <- does work.
    error_log <- does work.

    There does seems to be some inconsistency here with this, I agree. Unless we're missing something of course.

    http://go.cpanel.net/bugs <- this does work as well. :)
     
  10. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    tmp
    public_ftp

    Both don't work, but maybe you have older whm?
    Actually, did you test this on your server with an account or are you just mention what is in the doc?
     
  11. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Found it, the correct notation has to be:

    .cpanel/caches
    */public_ftp
    */tmp

    Ok, I will post here my findings and cpbackup-exclude.conf content.
    To exclude any folder in the root use */
    The other notations are working fine for everything under public_html.
    *under the mail folder it now exclude also the tmp folder for each mailbox together with the .Drafts, .Trash and .Junk... [yippie]

    I have tested with this configuration and created test folders 3 levels deep, all works fine.

    .cpanel/caches
    */public_ftp
    */tmp
    */.spam
    */.Drafts
    */.Junk
    */.Trash
    */.trash
    */error_log
    */deprecation_*
    */temp_CACHED_*
    */ENABLE_INSTALL_TOOL*
    typo3temp
    *.tar.gz
    *.tar
    *.iso
    *.img
    *.tmp

    Cheers.
    Hope this is of any help for someone else struggling.
     
    #11 Nick57, Nov 1, 2011
    Last edited: Nov 1, 2011
Loading...

Share This Page