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.

pkgaccount and cpbackup-exclude.conf

Discussion in 'Data Protection' started by TaneNZ, Jul 20, 2009.

  1. TaneNZ

    TaneNZ Active Member

    Joined:
    Apr 11, 2007
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    I've been trying to get cpbackup-exclude.conf working on an account, but it simply refuses to obey me.

    I add some stuff to exclude, run pkgacct .. and the stuff is still there. When I check the gtar process with ps, it appears as though the cpbackup-exclude.conf file isn't being passed as an argument:

    /bin/gtar -c -f - .

    There's no -X /home/user/cpbackup-exclude.conf.

    Any ideas?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    cpbackup-exclude.conf works for /scripts/cpbackup (full server backup), not /scripts/pkgacct (full website backup).
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I want to clarify this post. When I performed further testing, triggering a Full Website Backup via the cPanel interface does obey cpbackup-exclude.conf. However, using /scripts/pkgacct does not obey cpbackup-exclude.conf. This is one of those cases where the cPanel Full Website Backup feature slightly differs from /scripts/pkgacct.

    Also, documentation for cpbackup-exclude.conf is now available at:

    CpbackupExclude < AllDocumentation/WHMDocs < TWiki
     
  4. david_s5

    david_s5 Member

    Joined:
    Aug 3, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Confusing!

    I still do not get it!

    Would you help interpret this:

    We have our backups set to Incremental Backup Enabled

    Every night we get an email that says:

    [cpbackup] Started at Tue Aug 25 01:00:01 2009
    [cpbackup] Running dir & file backup with target : /backup/cpbackup/daily
    [cpbackup] Running account backup with target : /backup/cpbackup/daily
    pkgacct started.
    pkgacct version 8.3 - user : treobit - archive version: 3 - running with uid 0


    The Note on the wiki says:
    Note: This process only works for full backups of a website; it does not apply to Home Directory backups.

    Does cpbackup-exclude.conf apply or not to the Incremental Backup that says it is running [cpbackup] AND pkgacct
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Because incremental backups (server backups) are generated by /scripts/cpbackup calling /scripts/pkgacct, cpbackup-exclude.conf should be obeyed. A full website backup calling /scripts/pkgacct will also obey cpbackup-exclude.conf. However, manually calling /scripts/pkgacct directly via the command line will not obey cpbackup-exclude.conf.
     
  6. aarondwyer

    aarondwyer Well-Known Member

    Joined:
    Mar 26, 2005
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane
    cPanel Access Level:
    Root Administrator
    Is there anyway that you could make the "Home Directory" backup from within cPanel use the cpbackup-exclude.conf solution.?

    Aaron
     
  7. Mango45

    Mango45 Active Member

    Joined:
    Apr 21, 2009
    Messages:
    40
    Likes Received:
    1
    Trophy Points:
    6
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Hi everyone,

    Sorry to dig up an old thread but I was trying to figure out how to make pkgacct respect cpbackup-exclude.conf when run directly via the command line. This thread showed up so much in my Google searches that I figured I'd post the answer.

    I've been sifting through the above mentioned scripts and I've found the way to make it work. Simply use one of these commands:

    /scripts/pkgacct username /path/where/it/should/go backup
    /scripts/pkgacct username /path/where/it/should/go userbackup

    As far as I can tell, backup is what cPanel does for its scheduled backups, and userbackup is what it does when a user creates a backup via the cPanel interface. I'm not really sure of the differences but I did notice an obvious difference which is the file name:

    backup gave me a file name like: username.tar.gz
    userbackup gave me a file name like: backup-8.8.2010_19-47-01_username.tar.gz
    using neither of these gave me a file name like: cpmove-username.tar.gz

    There are other differences too - both backup and userbackup resulted in a file that was consistently about 12KB smaller than the other. I'm sure it's not a big deal, but if anyone knows why, I would be interested.

    Anyway, I hope this helps someone :)

    Mango
     
    #7 Mango45, Aug 8, 2010
    Last edited: Aug 8, 2010
  8. GreenBean

    GreenBean Registered

    Joined:
    Jan 2, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello, Quoting Mango this thread keeps poping up and I need to resolve some questions here, so I am hoping someone can help. We are trying to move a site from a California Server to New York Server. The site is 160GB(YIKES). If we could exclude a folder we could greatly reduce this file size. /scripts/pkgacct has always worked best. Is there a way to exclude a folder?

    thanks in advance,
     
  9. aarondwyer

    aarondwyer Well-Known Member

    Joined:
    Mar 26, 2005
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane
    cPanel Access Level:
    Root Administrator
  10. kejebe

    kejebe Registered

    Joined:
    Jul 31, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I use Incremental Backup and have the following in /etc/cpbackup-exclude.conf

    In my nightly cpbackup email I see:

    One would think when it says Skipping it means it is skipping.

    Yet once the backup is complete if I go and look at the backup for public_html/templates/_cache the directory structure was all copied over. It did in fact skip the data that is within each dir by why is it even copying over the dirs?

    With data:
    Without data:
    Granted it is still saving a lot of time by not copying over every individual file but it appears to me cpbackup is still wasting time traversing the directory structure of _cache and copy that over.

    Any ideas as to how to get it to skip everything?

    Thanks,
    Kevin.
     
Loading...

Share This Page