cancel
Showing results for 
Search instead for 
Did you mean: 

command for bpplinclude....

Arjun_nbkup
Level 3

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

1 ACCEPTED SOLUTION

Accepted Solutions

CRZ
Level 6
Employee Accredited Certified
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...?  :)

View solution in original post

7 REPLIES 7

kunal
Level 4
Employee
Hi Arjun,

I just tried to add path to a policy both ways, that is from the GUI and using bpplinclude. In either case it adds the new path at the bottom of the list. (on NBU 6.5.5)

I was wondering if there is a specific reason why you want it in an order?

Regards,
Kunal

Arjun_nbkup
Level 3
Hi Kunal,

Thanks for your mail.

Using GUI, we can insert new path above the old path.

Backup Selection tab --> Click on the old path --> Click Insert button --> Add a path or directive which is to be inserted --> Click Add button --> And click OK.

By doing the above steps, I am able to add a path above the path which is already defined.

Now, am trying to do the same using command line interface.

There is no specific reason behind this, but am wondring whether we can insert a path from command line.

Thanks in advance

Regards
Arjun

CRZ
Level 6
Employee Accredited Certified
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...?  :)

Will_Restore
Level 6
I was going to suggest this rather roundabout method.  Thanks for the confirmation!

Arjun_nbkup
Level 3
Hi,

Chris,  Wrobbins, thanks.

I would like to work with the pain...

Am trying to work with the steps / information which you have provided but with no luck.. Please, can you be more detail in scripting so that it can be worked.

And i was wondering why " -insert " option not there along with " -add, -delete, -modify "

I have a question:
Can we write a script which can replace the old path to new path.. The new path should contain old path ( just or similar to -add, or - modify  )

Thanks in advance..

Regards

Arjun

David_McMullin
Level 6
{install path}\netbackup\db\class\"POLICY"\includes contains the includes data paths

edit and move lines around as you wish...

NOTE - if you add ANY spaces at the end of a line - IT WILL NOT BACK IT UP!

This allows you to have more control of which pieces are backed up first.

I have done this for both the includes  file and the clients file to manually manage what gets processed first.

Arjun_nbkup
Level 3
Hi David,

Thank you for your idea.

I am trying to get a method to edit the Backup Selection using command line which is more flexable than GUI.

I appriciate it.

Please let me know if the same can be done using command line.

Let me explain you clearly:

In the backup selection of a policy, if the path is like this as shown below:
/OLD_PATH_1
/OLD_PATH_2

Now am trying to add new path or directive called /NEW_PATH and the path should be above the OLD_PATH1.
This, am able to do by using GUI by using the option called " insert ".

The out put should be like this:

Backup Selction tab:
/NEW_PATH
/OLD_PATH1
/OLD_PATH2

Is there any command to get the above..


Thanks in advance.

regards

Arjun.