04-08-2015 08:41 AM
Hi all,
I'm trying to create a script to manage SLP for HA needs.
It is very simple to change STU into SLP steps, but I am not able to add or remove a step from an existing SLP. Have you an idea ?
I'am running on RHEL, with NBU 7.6.0.2 and my script run on the master server.
Here is my existing SLP (TEST_Gautier) with 3 steps.
ROOT@spvlmnb:rmgr> nbstl TEST_Gautier -l
TEST_Gautier *NULL* 0 0x0 7
0 STU-SO-R609-DCV-EXC *NULL* *NULL* 0 1 *NULL* 0 0x0 0 0 0 1 Default_24x7_Window *NULL* *NULL*
1 STU-SO-DCV-DCV-EXC *NULL* *NULL* 0 1 *NULL* 0 0x0 1 0 0 2 Default_24x7_Window *NULL* *NULL*
1 STU-K7-R609-DCV_copy NetBackup *ANY* 0 1 *NULL* 0 0x0 2 0 0 3 Default_24x7_Window *NULL* *NULL*
I swap (successfully) STU from firsts 2 steps
ROOT@spvlmnb:rmgr> nbstl TEST_Gautier -modify -residence STU-SO-DCV-DCV-EXC,STU-SO-R609-DCV-EXC,STU-K7-R609-DCV_copy
ROOT@spvlmnb:rmgr>
ROOT@spvlmnb:rmgr> nbstl TEST_Gautier -l
TEST_Gautier *NULL* 0 0x0 8
0 STU-SO-DCV-DCV-EXC *NULL* *NULL* 0 1 *NULL* 0 0x0 0 0 0 1 Default_24x7_Window *NULL* *NULL*
1 STU-SO-R609-DCV-EXC *NULL* *NULL* 0 1 *NULL* 0 0x0 1 0 0 2 Default_24x7_Window *NULL* *NULL*
1 STU-K7-R609-DCV_copy NetBackup *ANY* 0 1 *NULL* 0 0x0 2 0 0 3 Default_24x7_Window *NULL* *NULL*
I thought that this command, with only 2 STU will delete 3rd step... But it did not (2 tries)
ROOT@spvlmnb:rmgr> nbstl TEST_Gautier -modify -residence STU-SO-DCV-DCV-EXC,STU-SO-R609-DCV-EXC
Errors found in storage lifecycle policy definition:
error 37: operation requested by an invalid server
Exit status: 1564(Storage lifecycle policy contains errors)
ROOT@spvlmnb:rmgr> nbstl TEST_Gautier -modify -residence STU-SO-DCV-DCV-EXC,STU-SO-R609-DCV-EXC,__NA__
Errors found in storage lifecycle policy definition:
error 1572: Storage unit must be specified for this operation
Operation Index: 3
Exit status: 1564(Storage lifecycle policy contains errors)
Any ideas ?
Thank you !
Solved! Go to Solution.
05-12-2015 01:59 AM
You can try the following commands. I have created a test SLP with 2 operations and then modified the SLP to add a 3rd operation followed by removing one of the operations from it.
--> Below command will create SLP named TEST_SLP with a backup and a duplication operation.
nbstl TEST_SLP -add -v -M nbmaster1 -uf 0,1 -residence stu_adv_nbmaster1,nbmaster1-hcart2-robot-tld-0 -source 0,1
-->Below command will modify the above SLP and add another duplication operation to it. (This will modify the SLP version. The same happens from the GUI as well)
nbstl TEST_SLP -modify -v -M nbmaster1 -uf 0,1,1 -residence stu_adv_nbmaster1,nbmaster1-hcart2-robot-tld-0,stu_msdp_nbmaster1 -source 0,1,2
-->Below command will remove one duplication operation from the SLP (again the version number would automatically be modified)
nbstl TEST_SLP -modify -v -M nbmaster1 -uf 0,1 -residence stu_adv_nbmaster1,stu_msdp_nbmaster1 -source 0,1
In your example you could specify the "-uf" and the "-source" switches and this should help you remove the operation that you are trying to remove from the SLP.
*Note: You cannot delete an operation from a particular SLP version without modifying the version number. You can only modify a particual SLP version to use a different storage unit as compared to the storage unit configured in the SLP
04-08-2015 09:53 AM
Hi Gautier,
We can surely remove the operations from GUI but there is no option available in CLI. Making use of __NA__ wont delete the operation anyways.
I can suggest you to once perform the deletion using GUI but using java console. When you perform the delete look at the Java prompt i.e. the black screen which is open. It will show you the commands it is running in order to delete the operation.
04-08-2015 04:02 PM
Nice idea, I will try that !
Thank you.
04-14-2015 01:27 AM
Unfortunaly, the command is not displayed in DOS window :\
04-14-2015 01:52 AM
Locate Debug.properties file on the machine where you are running Java Console.
Ensure these lines are uncommented:
printcmds=true
printCmdLines=true
debugMask=0x00040000
Change the last line to:
debugMask=0x0C000000
Close Java GUI and open/logon again.
Make some changes to SLP in the GUI.
The command(s) will be logged in nbjlogs.
On my laptop, the path is :
C:\Program Files\Veritas\NetBackup\logs\user_ops\nbjlogs
Hope this helps!
05-07-2015 05:17 AM
Hello Marianne,
Thank you for this tip, i will try ASAP
05-07-2015 05:40 AM
I don't think that's achievable by nbstl. Refer to http://www.symantec.com/docs/HOWTO106282, it states nbstl "does not create a new version" of which adding a new operation will do that.
It also mentions bpadm is the interactive way of doing it from cmd... but I am curious to know what you can find from the Java console - maybe by some binary files? :)
05-11-2015 05:53 AM
Hello Watsons,
In the same howto you have "If an administrator uses nbstl to change an SLP, nbstl creates a new version by default."
You can change active version with nbstl, but it is not the default behaviour. Confirmed by old tests
05-11-2015 07:06 AM
Hi Marianne,
Unfortunaly, there is no intersting commands in this file. I did a "grep" about my SLP name without succes. I looked at all /usr/openv/netbackup/bin/ lignes without clue about an answer.
05-12-2015 01:59 AM
You can try the following commands. I have created a test SLP with 2 operations and then modified the SLP to add a 3rd operation followed by removing one of the operations from it.
--> Below command will create SLP named TEST_SLP with a backup and a duplication operation.
nbstl TEST_SLP -add -v -M nbmaster1 -uf 0,1 -residence stu_adv_nbmaster1,nbmaster1-hcart2-robot-tld-0 -source 0,1
-->Below command will modify the above SLP and add another duplication operation to it. (This will modify the SLP version. The same happens from the GUI as well)
nbstl TEST_SLP -modify -v -M nbmaster1 -uf 0,1,1 -residence stu_adv_nbmaster1,nbmaster1-hcart2-robot-tld-0,stu_msdp_nbmaster1 -source 0,1,2
-->Below command will remove one duplication operation from the SLP (again the version number would automatically be modified)
nbstl TEST_SLP -modify -v -M nbmaster1 -uf 0,1 -residence stu_adv_nbmaster1,stu_msdp_nbmaster1 -source 0,1
In your example you could specify the "-uf" and the "-source" switches and this should help you remove the operation that you are trying to remove from the SLP.
*Note: You cannot delete an operation from a particular SLP version without modifying the version number. You can only modify a particual SLP version to use a different storage unit as compared to the storage unit configured in the SLP
05-12-2015 02:10 AM
Changing Debug.Properties has worked well for me. I could find cmd version in the log for everything I did in the GUI.
Mmmm.... thinking about it - I think I may have changed the file on the master as well as on my laptop.
Will try again when our lab master is up and running again...
05-12-2015 03:32 AM
Arghhhh, I feel silly :(
You're right, I cannot change steps without -uf and -source. It is obvious with your post -_-'
Thank you very much for your help.
Regards.
05-12-2015 03:34 AM
Hi Marianne,
It is not necessary to do this test. The answer was provided previously.
Thank you for your posts !