Command line (UNIX/AIX) for deleting client in multiple policies
Created: 04 Jun 2010 | 5 comments
NBU = 6.5.5
I was hoping someone has a startup script that allows me to pass the client/server name to a script and be able to prompt me to confirm a removal of a client in a script. I know that bppllist command is for the policy name and bppclients command is for the client name to add / remove. Any assistance will help.
Also, is there a populuar site that I can share and learn command line scripting for NetBackup?
Thank you
Jay Son
Discussion Filed Under:
Comments
I haven't got any scripts for
I haven't got any scripts for operation you described but you can try this:
1. Policies by client name
/usr/openv/netbackup/bin/admincmd/bppllist -byclient CLIENTNAME | grep CLASS | cut -d' ' -f2
2. Delete client from policy
/usr/openv/netbackup/bin/admincmd/bpplclients POLICY -delete CLIENTNAME
NetBackup Commands (Unix, Linux and Windows)
ftp://exftpp.symantec.com/pub/support/products/Net...
I have these commands. I was
I have these commands. I was hoping for a script where I can pass the CLIENT name. The removed its self from its POLICY.
to put Marek's suggestion
to put Marek's suggestion into a fairly simply bourne shell script, you would type up something like this:
#!/bin/sh
main ()
{
for clientname in $@ ; do
/usr/openv/netbackup/bin/admincmd/bppllist -byclient $clientname | grep CLASS | cut -d' ' -f2
done
}
delpolicy ()
{
for policy in $@ ; do
/usr/openv/netbackup/bin/admincmd/bpplclients POLICY -delete $policy
done
}
help ()
{
echo $0 "clientname [clientname] [clientname] ....
exit 0
}
if $1 = "-?" ; then
help
else
main
fi
exit 0
now that is without giving an error message in the case of bad clientnames or no clientnames, only showing help information in the case of a -? commandline switch for the first argument in the program. This listing can be named whatever you wish - help automatically will used the invoked name of the script to self-explain. I *think* I typed that up right. If you have issues, I will gladly doublecheck that and fix it if necessary. This is assuming that Marek's commandlines are accurate - I honestly am just a UNIX admin who is learning the ropes on NetBackup so I am more helpful on the administration side, where I have years of experience.
HTH
Kris Long
Unix Geek
IBM GSC
If I understand the request
If I understand the request correctly, you want the CLIENT to remove itself from policies?
Since the policies live on the master server, the commands need to be executed on the master server. This means that you will have to enable rsh/ssh comms at root lecel without password between clients and master - major security risk....
Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows.
Handy NBU links
here's a script
I posted a script here and you asked questions about it. Have you tried it?
Remember.....Google is your friend!
Would you like to reply?
Login or Register to post your comment.