Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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]
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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?
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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. :)
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
According to the Docs linked above:
Directories should not include leading or trailing characters of any kind, including slashes or periods.
*.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. :)
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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?
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
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.
 
Last edited: