NSRADMIN(8) Legato NetWorker 4.0 NSRADMIN(8)
NAME
nsradmin - NetWorker administrative program
SYNOPSIS
nsradmin [ -c ] [ -i file ] [ -s server ] [ query ]
nsradmin [ -c ] [ -i file ] [ -f resfile ] [ -t typefile ] ... [
query ]
DESCRIPTION
The nsradmin command is a command-line based administrative program
for the NetWorker system. Normally nsradmin monitors and modifies
NetWorker resources over the network. Commands are entered on stan
dard input, and output is produced on standard output.
If nsradmin is started without a query it uses a default query that
selects all resources involved in NetWorker products.
OPTIONS
-c Use the termcap(5) and curses(3) packages to implement a full-
screen display mode, just like the visual command described
below.
-i file
Take input commands from file instead of from standard input.
In this mode, the interactive prompt will not be printed.
-s server
Open a connection to the named NetWorker server instead of
allowing administration of all servers. Useful to limit the
number of resources if there are many servers, or to adminis
ter when the RAP location service is not working.
-f resfile
Use the NetWorker resource file resfile instead of opening a
network connection. This should generally never be used,
except when the NetWorker server is not running. Multiple -f
and resfile arguments can be used to start nsradmin with
access to more than one file at a time.
-t typefile
Use the alternate file typefile to define RAP types.
query If a query is specified (in the form of an attribute list),
the edit operation (see below) is performed on the results of
the query. See COMMANDS, below, for more information on how
the edit command works.
RESOURCES
Each NetWorker resource is made up of a list of named attributes.
Each attribute can have zero or more values. The attribute names and
values are all represented by printable strings. Upper and lower
case is not distinguished on comparisons, and spaces are ignored
except inside the names and values.
Licensed material--property of copyright holder(s) 1
NSRADMIN(8) Legato NetWorker 4.0 NSRADMIN(8)
The format for specifying attributes and attribute lists is:
attribute ::= name [ : value [ , value ]* ]
An attribute is a name optionally followed by a colon, fol
lowed by zero or more values, with values separated by commas.
A comma at the end of a line continues the line.
attribute list ::= attribute [ ; attribute ]*
An attribute list is one or more attributes separated by semi
colons. A semicolon at the end of a line continues the line.
The list is ended by a newline that is not preceded by a comma
or semi-colon.
Here is an example of an attribute list:
name: mars;
type: NSR client;
recover access: mars, venus, jupiter;
For more information on attributes, attribute lists and the NetWorker
resource types, see the resource(5), nsrresource(5), and rap(8) man
ual pages.
COMMANDS
At each input prompt, nsradmin expects a command name and some
optional arguments. Command names can be shortened to the smallest
unique string (e.g. p for print). Command arguments are always speci
fied in the form of an attribute list. Most commands operate on a
set of resources returned by a query. The query is specified as an
attribute list which is used to match resources with the following
rules:
1) The resource must match all the given attributes.
2) If more than one value is specified the resource can match
any one of the values.
3) If an attribute is specified with no value the resource
must contain an attribute of that name.
Thus, a query:
type:NSR device;
name:mars, venus;
test
will match all resources that have a type attribute with the value
NSR device and a name attribute with a value of either mars or venus,
and an attribute test with any value.
If the query has only one name and no values (for example, if there
is no semi-colon or colon in it), then the program tries to guess a
more reasonable query. If the name is a host name, then the query
will select all the resources on the given host. Otherwise, the name
will be interpreted as a type name, and all resources of that given
type will be selected.
Licensed material--property of copyright holder(s) 2
NSRADMIN(8) Legato NetWorker 4.0 NSRADMIN(8)
create attribute list
Create a resource with the given attributes. One of the
attributes must be type to specify a NetWorker type that can
be created. The types command can be used to find out which
types a server supports.
delete [query]
Delete the resources that match the current query. If a query
is specified, it becomes the current query.
edit [query]
Edit the resources that match the current query. If a query
is specified, it becomes the current query. If the environ
ment variable EDITOR is set, then that editor will be invoked,
otherwise vi(1) will be started. When the editor exits, nsrad
min applies update, delete and create operations based on the
changes to the resources. Be careful to not edit the resource
identifier attribute, and to write the file out before exiting
the editor.
help [command]
Print a message describing a command. If no command name is
given a synopsis of all of the commands is printed.
print [query]
Print the resources that match the current query. If a query
is specified, it becomes the current query. If the current
show list is not empty only the attributes named in the show
list will be displayed.
server [servername]
Bind to the given NetWorker server name. If no server is
specified, the RAP location service will be used.
show [name; ...]
If a name list (really an attribute list with no values) is
specified, add those names to the show list. Only these
attributes will be displayed in subsequent print commands. If
no name list is given the show list is cleared, resulting in
all attributes being shown.
types Print a list of all known types.
update attributes
Update the resources given by the current query to match
attributes.
quit Exit.
visual [query]
Enter a full-screen mode using the curses(3) package to step
through commands in a perhaps more user-friendly manner than
the command line interface. You can get this mode directly
using the -c command line argument.
Licensed material--property of copyright holder(s) 3
NSRADMIN(8) Legato NetWorker 4.0 NSRADMIN(8)
option [list]
This command enables some options to change the display of
resources. With no arguments it displays the current options;
with a list of options it turns the specified ones on. The
options are: Read-only displays read-only attributes in visual
editing and creating mode. Dynamic displays all dynamic
attributes, even the normally hidden ones. Hidden displays
all attributes, even the normally hidden ones. Resource ID
displays the resource identifier on each resource, a number
that is used internally to provide sequencing and uniqueness.
unset [list]
This command turns off the specified option.
. [query]
If a query is specified, this command will set the current
query without printing the results of the query. Otherwise, it
will display the current query, show list, and server binding.
? [command]
Same as the help command above.
EXAMPLES
print type:NSR device
Print all resources of type NSR device and make this the current
query.
show type; name
Set the show list to only display the attributes type and name.
delete
Delete all resources that match the current query.
delete type:NSR device; hostname: mars
Delete the resource with attributes: type: NSR device and host
name: mars.
edit type:NSR notification
Edit all resources of type NSR notification.
SEE ALSO
curses(3), termcap(5), rap(8), rapd(8), vi(1), nsrresource(5),
nsr(8).
Licensed material--property of copyright holder(s) 4