Forum Discussion

Arjun_nbkup's avatar
14 years ago

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 ...
  • CRZ's avatar
    14 years ago
    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...?  :)