Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mminfo(8)

nsr_crash(8)

nsr(8)

nsrd(8)

nsr_client(5)

nsr_schedule(5)

nsr_shutdown(8)

recover(8)

save(8)

savefs(8)

savegroup(8)

scanner(8)

nsrindexasm(8)

nsrmmdbdasm(8)

nwadmin(8)

nsrwatch(8)

getdate(3)

SAVEINDEX(8)

NAME

saveindex − save a NetWorker index
recoverindex − recover a NetWorker server’s on-line index and  media index

SYNOPSIS

saveindex
[ −q | −v ] [ −s server ] [ −R ] [ −E ] [ −n ] [ −p ] [ −P printer ] [ −l level ] [ −W width ] [ −t date ] [ −e expiration ] [ −g group ] [ −c client [ −c client ]   ...  ]

recoverindex
[ −q | −v ] [ −s server ]

DESCRIPTION

These shell scripts are used in preparing for and recovering from the loss of a NetWorker server’s critical files including the server’s index, the media index, and the server’s resource files.  Typical events causing such disasters are accidental removal of these files by a user or a disk crash on the NetWorker server itself.  Saveindex is used to produce a copy of the indexes and other files, recoverindex is used to recover the indexes and other files.  See nsr_crash(8) for a discussion of general issues and procedures for NetWorker client and server crash recovery. 

SAVEINDEX

Saveindex should be run at regular intervals to insure that up-to-date copies of the NetWorker indexes are available in the event of a disaster.  Saveindex is automatically run by savegroup(8) each night.  As each NetWorker client completes its saves, savegroup uses saveindex to save the client’s on-line file index. 

Client files saved after saveindex was last run will not appear in a recovered index.  Index entries for these files may be generated with scanner(8).  Since savegroup automatically runs saveindex after it saves a client’s files, only those files saved via the explicit use of the save command would fall into this category.  If large numbers of user files are explicitly backed up by running save, it would be prudent to run saveindex when the save command completes.  This will assure that the most recent entries in the index are recoverable. 

When saving a NetWorker server’s index, saveindex will generate a save set called bootstrap. This save set contains an incremental save of the server’s on-line file index, the server’s complete media index, and a complete copy of the server’s resource files. mminfo(8) is then used to print a list containing information about the most recent bootstraps.  This information should be kept in a safe place, it will be needed to run recoverindex.  In particular, the ssid (save set id), and the physical volume containing the most recent bootstrap save set will be requested by recoverindex.  See the mminfo manual page for details on each field.  An example of the output is shown below:

Jun 17  22:21 1992  mars’s NetWorker bootstrap information Page 1
    date    time    level       ssid  file  record   volume
 6/14/92 23:46:13   full   17826163    48       0   mars.1
 6/15/92 22:45:15      9   17836325    87       0   mars.2
 6/16/92 22:50:34      9   17846505   134       0   mars.2 mars.3
 6/17/92 22:20:25      9   17851237    52       0   mars.3

Before moving the NetWorker service to another machine, saveindex should be run as the last use of the NetWorker system on the original machine.  This will ensure that a complete index exists and is recoverable. 

RECOVERINDEX

Recoverindex is used to recover the NetWorker server’s on-line file and media index from the media (backup tapes or disks) when either of the server’s on-line file or media index has been lost or damaged.  Note that this command will overwrite the server’s existing on-line file and media index.  Recoverindex is not used to recover NetWorker clients’ on-line indexes; normal recover procedures may be used for this purpose. 

The NetWorker system must be fully installed and correctly configured prior to using this command.  If any of the NetWorker software was lost, re-install NetWorker from the distribution tape before running recoverindex.  The same release of NetWorker should be used, and it should be installed in the same location as it was in the original installation. 

Recoverindex works in two phases.  First, it extracts the contents of a bootstrap save set.  This save set contains the media and on-line file indexes.  The on-line file index only contains one entry, for the on-line file index itself.  In the second phase, recoverindex will run recover(8) to completely recover the server’s on-line file index.  This last phase is performed in the background, so the operator can respond to subsequent media mount requests. 

After recoverindex is started, it will ask for the tape drive from which the bootstrap save set will be extracted.  Next, it will ask for the bootstrap save set identifier.  This number is found in the fourth column (labeled ssid) of the last line of the bootstrap information sheet printed by saveindex.  In the example above, the ssid of the most recent bootstrap save set is ‘17851237’.  Next, recoverindex prompts for the file and record location of the bootstrap save set.  Both values may be defaulted to zero if they are not known.  The file and record locations are the fifth and sixth column of the bootstrap information sheet; in the example above, the values for the file and record locations are 52 and 0, respectively.  Finally, recoverindex will ask that the volume (‘mars.3’ in the example above) containing the selected bootstrap save set be inserted into the specified drive.  All of the ssid, file location, record location, and the physical volume will have to be determined by the user from the printed sheet, since recoverindex has no way of determining this information. 

If the bootstrap save set spans more than one volume, multiple volume names are printed.  The order that is printed is the order that is required by recoverindex.  In the example above, the third save set produced on 6/16/92 begins on volume ‘mars.2’ and spans to volume ‘mars.3’.  If a bootstrap save set spans volumes, when an end-of-volume occurs recoverindex will ask for the name of the drive where the next volume has been loaded.  The volume will then be scanned, and the bootstrap save set will be extracted. 

After the volume scan completes, recoverindex will complete.  A recover will be running in the background, reconstructing a complete index from the save sets generated by the server’s save schedule.  Since the save sets may be spread across multiple volumes, nwadmin(8), or nsrwatch(8) should be run, and the volumes mounted as they are requested. 

When the recover completes, the message “The on-line index is now fully recovered” will be displayed.  Once this message has appeared, recover can be used, in its normal interactive browsing mode, to recover other server files, including other NetWorker client on-line file indexes.  Once a NetWorker client’s index is recovered, that client can start recovering its files. 

As stated earlier, the NetWorker resource files are saved as part of the bootstrap save set.  If your resource files were also deleted, you may quickly replace them by copying or moving them from /nsr/res.R to /nsr/res.  Before restoring them to /nsr/res, the daemons need to be shut down (see nsr_shutdown(8)). 

OPTIONS

−c client
The name of a NetWorker client who’s index should be saved. A bootstrap save, with its associated printer output, will only be performed if client is also a NetWorker server.  Without this option, the indexes for all NetWorker clients on this server will be saved.  Multiple clients can be specified by supplying multiple −c options. 

−g group
The name of a NetWorker group. This option is not used to determine which client’s indices are to be saved. It is passed as a command line argument to savefs(8) while saving a client’s on line index, and to save(8) when generating the server’s bootstrap

−E Estimate.  Produce an estimate of the amount of data to be saved prior to actually saving any data. 

−l level
The level of save to perform.  There are 12 levels: full, 1 though 9, incr, and skip.  Full specifies that all index records are to be saved.  By default, the same schedule controlling the client’s save levels is used to determine the level for saving the client’s on-line file index.  See savefs(8) for more information about levels.  Note that saveindex coerces level incr to level 9.  This insures that a small number of tapes will need to be revisited should an index ever need recovering. 

−n No save.  Just produce an estimate of the amount of data that would be saved (as in −E) but don’t actually save any data. 

−P printer
Specifies the printer used to print the bootstrap information generated by saveindex. 

−p Preview.  List the name of the indexes which would be saved, the level of save that would be performed, and the time after which index entries must have been created to be saved, but don’t actually do the save. 

−q Quiet.  Display only error messages. 

−R Report success or failure, by echoing a "succeeded" or "failed" message as the last act.  This is used by savegroup when it runs saveindex. 

−t date
The date, in getdate(3) format, which should be used when examining the schedule to determine what level of save should be performed. 

−v Verbose.  Cause lots of debugging style information to be generated as things proceed. 

−W width
The width the −p option will use when displaying its output. 

−e expiration
Set the date (in getdate(3) format) when the saved data will expire.  The special value forever is used to indicate an archive volume must be used.  By default, no explicit expiration date is used. 

FILES

/nsr If this is a symbolic link, then it is saved away as part of the bootstrap save set, and therefore recovered (recreated) by recoverindex. 

/nsr/res
This directory and its contents are saved as part of the bootstrap save set. Recoverindex restores this directory, and then renames it to /nsr/res.R.  The original directory is temporarily renamed to /nsr/res.orig while the bootstrap save set is being recovered. 

/nsr/mm/mmvolume
The NetWorker server’s media index saved as part of the bootstrap save set, and unconditionally recovered by recoverindex. 

/nsr/index/servername/db
The NetWorker server’s on-line file index saved as part of the bootstrap save set, and unconditionally recovered by recoverindex. 

BUGS

Recoverindex is mis-named, causing unsuspecting users to use it (and its brute force features) when it is not needed.  A name like "recover_server_index_or_media_index_when_either_is_missing" is more descriptive.  Note that any part of the bootstrap save set contents are recoverable using normal recover procedures provided that the server’s on-line index and media index are in good shape. 

Recoverindex and this man page only references “tape drives”; in fact any media is supported by the command. 

To recover files that are not in the on-line file index (for example files saved after the last run of saveindex), scanner(8) must be used to rebuild the media and on-line file indexes from the contents of the volumes generated between the time of the last run of saveindex and the loss of the original index. 

SEE ALSO

mminfo(8), nsr_crash(8), nsr(8), nsrd(8), nsr_client(5), nsr_schedule(5), nsr_shutdown(8), recover(8), save(8), savefs(8), savegroup(8), scanner(8), nsrindexasm(8), nsrmmdbdasm(8), nwadmin(8), nsrwatch(8), getdate(3)

DIAGNOSTICS

The on-line index for server was NOT fully recovered
There was an error recovering all or part of server’s index.  Look back through the output to find out what was not recovered (one or more additional error messages will be mixed in with other recoverindex status messages).  You may need to retry the recoverindex, such as in the case of a temporary resource limitation or media error, or you may need to resort to recovering an older version of the index, in the case a permanent media error. 

NetWorker 4.1.2  —  Last change: May 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026