Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Apr 2007
    Posts
    37

    Default pkgaccount and cpbackup-exclude.conf

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by TaneNZ View Post
    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?
    cpbackup-exclude.conf works for /scripts/cpbackup (full server backup), not /scripts/pkgacct (full website backup).

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by cPanelDavidG View Post
    cpbackup-exclude.conf works for /scripts/cpbackup (full server backup), not /scripts/pkgacct (full website backup).
    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. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    3

    Default Confusing!

    Quote Originally Posted by cPanelDavidG View Post
    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
    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. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by david_s5 View Post
    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
    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. #6
    Member This forum account has been confirmed by cPanel staff to represent a vendor. aarondwyer's Avatar
    Join Date
    Mar 2005
    Location
    Brisbane
    Posts
    72

    Default

    Is there anyway that you could make the "Home Directory" backup from within cPanel use the cpbackup-exclude.conf solution.?

    Aaron

  7. #7
    Member
    Join Date
    Apr 2009
    Posts
    7

    Default

    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
    Last edited by Mango45; 08-09-2010 at 12:45 AM.

  8. #8
    Registered User
    Join Date
    Jan 2011
    Posts
    1

    Default Re: pkgaccount and cpbackup-exclude.conf

    Quote Originally Posted by Mango45 View Post
    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.

    Mango
    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. #9
    Member This forum account has been confirmed by cPanel staff to represent a vendor. aarondwyer's Avatar
    Join Date
    Mar 2005
    Location
    Brisbane
    Posts
    72

    Default Re: pkgaccount and cpbackup-exclude.conf

    Hi GreenBean

    David already listed the link above, you can do directories.

    Excluding Files from Backup Using cpbackup-exclude.conf

    Aaron
    http://backup-smart.com Automatically And Safely Backup All Your cPanel Websites To Your Local Computer
    Free 7 Day Trial of this new software. MAC, PC, Linux

  10. #10
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    Default Re: pkgaccount and cpbackup-exclude.conf

    I use Incremental Backup and have the following in /etc/cpbackup-exclude.conf

    public_html/templates/_cache
    In my nightly cpbackup email I see:

    Skipping public_html/templates/_cache
    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:
    du -hs _cache 6G.
    Without data:
    du -hs _cache 195M.
    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.

Similar Threads & Tags
Similar threads

  1. cpbackup-exclude.conf ignored until AFTER account size limit checked?
    By finallygreen in forum New User Questions
    Replies: 0
    Last Post: 04-11-2011, 02:20 PM
  2. Trouble with cpbackup-exclude.conf file.
    By crazyfish in forum Data Protection
    Replies: 6
    Last Post: 07-13-2010, 08:32 AM
  3. cpbackup-exclude.conf format, missing something?
    By Lyttek in forum Data Protection
    Replies: 6
    Last Post: 03-15-2010, 08:42 AM
  4. cpbackup-exclude.conf oddness
    By stuartmcdonald in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 02-05-2010, 03:23 PM
  5. cpbackup-exclude.conf format
    By deadlock in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-30-2008, 04:29 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube