command for bpplinclude....
Hi every one...
Is there a command to insert path to a policy from command line... For example, when we use the command " bpplinclude <policy_name> -M <master_server> -add /usr/home " it adds the path in the end/bottom of all the paths which are already defined.
And if use Insert button from the GUI it adds the path above all the paths/top which are already defined.
And if we use " bpplinclude <policy_name> -M <master_server> -modify old_path new_path ", it will modify the old to new.
I just need to insert a new path above all the paths.
So, my question is, is there a command so that the path can be inserted from the command line....
Netbackup Version 6.5
Unix o/s
Thanks in advance...
Hope every one understood what i wants to say..
Thanks
Arjun
- With debugging enabled, you can see just which commands are being called, and then you can do what the GUI does on the command line.
BUT you're probably not going to like it :)
The extracted commands looked like this (with some names changed):
"/usr/openv/netbackup/bin/admincmd/bpplinclude" mypolicy -M mymaster.example.com -delete -f "/usr/openv/netbackup/logs/user_ops/root/logs/jbp-02879281384607637053000000014-G5a4Nf"
"/usr/openv/netbackup/bin/admincmd/bpplinclude" mypolicy -M mymaster.example.com -add -f "/usr/openv/netbackup/logs/user_ops/root/logs/jbp-02879281384610848161000000016-I5a4Nf
So what that means is the GUI grabbed the OLD backup selections (before you start editing) and outputs them to a file, THEN grabs the NEW backup selections (after you hit CLOSE) and writes THOSE to a file. It then uses those two files as arguments for the "-f" command line switch to `bpplinclude` as you can see above.
(It also helpfully left those files hanging around in /usr/openv/netbackup/logs/user_ops/root/logs for you/me to double check - indeed they are lists of backup selections as described above if you are really bored and want to find and `cat` them)
So how do you get the backup selection list in the first place? Well, `bpplinclude <policy> -l` KINDA works, but you'd have to get rid of all the "Include:" strings... `awk` could do that, I guess...
So I guess your answer is: yeah, it's POSSIBLE, but it's a giant pain and you'd have to REALLY want to do it in order to work out the scripting you'd inevitably have to undergo.
Good luck...? :)