Im a noob in regards to NBU. Master and 6 Media servers all on linux. Using SL500, backing up on LTO5.
In my env we have decom a lot of servers. Im trying to remove clients from policies. But when i search for the clients under the policy there is only one. In the activity monitor i see multiple clients for the same policy. Hyper-V to be precise, Primary VM Identifier is "VM display name". to me it seems like there is a query to which clients to get and what not to. since i cant find the clients under the client tab, i tried to do a query for exclusion.
|AND NOT ComputerName StartsWith "brmwp-ctxgs001"|
but when i Test Query, it still comes under the "Included" and not "exclude". Backup job still ran for brmwp-ctxgs001 today even tho i had excluded it yesterday. Job ran in the evening if it means anything and i made the query around 11am yesterday.
I do not have access to the Hyper-V clients.
Any help would be appreciated. Any article that points me to the right direction would be help too.
Solved! Go to Solution.
With SCVMM, you can't manually browse for VM's. You can only select them automatically through a Hyper-V Intelligent Policy query, so that is normal.
I never got clarification that you tried to rebuild your query, you can copy this policy to a new test policy and delete the schedules if you want. Did you try to rebuild your query and move the OR statement at the very bottom, so that all of your "AND" statements are together and are in relation to the first statement. This way the query is read as
VMHost StartsWith "brmwp-hypv"
AND NOT ComputerName StartsWith "BRMWD-RDDEV"
AND NOT ComputerName StartsWith "BRMWP-HYP02"
AND NOT ComputerName StartsWith "BRMWP-HYP03"
AND NOT ComputerName StartsWith "BRMWP-HYP04"
AND NOT ComputerName StartsWith "BRMWP-HYP05"
AND NOT ComputerName StartsWith "BRMWP-HYP06"
AND NOT ComputerName StartsWith "BRMWP-HYP07"
AND NOT ComputerName StartsWith "BRMWP-HYP08"
AND NOT ComputerName StartsWith "BRMWU-SQL01"
AND NOT ComputerName StartsWith "brmwp-ctxgs01"
OR ComputerName StartsWith "brmwp-sqlbak01"
I could be wrong about this but from my understanding (especially when you aren't using an advanced query with parenthesis to specify order)
When the OR statement is above AND NOT ComputerName StartsWith "brmwp-ctxgs01" I think the query reads that as ComputerName StartsWith "brmwp-sqlbak01" AND NOT ComputerName StartsWith "brmwp-ctxgs01" which this would not cause the VM to be excluded because it doesn't pass that statement because "brmwp-ctxgs01" does not start with brmwp-sqlbak01 thus the VM is still included.
AND NOT ComputerName StartsWith "brmwp-ctxgs001" ---did not work
it does not give me the option to choose "DisplayName", the only thing that starts with D is description. Is it because its a Hyper-V policy? But under the Hyper-V tab, Primary Vm identifier is VM display name.
|AND NOT VMHost StartsWith "brmwp-ctxgs001"|
The above is what im trying now.
Ah you don't have Display name because your server type is System Center Virtual Machine Manager and not Hyper-V Standalone/Cluster.
The queries are case sensitive, have you tried AND NOT ComputerName StartsWith "BRMWP-CTXGS001"
Another thing to try would be to change your VM identifier from Display Name to Host Name, (this could make you need to change your other queries that are working) then try this
AND NOT ComputerName StartsWith "brmwp-ctxgs001"
I think I might have a fix for you. I use VMware Intelligent Policies, not Hyper-V but the principles are the same.
I notice that your actual query is using all uppercase for the computer names, but the query results show all lowercase. NetBackup is case sensitive in many areas and I think this is another one. I've done a quick test changing the case in a query and I can have machines either include or exclude based on whether the case used in the query matches the case of the machine name.
You could do a quick and dirty test by just modifying one of the computer names in the query to lowercase and then test the query. Using these queries is really powerful, but there are some fun quirks like this.
Hope this helps,
i thought that might be an issue as well with upper and lower case so i made another query with all uppercase yesterday and today the jobs still ran for those clients. What i dont understand is that in "Test query" the clients still show up as Included.
AND NOT ComputerName StartsWith "BRMWP-CTXGS002"
This is what i changed it to and still ran job.
Would you happen to know or point me to, where are all the clients listed in Hyper-V?
To my understanding, you download netbackup client on Hyper-V or cluster and there is file where you list all the clients?
Since the servers have been decom can i just remove them from the Hyper-V list, if thats possible?
yes, ive been browsing to choose the client. While browing the client is lower case. Ive added lower case and upper case for clients hoping one would work. after adding it i click Ok so the changes take affect and then go back to to the policy and run Test Query and the clients show up as Included. :(
If you've tried doing a manual browse (instead of automatically selecting via query) and decommisioned systems are still showing up, it is starting to sound like a caching issue. There isn't a file you can edit, but there is a way to refresh the cache with what actually exists versus what is cached.
When you do a manual browse for Virtual Machines, you should get the screen below (mine has no systems as I don't have Hyper-V .... this is a dummy policy):
What is the date and time in the "Last Update" field on this screen? Also notice the little Refresh icon to the right of that field? Click that and wait until it has refreshed and the "Last Update" field has been repopulated. Are the decommissioned systems now gone?
That should force NetBackup to go out and query through Hyper-V what actually exists, and refresh it's cache. I've had to do similar in VMware before. There is a process that is supposed automatically refresh this, but can't think off the top of my head what it is (might be part of NBDisco).
Let us know if that helps,
When i click browse this is what i get, i dont see a refresh or any other options. Attached pic, not sure why i cant paste it here.
i also tried to delete from cli:
bpplclients POLICYNAME -delete CLIENTNAME
bpplclients Test -delete brmwp-ctxgs001--->works
bpplclients 771-Hyper-V-brmwp-IP -delete brmwp-ctxgs001--> Dont think this one worked because in the Test Query Client name was till present.
Ok, we are getting closer. The reason you are not seeing the refresh button that we need is that you are not actually browsing the VM's that your Hyper-V can see. From the pic you attached, I can see that what you are browsing is actually the possible values for ComputerName - so you're browsing values within the query fields.
Have a look near the top of the Clients tab on the pic you attached last. Can you see over to the left the heading "Virtual Machines for backup:"? Under that is a greyed-out "Select manually" radio button, and below that you have selected the radio button for "Select automatically through Hyper-V Intelligent Policies".
What you need to browse machines is to select the "Select manually" radio button. It is greyed out and I don't know why. It may be due to the "Server Type" you have selected. As mentioned, I don't have Hyper-V so I can't test this one out for you. Hopefully someone who uses Hyper-V can explain this one. Once you get that working, you will get the refresh button that we need.
I'll have a look through the manual and see if I can work out why. One word of note though - when you switch from automatically selecting machines to manually selecting, it will warn you and then erase your query. Best bet is to right-click your policy and make a copy of it so you can play with the copy without breaking your original.
Hope this helps,
Steve, thanks for the reply.
I made a copy of the policy, changed it to Select manually and browsed for virtual machine.
I still dont see clients. All i get is one. which i think is the cluster. Is a list supposed to populate?
For this test policy, is there a test maybe i can do? Not sure how to exclude clients.
Good - we're getting a little further each time. The screen you posted is showing the refresh button that I was talking about. It also shows the cache was refreshed yesterday at around 1:16pm. Does your original problem policy still show the old decommissioned servers that shouldn't be there? I'm hoping the cache refresh has cleaned them up. As far as I know, the refresh is system-wide, not just related to the single policy.
For the screenshot you posted with the manual browse, what happens when you click on brmwp-vmm02.corp.bro...? Does it list the Hyper-V clients on the right hand side when you do that? As I say, I don't have Hyper-V, so I'm hoping someone who does can chime in. Below is another screenshot of my VMware policy config. For me, I have to expand the objects on the left, and when I do (going through VCenter server, and then ESX hosts) I will see the individual VM's on the right: