NetWorker: How to use the nsradmin command-line utility to manage NetWorker resources

Summary: nsradmin is a command-line utility that is provided by the NetWorker software. nsradmin can be used to modify the NetWorker server resource database (nsrdb) and the client/security database (nsrladb). This KB provides a general overview of nsradmin functionality and use cases. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Overview

NetWorker resources are contained in two primary folders:
    • /nsr/res/nsrdb/ - Only found on NetWorker servers. This is the NetWorker Server Resource Database.
    • /nsr/res/nsrladb/ - Found on all NetWorker systems. This contains security configurations (peer certificate, and so on).

NOTE: On Windows operating systems, the default path for nsrdb and nsrladb is "C:\Program Files\EMC NetWorker\nsr\res."

nsradmin allows you to change, create, or delete resources from the nsrdb and nsrladb database. In order to ensure security and prevent unwanted tampering, a root or Administrator command prompt must be used. If the system user is restricted from using root or Admin command prompt, the nsrlogin command can be used. nsrlogin authenticates using accounts that are configured (either local or external) in the NetWorker authentication service. nsrlogin issues a time-based token which allows the user (if permitted) to make changes through nsradmin and use other elevated NetWorker commands:

  • Local user account: nsrlogin -u username
  • External authentication (AD/LDAP): nsrlogin -t tenant_name -d domain_name -u user_name
  • Log out: nsrlogout

Accessing nsradmin

To list all the attributes for a specific NetWorker resource, such as a client.

You can use the tool online or offline, but if you change the nsrdb or nsrladb offline, you must restart the NetWorker service to apply them.

Online:  nsradmin interacts with NetWorker daemons running on an online server in order to view or change resource attributes.
nsradmin
Online (nsrladb): By default, if no additional flags are specified, nsradmin attempts to open a connection to the nsrdb. To access the nsrladb, you must specify the client process (nsrexec).
nsradmin -p nsrexecd
Offline:  nsradmin is pointed to the relevant resource database in order to view or change resource attributes.
nsradmin -d /path_to/nsrdb
Remote: You must use the -s switch to run nsradmin on a remote NetWorker system to connect to nsradmin on another NetWorker system over the network. 
nsradmin -s remote_networker_system [-p nsrexecd]

Input File: Takes input commands from a file instead of from standard input. In this mode, the interactive prompt is not printed.

nsradmin -i file
Other functions and operations are detailed in the nsradmin section of the NetWorker Command Reference Guide, available through: https://www.dell.com/support/product-details/product/networker/docs

Logging

Changes to the nsrdb that are performed through nsradmin are logged in the NetWorker server's /nsr/logs/rap.log (default: C:\Program Files\EMC NetWorker\nsr\logs\rap.log on Windows operating systems)
 

Using nsradmin

nsradmin modes

nsradmin can be used in two modes:

  • Command-mode (default) and visual-mode; Command-mode is the common method used to view and operate nsradmin. No additional options are required to use this mode.
  • Visual-mode provides a fullscreen command-line interface which can be used to view and manage the NetWorker resources. This method may be useful when specific resources or attributes: values are unknow; however, it is limited in batch processing operations. To enter visual-mode, enter visual at the nsradmin prompt:
[root@nsr ~]# nsradmin
NetWorker administration program.
Use the "help" command for help, "visual" for full-screen mode.
nsradmin> visual
NOTE: This KB only provides instructions for command-mode.

 

NetWorker resource types

To get a list of known resource types. Enter type at the nsradmin prompt. Example from a NetWorker server:

nsradmin> type
                 Known types: NSR, NSR auditlog, NSR client, NSR client fix,
                              NSR cloneconfig, NSR Data Domain, NSR device,
                              NSR directive, NSR hypervisor, NSR label,
                              NSR license, NSR lockbox,
                              NSR NAS discovery task, NSR notification,
                              NSR policy, NSR pool, NSR Protection Group,
                              NSR Protection Policy, NSR recover, NSR Rule,
                              NSR savesets count, NSR SCG, NSR schedule,
                              NSR service, NSR stage, NSR Storage Node,
                              NSR task, NSR usergroup, NSR VMware proxy,
                              NSR vproxy log aggregate;

Operations within nsradmin are as follows:

         bind [query]
         create attrlist
         delete [query]
           edit [query]
           help [command]
          print [query] (set current query)
         server [name]
           show [attrlist]
          types
         update attrlist
         append attrlist
           quit
         visual [query]
         option [list]
          unset [list]
              . [query]
              ? [command]
           exit

Where:
        query ::= attrlist
        attrlist ::= attribute [; attribute]*
        attribute ::= name [: [value [, value]* ]

Querying NetWorker resources

To query a NetWorker resource, enter the following command at the nsradmin prompt:
nsradmin> print type:NetWorker_resource; attribute:value 
All attributes for the resource are identified by the attribute: value combination that is returned.
For example, to query all the attributes for a NetWorker client resource that is named Pluto, type the following:
nsradmin> print type: NSR client; name: win-srvr01.amer.lan

Listing and filtering nsradmin results

To list specific attributes for all client resources, enter the following command at the nsradmin prompt:
nsradmin> . type: NSR client; name: client_name 
nsradmin> show 
nsradmin> print

To list all clients in a particular protection group, enter the following command at the nsradmin prompt:

nsradmin> . type: nsr client; protection group list:Protection_Group_Name
nsradmin> show name 
nsradmin> print

To print a listing of all registered clients and their operating systems, enter the following command at the nsradmin prompt:

nsradmin> . type: NSR client 
nsradmin> show name; OS 
nsradmin> print

To list all devices that are in service mode, enter the following command at the nsradmin prompt:

nsradmin> show name
nsradmin> print type: NSR device; enabled: Service

Hidden options can be displayed by entering the following before querying any resource type:

nsradmin> option hidden

To reset the query specifications set by entering show attribute, enter show:

nsradmin> show

Updating resources

To update a NetWorker resource, enter the following at the nsradmin prompt:
nsradmin>. type:NetWorker_resource; attribute:value 
nsradmin> update action; attribute1:value; attribute2:value
You can update multiple attributes for a resource. Attribute: value combinations are separated by a semicolon (;). For example, to modify the save set and backup command that is used by a client:
nsradmin> . type: nsr client; name: win-srvr01.amer.local 
nsradmin> update save set:"MSSQL:DELL"; backup command:nsrsqlsv
NOTE: Specify attribute names and values correctly, including the proper case for attribute values. If the attribute name and value are not specified correctly, the attribute is not updated, and no error message is provided.

Deleting Resources

CAUTION: Ensure that you are only deleting resources which are supposed to be deleted. NetWorker resources with dependencies block you from deleting them if the dependency still exists. Also, some resources cannot be deleted while NetWorker service's are running or nsradmin online-mode is used. It is a good idea to create a backup of the /nsr/res/nsrdb (server) and /nsr/res/nsrladb (client) before changing these databases.

To delete any resource, enter delete after setting the resource type; for example:

nsradmin> . type: NetWorker_Resource; attribute:value
nsradmin> delete
NetWorker resources that have dependencies fail to be deleted; notifying you of what prevented the deletion.
Example:
nsradmin> delete type: nsr pool; name: DD_Bootstrap 
name: DD_Bootstrap; 
Delete? yes 
delete failed: Pool `DD_Bootstrap' cannot be deleted because it has active volumes in the media database.
NOTE: You must resolve the dependencies either by updating or removing them as well. In some instances it may be necessary to use nsradmin in offline mode; however, this deletes a resource regardless if dependencies are resolved. Once services on the server are restarted, the deleted resource will no longer appear.

Creating Resources

To create a resource, enter the following:
nsradmin> create type: Networker_resource; name:resource_name; attribute1:value; attribute2:value 
create? yes

Additional Information

Affected Products

NetWorker

Products

NetWorker Series
Article Properties
Article Number: 000203325
Article Type: How To
Last Modified: 14 Feb 2025
Version:  11
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.