10-18-2016 11:03 AM
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
Solved! Go to Solution.
10-20-2016 08:39 PM - edited 10-20-2016 08:40 PM
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
10-20-2016 11:13 PM
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.
10-18-2016 01:40 PM
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
10-18-2016 07:06 PM
10-19-2016 08:02 AM
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.
10-20-2016 05:06 AM
Simple answer is: There's no supported way to do so.
10-20-2016 08:39 PM - edited 10-20-2016 08:40 PM
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
10-20-2016 11:13 PM
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.
10-21-2016 12:00 AM
Thanks Mike
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
Steve
10-21-2016 07:51 AM
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.
10-23-2016 07:27 PM
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
Steve
03-06-2017 08:41 AM
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.