pkgaccount and cpbackup-exclude.conf

TaneNZ

Active Member
Apr 11, 2007
37
0
156
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?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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).
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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
 

david_s5

Member
Aug 3, 2005
6
0
151
Confusing!

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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
 

aarondwyer

Well-Known Member
Verifed Vendor
Mar 26, 2005
73
0
156
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
 

Mango45

Active Member
Apr 21, 2009
42
1
58
Canada
cPanel Access Level
Website Owner
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:

GreenBean

Registered
Jan 2, 2011
1
0
51
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,
 

kejebe

Registered
Jul 31, 2010
4
0
51
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.