Networker 8 Commands Examples

savegrp

Note: The "savegrp" command is executed on a NetWorker server.

savegrp ARTLAB

Starts backups for every client in the "ARTLAB" group and

uses the schedule defined for each client or the "ARTLAB"

group. If the group schedule exists it takes precedence.

savegrp -c monet ARTLAB

Starts a backup for the client "monet", and uses the schedule

defined for "monet" or the schedule for the "ARTLAB" group. If

the group schedule exists it takes precedence.

savegrp -l full -c monet ARTLAB

Starts an explicit full backup for the client "monet"

regardless of the defined schedule for the client or the

"ARTLAB" group.

save

Note: The "save" command is executed on a NetWorker client.

save /export/home/jeffd

Starts a backup of the "/export/home/jeffd" directory to

the default NetWorker server. Without any additional

specifications, I believe this will cause a volume from

the "default" pool to be used.

save -s bserver -p FULL -l full /export/home/jeffd

Starts an explicit full backup of the "/export/home/jeffd"

directory to the backup server named "bserver" and causes

a volume from the "FULL" pool to be used. The "-s" option

is only relevant if there are multiple backup servers

available to this client.

recover

Note: The "recover" command is executed on a NetWorker client.

recover

Enter the "recover" interactive interface to the default

backup server. This is known as "browsing" the client indexes.

The interactive interface has numerous subcommands to

facilitate selection of files to recover. Refer to the

NetWorker command line reference manual for a list of these

commands or simply enter "?" while in the interactive interface.

recover -s bserver

Enter the "recover" interactive interface to the backup server named "bserver".

recover -s bserver /export/home/jeffd/projects/OTS

Recover all the files in the "/export/home/jeffd/projects/OTS"

directory from the backup server named "bserver". NetWorker

will automatically use the appropriate combination of full

and incremental backup volumes to restore the directory.

recover -s bserver -S 14527786

Recover the saveset indicated by the SSID "14527786" from

the backup server named "bserver". An SSID identifies a

chronologically and source specific backup. SSIDs can be

determined using the "mminfo" command.

mminfo

Note: The "mminfo" command is typically performed on a NetWorker server.

mminfo -m -q "client=monet,savetime>=last week"

Display a media report of all volumes used for backups of client "monet" in the past week.

mminfo -a -r "volume,%used,pool"

Display a report of all volumes showing the volume name,

% of space used on the volume, and the pool to which the

volume belongs.

mminfo -q "client=monet" -r "ssid,name,totalsize,savetime,volume"

Display a report of all savesets from client monet, showing

the SSID, saveset name (file system or directory), total

size of the saveset, the savetime of the saveset, and the

volume it was written to.

mminfo -B

Run a defined query to report bootstrap savesets which have been generated in the last five weeks.

nsrmm

Note: The "nsrmm" command is performed on a NetWorker server.

nsrmm -m -f /dev/rmt/0cbn FULL.20020103

Mounts the volume named "FULL.20020103" on the specified

stand-alone tape drive. Presumably someone has loaded the

tape in the drive.

nsrmm -m -l -f /dev/rmt/0cbn -b FULL FULL.20020109

Writes a NetWorker label "FULL.20020109" on the tape in

the specified stand-alone tape drive, adds the volume to

the "FULL" pool, and mounts it. Presumably someone has

loaded a blank or recyclable tape in the drive. This also

adds the volume name to the media manager database.

nsrmm -u -f /dev/rmt/0

Unmount the volume in the specified device. This is a logical action – the volume remains in the device.

nsrmm -j -f /dev/rmt/0

Eject the volume from the specified device. This is a physical action.

nsrmm -o recyclable INCR.20011210

Set the volume "INCR.20011210" to recyclable mode.

nsrmm -d ENGR.OFFSITE.001

Delete the volume "ENGR.OFFSITE.001" from the media manager database.

nsrjb

Note: The nsrjb command is performed on a NetWorker server with a jukebox attached.

nsrjb

A plain "nsrjb" command shows the volumes present in the jukebox slots and in the jukebox drives.

nsrjb -d -P1 -S26

Deposit a tape cartridge from access port slot 1 (-P1) to jukebox slot 26 (-S26).

nsrjb -w -S236 -P5

Withdraw a tape cartridge from jukebox slot 236 to access port slot 5.

nsrjb -l -f /dev/rmt/0cbn B00341

Load volume B00341 into jukebox device /dev/rmt/0cbn.

nsrjb -l -f /dev/rmt/6cbn -S 26

Load a tape cartridge from jukebox slot 26 into jukebox device /dev/rmt/6cbn.

nsrjb -u -f /dev/rmt/6cbn

Unload the tape cartridge in jukebox device /dev/rmt/6cbn back to the jukebox slot it came from.

nsrjb -L -f /dev/rmt/2cbn -S 177 -b FULL

Load the tape cartridge in jukebox slot 177 into jukebox

device /dev/rmt/2cbn and write a label on it indicating

that it is in the FULL pool. This example assumes that

the jukebox has a barcode reader, that the tape cartridge

has a barcode attached, and NetWorker is configured to

automatically use barcodes for logical labels. This also

updates the media index database.

nsrjb -HE

Unload all jukebox drives and reset them.

nsrjb -IE -S307 -f /dev/rmt/4cbn

Inventory the contents of slot 307 using jukebox device

/dev/rmt/4cbn.

nsrclone

Note: The "nsrclone" command is executed on a NetWorker server.

This action requires the use of two backup devices

simultaneously, a source device and a destination device.

Source and destination do not have to be the same kind of

device or the same size volumes. NetWorker will use as

many of the destination volumes as necessary to complete

the cloning.

nsrclone -b FULLCLONE 14527786

Clone the data in the saveset identified by SSID "14527786"

onto a volume in the "FULLCLONE" pool. NetWorker identifies

the source volume, mounts it, mounts a volume from the

destination pool, then duplicates the data from source to

destination.

nsrclone -b FULLCLONE B00341

Clone the savesets from volume B00341 onto a volume in the

"FULLCLONE" pool.

nsrck

Note: The nsrck command is performed on a NetWorker server.

nsrck -c monet

Perform a consistency check and repair of the indexes for

client "monet". In NetWorker V5, between 1 and 4 check

phases are performed, depending on the current state of the

indexes. I am not certain about NetWorker V6 since the

client index database form has changed.

nsrck -F -c monet

Perform a consistency check and repair of the indexes for

client "monet" and force all phases to be performed. The

-F option also forces compression on the client indexes.

• Execute the nsrck -L7 command to recover all client file indexes.

• To recover the entire media database or an entire CFI, you should use mmrecov and nsrck –L7, respectively.

mmrecov

Note: The mmrecov command is performed on a NetWorker server.

mmrecov /dev/rmt/0cbn

Initiate the recovery of a NetWorker server’s online index

and media index from the volume loaded in /dev/rmt/0cbn.

The mmrecov utility will prompt for information regarding

the SSID and record number of the appropriate bootstrap

image on the volume. This information must be known

BEFORE initiating this process,

The SSID and record number can be determined by either of

the "mminfo" or "scanner" commands described above. Of course,

if the server is in a damaged state, the "mminfo" command

won’t work and the "scanner" method must be used. The "mminfo"

method is only useful if it is employed before damage occurs

and the information is recorded offline.

Ref#http://home.earthlink.net/~jdykzeul/docs/uuasc/networker_intro/command_line_examples.html

scanner

Note: The scanner command is performed on a NetWorker server.

scanner -i /dev/rmt/0cbn

Scan the volume in device /dev/rmt/0cbn and rebuild media and online indexes from the data found on the tape.

scanner -B /dev/rmt/0cbn

Scan the volume in device /dev/rmt/0cbn and identify

bootstrap images on it. A bootstrap image is necessary to

rebuild damaged or destroyed NetWorker server and media

indexes, as well as server resource files.

See "mmrecov" for performing such a recovery.

nsrsgrpcomp

The nsrsgrpcomp command is a command-line based program used to query

the NetWorker server’s jobs database and the savegrp log files in order

to display a savegrp completion report. The jobs database is main-

tained by the nsrjobd (8) daemon and can alternatively be queried using

the jobquery (8) command. The savegrp log files are located on the

NetWorker server machine in /nsr/logs/sg/<group_name> directory.

display savegrp completion report.

nsrsgrpcomp group1

The above command is equivalent to

nsrsgrpcomp -H -i -o -b 2048 group1

Display savegrp completion report from a specific server.

nsrsgrpcomp -s bar.com group1

List all savegroup records presently in jobs database

nsrsgrpcomp -L

List savegroup records for group ‘groupname’ presently in jobs database

nsrsgrpcomp -L groupname

Display savegrp completion report for group ‘groupname’ started at time ‘start_time’.

nsrsgrpcomp -t start_time groupname

Display only information about a specific client.

nsrsgrpcomp -c foo.com group1

The above command is equivalent to

nsrsgrpcomp -H -i -o -b 2048 -c foo.com group1

Display only information about a specific save set.

nsrsgrpcomp -c bar.com -n "C:Temp" group1

nsrsgrpcomp -c bar.com -n C:\Temp group1

nsrsgrpcomp -n foo.com:index group1

nsrsgrpcomp -c foo.com -n /bigspace group1

The above command is equivalent to

nsrsgrpcomp -H -i -o -b 2048 -c foo.com -n /bigspace group1

Display only summary headers.

nsrsgrpcomp -H group1

Display at most last 50 lines of output for a specific save set

nsrsgrpcomp -l 50 -c foo.com -n /bigspace group1

Display at most last 1024 bytes of output for a specific save set

nsrsgrpcomp -b 1024 -c foo.com -n /bigspace group1

NOTE: -b option does not include partial lines so this will likely

result in less than 1024 bytes of output from the job.

Display output from a specific save set without prefix

nsrsgrpcomp -N -l 50 -c foo.com -n /bigspace group1

nsrpush

The nsrpush CLI command can also be used to upgrade clients. Using the nsrpush command, temporary upgrade package paths can be configured for each client. It is also possible to specify a timeout to cancel the upgrade for each client. These two options cannot be specified using the GUI.

VSSADMIN list writers

Output should be similar “State: should be “Stable” “Last error: should be “No error”.

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
This entry was posted in E20-597. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s