cancel
Showing results for 
Search instead for 
Did you mean: 

How to Remove Client from VMware Query Based Policy via CLI

I am curious if this holds true for even a VMware query based policy when it comes to removing a client from a policy via CLI...

Delete client from policy
/usr/openv/netbackup/bin/admincmd/bpplclients POLICYNAME -delete CLIENTNAME

Tags (2)
2 Solutions

Accepted Solutions
Accepted Solution!

Re: How to Remove Client from VMware Query Based Policy via CLI

Hi Mike,

I did a little bit of digging regarding this, as I'd never thought about doing this via command line.  I stumbled across this link:

Populating VMware Intelligent Policy Query

http://engineering.skybettingandgaming.com/2016/06/24/scripting-veritas-netbackup/

If you scroll down to the section titled "Populating VMware Intelligent Policy Query", you can see they used the bpplinclude command to add VM's to a VMware policy like this:

bpplinclude ${policy} -add vmware:/?filter=(Displayname Contains "nms0" OR Displayname Contains "nmsdb0") AND NOT Powerstate Equal poweredOff AND NOT Displayname Contains "stg" AND NOT Displayname Contains "tst"

I had a look at the options for bpplinclude, and as it also has the "-delete" option I'm wondering if this might work?  I haven't got time to try it at the moment to see if it does, and I don't have a need to do this via command line - but interested if it does work.

Steve

View solution in original post

Accepted Solution!

Re: How to Remove Client from VMware Query Based Policy via CLI

Oh. you'd like to go that deep. Ok. You can modify query via CLI https://www.veritas.com/support/en_US/article.v85982076_v118238945 and add exception but it's quite hard to write it just from scratch. It might be extremely long and complicated. If you just want to remove one client it's better to do it via GUI if you're going to script something you can run jnbSA, exclude unwanted client from the Query and  check jnbSA's log to see how NetBackup translated you query into command.

View solution in original post

10 Replies

Re: How to Remove Client from VMware Query Based Policy via CLI

Hi ,

To remove the client from backup , just edit your Vmware backup query mentioned in the backup policy and exclude that particular client form the backup.

Please refer this Guide : NetBackup7.6_Admin.Guide_VMware

Page Number : 92 

 

Kesavan.P

Re: How to Remove Client from VMware Query Based Policy via CLI

You did not create your query based policy via cli, right?
So why would you use cli to modify it?

Re: How to Remove Client from VMware Query Based Policy via CLI

Because I would like to. I quite honestly wasnt looking for a condescending remark, but just a simple answer. You have no idea what is occuring on the backend which is the reason for the question nor do you really need to know in order to give a more respectable answer. Quite rude on your part.

Thank you for your reply...I will investigate my question elsewhere as this has apparently turned into quite the hostile forum as of late.

Re: How to Remove Client from VMware Query Based Policy via CLI

Simple answer is: There's no supported way to do so.

 

Accepted Solution!

Re: How to Remove Client from VMware Query Based Policy via CLI

Hi Mike,

I did a little bit of digging regarding this, as I'd never thought about doing this via command line.  I stumbled across this link:

Populating VMware Intelligent Policy Query

http://engineering.skybettingandgaming.com/2016/06/24/scripting-veritas-netbackup/

If you scroll down to the section titled "Populating VMware Intelligent Policy Query", you can see they used the bpplinclude command to add VM's to a VMware policy like this:

bpplinclude ${policy} -add vmware:/?filter=(Displayname Contains "nms0" OR Displayname Contains "nmsdb0") AND NOT Powerstate Equal poweredOff AND NOT Displayname Contains "stg" AND NOT Displayname Contains "tst"

I had a look at the options for bpplinclude, and as it also has the "-delete" option I'm wondering if this might work?  I haven't got time to try it at the moment to see if it does, and I don't have a need to do this via command line - but interested if it does work.

Steve

View solution in original post

Accepted Solution!

Re: How to Remove Client from VMware Query Based Policy via CLI

Oh. you'd like to go that deep. Ok. You can modify query via CLI https://www.veritas.com/support/en_US/article.v85982076_v118238945 and add exception but it's quite hard to write it just from scratch. It might be extremely long and complicated. If you just want to remove one client it's better to do it via GUI if you're going to script something you can run jnbSA, exclude unwanted client from the Query and  check jnbSA's log to see how NetBackup translated you query into command.

View solution in original post

Re: How to Remove Client from VMware Query Based Policy via CLI

Thanks Mike Smiley Happy

I don't have a need for this (I do all mine with VIP's in the GUI), but I think we've proved to the original poster that there are ways to do this - just not sure if he'll be back based on his last post Smiley Wink

Steve

Re: How to Remove Client from VMware Query Based Policy via CLI

Thank you both for the kind and respectful responses. That is exactly what I was looking for...A) is it possible and B) if it is how can it be accomplished.

Re: How to Remove Client from VMware Query Based Policy via CLI

Hi Backup-botw,

No problems.  Don't forget (C) - if you try it and it works, pop back and let us know for future refernce Smiley Wink

Steve

Re: How to Remove Client from VMware Query Based Policy via CLI

Old thread but just for the record, for those looking to exclude some VMs from a VIP - easier way is to make the VIP better to accomodate exceptions.

@Marianne- your reply was on the same lines that I was thinking.

Both above solutions are in-elegent in my view. A better one: add the following to your query -

AND NOT Annotation Contains "BACKUP_DISABLED"

This will not include any VM from vSphere which have the string "BACKUP_DISABLED" in their Notes section. How you want to add/remove the string in the Notes section in vSphere depends on you: manual edit, PowerShell, API call, etc.

I use this in my environment. I also have a powershell script sending me a daily list of VMs not backed up via a VIP.