11-09-2016 02:02 AM
Hi
I am trying to get an exclude list put onto all our Unix Clients and having issues with one particular exclusion. I need to exclude all the .bash_history files that could reside in all the sub-directories below specific top level directories.
Note: I cannot just put in .bash_history into the exclude list as we need to back it up for some users.
Example:
Say i had this particular file listed as follows in the directory structure for /u01
/u01/testdir1/.bash_history
/u01/testdir1/testdir2/testdir3/.bash_history
How could i put that into the exclude list so it would check all sub-directories of /u01 for that file and exclude it? Is it even possible as all the tests i have done dont work. No matter what i do it backs up this file every time.
Any advice would be appreciated.
Solved! Go to Solution.
11-10-2016 07:24 PM
"Note: I cannot just put in .bash_history into the exclude list as we need to back it up for some users."
Actually I think you can put .bash_history into exclude_list , in this case.
For those you need to back it up for some users, just create another include_list file to tell NBU to backup.
NBU looks at exclude_list first to exclude everything, but will look at include_list also (if that exists) to backup whatever it's there.
11-09-2016 02:34 AM
Think you still can do something like /u01/*/.bash_history in the Unix exclude_list file
11-09-2016 05:10 AM
You want to backup the sub folder for some users, but exclude it for others?
11-09-2016 06:10 AM - edited 11-09-2016 06:13 AM
@Michael_G_AnderMichael
I had tried using /u01/*/.bash_history but it did not appear to work. I did another test and had create a file called /u01/test1/.bash_history and using the syntax /u01/*/.bash_history it still got backed up.
Had a look at the Admin Guide for Unix and Linux and didnt see anything in there or any use, neither have a found anything on the community/technote pages.
I'll keep playing..
Yeah so i want to be able to exclude a particular file from within the specific directory structure. So /u01 is the top level directory and i want to be able to exlcude .bash_history from any sub-directory of /u01 no matter if it is on the 2nd level or 5th level sub-directory.
11-09-2016 06:26 AM
Create a separate policy to backup /u01 and exclude .bash_history
(no wildcards needed)
11-09-2016 07:40 AM
11-09-2016 09:10 AM
Can you please try to update the exclude list as /u01/*/*.bash_history if its under /u01/* the .bash_history file should get exluded.Please restart the netbackup client once before taking backup.
11-10-2016 12:29 AM
Yeah guess i could do that. Trying to avoid it though if at all possible simply because i believe this should be possible. But might have to resort to this.
I had not enable any logging other than whats on a default. I'll go read up on how to do this because Netbackup is not really 'my thing'. I am doing this work because i can access all the Unix servers, not because of my Netbackup knowledge. Good job as that is not that much :)
I tried what you suggested by stopping/starting the client but made no difference. Still backing up the files.
11-10-2016 04:39 PM
Thats weird,just thinking if there anything different with excluding hidden files.
11-10-2016 07:24 PM
"Note: I cannot just put in .bash_history into the exclude list as we need to back it up for some users."
Actually I think you can put .bash_history into exclude_list , in this case.
For those you need to back it up for some users, just create another include_list file to tell NBU to backup.
NBU looks at exclude_list first to exclude everything, but will look at include_list also (if that exists) to backup whatever it's there.
11-14-2016 01:28 AM
Yeah i guess i could do this.
Was hoping you could put in a single entry to exclude a particular file in a particular directroy and its sub-directories without then having to create a load of include rules for specific users we want the file backed up for
11-14-2016 02:32 AM
If the file exists in multiple directory levels, you will need multiple entries in exclude_list:
/u01/*/.bash_history
/u01/*/*/.bash_history
/u01/*/*/*/.bash_history
You say: ".... all the tests i have done dont work."
Please show us examples of what you have tried. And please remember to create bpbkar log folder under /usr/openv/netbackup/logs on the client to see how the exclude_list is interpreted.
Increase logging level for the client to 1 to see enumeration of files in bpbkar log.