NetWorker

Last reply by 09-13-2020 Solved
Start a Discussion
3 Silver
2397

Two questions about scripting ‘nsradmin’ to manage Protection groups

I am testing some Powershell scripts with ‘nsradmin’ command to create Policy/Workflow/Action configurations. I have two issues about protection group management.

  1. When running successfully the sub command ‘upgrade group: protection_group_1’, the group ‘protection_group_1’ appears in the workflow definition when using the sub command ‘print type: NSR protection policy workflow; policy name: policy_name; name: workflow_name’. But the group assignment is never shown in the workflow Properties in Networker Administration GUI. Is this normal?
  2. Is there a way to check whether a Protection Group has been assigned to a workflow without looking through every workflow? The workflow assignment information is not included in the output of the sub command ‘print type: NSR protection group; name: protection_group_name’.

Maybe I should use a different CLI command? Any help is appreciated. Thanks

Solution (1)

Accepted Solutions
2493

A final update: I still have the same display issue with our production server while on its clone there is no display issue: the protection group created by the CLI command would show up immediately in the workflow. My further tests showed that on the production Networker server, once the scheduled backup action was executed according to the scheduler, the protection group will appear in the workflow as well, but not before the action execution. I can’t explain why. Anyway, this is just a display issue as the protection group is in fact assigned to the workflow by the CLI commands.

As per the second question about how to check if a protection has not been assigned to a workflow yet, I didn’t get any answer from DELL/EMC support. So far I use a stupid work-around to avoid going through all the workflows to check: a dedicated empty Policy and Workflow was set up. I try to assign the protection group to this dedicated policy/workflow, if it succeeds, that means the group has not been assigned to other workflow yet. Otherwise it has been assigned already. Then I remove the group from this special policy/workflow. You might wonder why I don’t try to assign directly the group to its final destination policy/workflow. This is because my script will create the policy/workflow later. I don’t want to create the policy/workflow first and then realize the group is not an available one.

I will close this threat by marking this update as the solution. Thanks everyone for your help.

View solution in original post

Replies (11)
5 Tungsten
1999

Using nsradmin is o.k. but you need to know exactly what and how you use it. Use 'help' once you entered interactive mode.

Start with 'types'. This command will show you all configured rescource types, not all possible resource types.

But I personally would never try creating or modifying a policy/action/workflow from nsradmin. As you will see, there is no such resource with such names when you use the 'types' command. My personal guess to modify these resources is the 'nsrpolicy' command ... which I have not used so far. But this would result in a very long command which you do not really want to use.

When you run the 'upgrade group: protection_group_1' command I actually have no idea, which resource you want to modify. BTW - to change an attribute in nsradmin, the proper command would be 'update ....' not 'upgrade...'.

 

With respect to naming conventions - may I strongly recommend that you create 'self-describing names' which point directly to the fact what these resources are doing. This makes you admin so work much easier. So instead of using a policy like 'silver' or 'gold' which are nothing else but marketing buzzwords, let me suggest that you delete them and use 'DATA_TO_CLONE' and 'DATA_NOT_TO_CLONE'. Then use workflow names like "1800_MO_FULL_INT_2400" which clearly indicate that this workflow will start every day at 18:00 with a full on monday and incrementals for the rest of the week. Finally, use the same names for the groups.

IMHO this naming convention is much more straight forward and better to understand than the 'valuable' precious metal names which marketing wants to use. And I guess this is the case for 90+ percent of all NW installations. Just delete the policies and groups you do not use.

 

 

1995

@bingo.1Thanks for your reply and pointing out my typo. Yes it is 'update group: Protection_Group_1', instead of 'upgrade group:… ...'. I am using the sub command to assign a client protection group to a newly defined workflow.

I am able to use CLI command 'nsradmin' in scripts to create new policies, workflows and actions, although I am sure this is the best way to do the backup job definition in a script. The CLI command guide showed a few of examples of creating such resources. I think the 'update group' issue is a bug as the command ran successfully and I can see the assignment in CLI command interface, just not in Networker Administration GUI. I will open a case with DELL/EMC when I have time.

Thanks for the naming convention suggestion, we do have our naming conversion. I didn't use our names in the my question to avoid confusions.

And any idea about how to find out if a client protection group has been assigned to a workflow yet without looking through every workflow?

1989

As there is no type 'nsr workflow' you cannot query for such resource. In fact the workflow information is inside the 'NSR Protection Policy'.
To see the secrets, just switch on 'option hidden' and enjoy the lengthy line while you search the entry 'workflowgroups' within the attribute 'policy definition'.
The only chance i see is to update the whole string with an appropriate "workflowgroups" parameter.

Once again may I suggest you to better use the 'nsrpolicy' command. Ask support for more details.

 

1986

Thanks 'bingo.1'. Yes I do use 'NSR Protection Policy', 'NSR Protection Policy Workflow' and 'NSR Protection Policy Action' resources with 'nsradmin' when creating and modifying these resources. The CLI command 'nsrpolicy' might work as well. As I need to micro manage most settings in these resources, I prefer the command 'nsradmin'. In fact, I tried to use 'nsrpolicy workflow update -p policy_name -w workflow_name -g new_prorection_group' to assign a protection group to a workflow. It completed as well without error. But no group assignment is shown in the Networker Administration GUI. Just like with the command 'nsradmin'. This must be a bug, I will open a case. Thanks for suggesting the "Option hidden'. I turned on all the options, but still can't find the workgroup assignment information for a protection group with 'nsradmin': print type: NSR protection group; name: protection_group_name'. Are there other commands which can show protection group information?
1984

Please have a look at the screenshot ...

example.jpg

1979

Sorry, I can't see the attached image. Could you please repost it? Thanks
1973

I can see the screenshot now. Thanks. Yes from a policy or more preciously from a workflow, you can see which protection group has been assigned to the workgroup. But what I need to know is from a protection group whether it has been assigned to any workflow, without going to look into every workflow to see if it is in. Just like from an action, you can see to which policy and to which workflow the action belongs.
1970

Sure. I understand your intention but this is all I can deliver so far. Please ask support if there is a possibility and share the result.

 

1968

Okay. NP. Thanks a lot for your help. I will open a case with the group assignment GUI issue. And I will ask the question about how to find whether a group is assigned yet.

Latest Solutions
Top Contributor