How to avoid backing up these type of files

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,723
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
I would love to find a way to avoid cpanel back up to not back up .tar.gz back ups files that have been sitting on an account.

The files look like this:

backup-1.26.2014_20-19-49_username.tar.gz

Is there a way to not back these up but still back up other .tar.gz files.

I use incremental backups for this server.
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
97
78
India
cPanel Access Level
Root Administrator
Twitter

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
Hello :)

Yes, as mentioned in the previous post, you can exclude certain files from backups, and even use wildcards to exclude certain file names or file types:

Backup Exclusions

Thank you.
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,723
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Thanks, I know about being able to block files. Sorry I should of mentioned that.

I more specifically trying to do this file type and am trying to figure out how.

backup-1.26.2014_20-19-49_username.tar.gz

Can I block anything that has the word back up in it and is a tar.gz?

*-1.26.2014_20-19-49_*.tar.gz

It seems like I can only do:

*.tar.gz

Which would block all .tar.gz files.

Maybe I can block just files are that are certain size?

For example all .tar.gz files that are over 20 mb
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
You can't exclude files by their size, but you are welcome to submit a feature request for that via:

Submit A Feature Request

You could block all files that start with "backup-" in the account's home directory.

Thank you.
 

jortiz565

Active Member
Oct 31, 2012
28
0
1
USA
cPanel Access Level
Root Administrator
Hello,

I have a question about excluding some files in the new backup system.
If we want to avoid for example all files in home with extension .gz.tar we just add these line?:

*.tar.gz
?

If we want to block specific extension inside user his home directory including sub directories we need to use the wildcard? Something like:

*/*.tar.gz

I'm right?

Thanks,
Jonathan
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
Hello,

Yes, wildcards are accepted in the cpbackup-exclude.conf file. The examples you provided should work without issue.

Thank you.