How do I exclude logs directory without excluding other directories that end in logs from backup?

jimhermann

Well-Known Member
Jan 20, 2008
71
2
58
Folks,

How do I exclude logs directory without excluding other directories that end in logs from backup?

Current /etc/cpbackup-exclude.conf entry:

logs/*

Current Log file examples:

Skipping public_html/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js
Skipping public_html/wp-content/plugins/buddypress/bp-blogs/actions
Skipping public_html/administrator/components/com_actionlogs/controllers

BTW, I think that logs/* is a recommended default exclusion, so other people should have the same problem.

Thanks,

Jim
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,496
1,009
313
cPanel Access Level
Root Administrator
Hey there! We don't currently have anything recommended for "logs" in the public docs here:


As you've found, that would keep anything with "blog" from being included in the backups, which is likely not the behavior the admin would want.

If you have a specific log directory you want to exclude for all user accounts, you'd need to add it to the /etc/cpbackup-exclude.conf file as it is relative to the /home/username path. So, if all your users had a directory named /home/username/unnecessary_log you would just add "unnecessary_log" to the exclude list.

If you've made that change and it isn't working as intended please let me know and I'd be happy to do some more testing on my end for you.