Saturday, April 26, 2008

Legato Networker commands and tips

List of Legato Networker commands and tips.

Copyright Avisit Solutions Limited. www.avisit.co.nz


Complete listing of legato Bullitins:
http://web1.legato.com/lefaq/bulls/
Frequently asked questions
http://www.backupcentral.com/networker-faq.html
The Networker Journal
http://www.drenpress.com/

Setup:
Schedule, Directives, retention, Browse Policy
Setup cron to check /usr/tmp

savepnpc
Check lck files in savepnpc groups (/nsr/res)
Save files to long term storage with NetWorker and performs pre and post processing
commands on a NetWorker client.
savepnpc performs pre/post-processing commands if any exists in the /nsr/res/.res file.


inquire Lists SCSI devices available.
ldunld Sends and load or unload command to the tape device.
jb_config Configure an autochanger
mminfo -m Get Media information from the Networker Database
Example :
mminfo -av -c chocbar -r "name,level,ssid,pssid" BPK678
pssid When part of a save set series, the
previous save set identifier in the series, zero for the
first or only save set in a series.
daemon.log Most usefull log
nsr_shutdown -a or -q Shutsdown networker
nsrck -m Checks media
nsrck -F | Fix client indexes. Clientname is optional
Indexes can be corrupted when stopping networker
nsrck -C Compress index
nsrck -c Rebuilds Client Indexes
nsrinfo NetWorker file index reporting command
nsrls List statistics of NetWorker index files
nsrim NetWorker index management program
nsrim -l Remove the oldest save set to decrease the size of the indexes.
nsrd Server daemon. Coordinates server operations.
nsrexecd Client/server communications daemon
savegrp -pvvv Run the probe step to backup a group (does not do anything)
savegrp Backup the specified group
nsrindexd File-index database management
nsrmmd Media Management (tape drives) daemon
nsrmmdbd Medai Database Management
nsrmm The nsrmm program provides a command line interface to manage the media
and backup devices used by NetWorker servers and storage nodes.
nsrjb Manipulate the jukeboxs
nsrjb -I To read the new tapes that are in the jukebox volumes (Inventory)
nsrjb -j DLT891 -O81 -Y -L -g -bDefault -f /dev/nrmt0h -S 1-1
To label tape in slot 1
nsrjb -j DLT891 -O84 -p -n -f /dev/nrmt0h -S 3-3
Verify volume in slot 3
nsrjb -j DLT891 -O85 -Y -L -g -bDefault -f /dev/nrmt0h -S 3-3
Label volume in slot 3
nsrjb -j DLT891 -O86 -p -n -f /dev/nrmt0h -S 4-4
Verify volume in slot 4
nsrjb -j DLT891 -O87 -Y -L -g -bDefault -f /dev/nrmt0h -S 4-4
Label tape in slot 4
nsrjb -L -S 5-19 To label the volumes in slots 5 through 19, use the -S option
This is what the manual provides.
nsrjb -u Unload volume from DLT
nsrjb -o recyclable BPK687 Set volume BPK87 to recyclable. NOTE You will never be able to recover these files
again. Not even with the scanner command.
nsrmm -d Delete a volume in the media database (when getting message duplicate name)
nsrmmdbd Media Management db daemon
nsrwatch Watch the progress of networker in a terminal mode.
nsrls list statistics of NetWorker index files
The nsrls program, when invoked without any options, prints the number of
files in client file index, the number of kilobytes that the client file index
currently requires, and the utilization of the client file index with respect to the
number of kilobytes allocated to its UNIX file.

nsrjb Juke Box manipulation and information
mmlocate Show location of media

nsradmin -s Terminal mode for nwadmin
savegrp -pvvv Run Group Group_name. If this group has several clients
then you can also specify the client name.
Run this command in cron if the group only has to be
backed up once a week. Deactivate the group in Legato.
scanner The scanner program directly reads NetWorker media (such as backup tapes,
optical disks, or files) to confirm the contents of a volume, to extract a save set
from a volume, or to rebuild the NetWorker online indexes. You can only run
this command as root. You must specify a device, which is usually one of the
device names used by the NetWorker server. If the device is a tape drive, it
must be a nonrewinding type.


Any script in the backup command must begin with nsr or save

Do not use remote user except with rman

skips in directives No more than 35 lines

Index management
--------------------
nsrls List statistics of NetWorker index files
nsrck -F Compress Indexes
nsrim NetWorker index management program

Problem Solving.
----------------
If the savegrp -pvvv Group_name does not come back with a list of filesystems then there could be
TCP/IP problem. Use the following commands and files to identify the problem.
1) Is default route correct? Use netstat -rn
2) Is the DNS correct. You might have to use resolf.conf to use the /etc/host file first.
This is done in svc.conf in Tru64 and /etc/nsswitch in Solaris.
3) Use nsrlookup
4) Use rcpinfo


Reports
-------

something like
mminfo -m -r 'volume, pool, state, volflags, location, %used, written'

will give you a E in state when the volume is recyclable(expired), an
r in volflags when its read only.

You can write querys using -q and just get tapes in the location of
"libraryname" or use grep like i do.

mminfo -m -t 'yesterday'
Will give all the backups yesterday
mminfo -m -t 'last week'
Will give all the backups last week

------------------
savepnpc

Client has savepnpc specified in the "Backup command:" field on server

/nsr/res/TEST.res file on client contains:

type: savepnpc;
precmd: /nsr/bin/precmd.sh;
pstcmd: /nsr/bin/pstcmd.sh;
timeout: "11:00pm";

When a savegroup starts the following happens (example using the group TEST):

The server starts the group. The server sees the client has savepnpc
specified as the backup command. The server contacts the client and
checks for a /nsr/res/TEST.res file. (If there is not one, a dummy res
file will be created.) The client executes the pre command/script
specified in the file (precmd: /nsr/bin/precmd.sh;). It creates a tmp
file indicating that savepnpc is running, /nsr/tmp/TEST.tmp It also
executes a process that monitors the status of the saves waiting for
completion and/or the timeout value specified in /nsr/res/TEST.res.
(timeout: "11:00pm";) After the pre script successfully completes, the
server then initiates the filesystem saves. During this time the client
is constantly checking the server to see if the saves are completed. As
soon as they have completed (or the timeout value has been reached), the
client executes the post script specified in the /nsr/res/TEST.res file.
(pstcmd: /nsr/bin/pstcmd.sh) It then removes the /nsr/tmp/TEST.tmp file.

NOTES:

The pre/post scripts need to have the necessary environment setup in
them, as savepnpc does not pass any kind of environment to the scripts.
The start/stop of the pre and post commands are recorded in
/nsr/logs/savepnpc.log If the pre command fails (exit status non-zero),
the saves for that client will abort and not be run. It will also not
start the post command process, so the post script will never run and
the /nsr/tmp/TEST.tmp file will be left. You will need to remove this by
hand. If a savegroup session is manually aborted or stopped on the
server, the /nsr/tmp/TEST.tmp file is left. (This is because the server
allows you to restart it later.) Also, because an abort does not clear
up the work list for the client,the client still thinks there are saves
to be completed and the post script will not run. If a new savegroup
session is started and there is an existing /nsr/tmp/TEST.tmp file, it
will skip the pre/post commands; however it will run the filesystem save
sessions.

Taken from: http://www.georgenet.net/oracle/files/reference/networker.txt

No comments:

Copyright ©2008 PreciousTulips. All rights reserved.