mmrecov(8)                                                             mmrecov(8)

NAME

       mmrecov - recover a NetWorker media index


SYNOPSIS

       mmrecov [ -q | -v ] [ -N [ -F ] ]


DESCRIPTION

       The  mmrecov command is used in recovering from the loss of a NetWorker
       server's critical files.  mmrecov restores  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 Net-
       Worker  server  itself.   See  nsr_crash(8) for a discussion of general
       issues and procedures for NetWorker client and server crash recovery if
       you are running NetWorker for UNIX.

       mmrecov  is  used  to recover the NetWorker server's media database and
       resource files from the media (backup tapes or disks)  when  the  media
       database  or  resource files have been lost or damaged.  Note that this
       command overwrites the server's existing media index.  The mmrecov com-
       mand is not used to recover NetWorker clients' online indexes; you must
       use the nsrck(8) command for this purpose.

       The NetWorker system must be fully installed and  correctly  configured
       prior to using this command.  If any of the NetWorker software is lost,
       re-install NetWorker from the distribution files before you  run  mmre-
       cov.   Use  the  same  release of NetWorker, and install it in the same
       location as it was before the software was lost.

       The mmrecov program extracts the contents  of  a  bootstrap  save  set,
       which  contains  the  media  index and resource files.  Once mmrecov is
       done running, you shut the NetWorker server down,  move  the  recovered
       resource  files into place, and restart the server.  At this point, the
       file indexes for the server and client may be restored by using  nsrck.

       When  mmrecov  is  started,  it  will ask for the device from which the
       bootstrap save set will be extracted.  Next, it will ask for the  boot-
       strap  save  set identifier.  This number is found in the fourth column
       (labeled ssid) of the last line  of  the  bootstrap  information  sheet
       printed by savegrp and mminfo -B, an example of which 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

       In the example above, the ssid of the most recent bootstrap save set is
       '17851237'.  If you are cloning save sets, your bootstrap save  set  is
       also  cloned, and you need to use the second to last save set.  See the
       RECOVERING FROM CLONE MEDIA section for an example of boostrap informa-
       tion with cloned save sets.
       
       Next, mmrecov prompts for the file and record location of the bootstrap
       save set.  Both values may default to  zero  if	they  are  not	known.
       Note, however, that specifying the correct file and record numbers will
       allow NetWorker to more quickly locate the  bootstrap  save  set.   The
       file  and record locations are the fifth and sixth columns of the boot-
       strap information sheet.	 In the example above, the values for the file
       and record locations are 52 and 0, respectively.	 Finally, mmrecov will
       prompt that the volume (`mars.3' in the example above)  containing  the
       selected bootstrap save set be inserted into the specified device.  The
       ssid, file location, record location, and the physical volume  must  be
       determined by the user from the printed sheet, since mmrecov has no way
       of determining this information.  On the other hand, if the volume con-
       taining  the bootstrap is not known, the -B option of scanner(8) can be
       used to determine the file and record locations.

       If the bootstrap save set spans more than one volume,  multiple  volume
       names are printed.  The order printed is the order required by mmrecov.
       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, mmrecov will prompt for the name of the device where the
       next  volume  has been loaded when an end-of-volume occurs.  The volume
       is then scanned, and the bootstrap save set extracted.

       After the volume scan completes, mmrecov will complete.  At this point,
       if  your  original  server resource files were lost, you must shut down
       the NetWorker server, move the  new  resource  files  into  place,  and
       restart the NetWorker server.  Now the indexes can be recovered.
       
       At  the end of a bootstrap recovery, the contents of the media database
       will be replaced by the data from the bootstrap saveset. If any volumes
       in  the	recovered  database was written to after the bootstrap saveset
       was created, those savesets will not be in the media database  and  the
       volume  records	will  have incorrect tape position. Networker will use
       the incorrect tape position to write new	 data,	there  by  overwriting
       data  written  since  the bootstrap backup. In the case of file type or
       advanced file type devices, recover space operation will delete all the
       savesets	 which	have been created since the time the bootstrap saveset
       was created.

       Consider the following situation. The networker databases needed to  be
       recovered  today	 and the latest bootstrap saveset available is one day
       old. After recovering the databases using this bootstrap	 saveset,  the
       media  database	will contain volumes and saveset records as of yester-
       day. Any savesets created after the time the bootstrap saveset was cre-
       ated do not exist in the media database, but they do exist in the phys-
       ical medium. Networker will use the  stale  position  information  from
       volume  records	for  writing new data.	This has the potential to over
       write the saveset records that are missing from the media database.

       To prevent this from happening, mark all volumes with the  flag	"scan"
       using  the  option  -N. This flag will instruct nsrmmd to find the real
       end of tape. This will prevent data loss.  To  recover  those  savesets
       created since the boostrap recovery, the administrator must scan in the
       volumes. For file type or advanced file type devices, the recover space
       operation will be suspended until the "scan" flag is turned off.

       In order to recover the indexes for the server and client, you must run
       nsrck -L7.  This command will reconstruct  complete  indexes  from  the
       save sets generated by the server's save schedule.  Since the save sets
       may be spread across multiple volumes, nwadmin(1) or nsrwatch(1) should
       be run, and the volumes mounted as they are requested.

       When  nsrck  completes,  the  message  "completed recovery of index for
       client '<client-name>'" is displayed.  Once a NetWorker client's  index
       is recovered, that client can start recovering its files using recover.
       Note that it is not necessary for the server's  index  to  be  restored
       before the client indexes may be restored.

       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 must be  shut
       down (see nsr_shutdown(1)).

       Sometimes  it  is neccessary to recover the NetWorker server onto a new
       machine, for example,  after  a  major  hardware  failure.   When  this
       occurs,  the  NetWorker  Licensing software will detect the move.  Once
       the NetWorker server has been moved to a new machine, it  must  be  re-
       registered  with  Customer  Support  within 15 days of the move, or the
       server will disable itself.  After disabling itself, you will  only  be
       able to recover files; new backups cannot be performed until the server
       is re-registered.  Notifications will be sent by the  NSR  Registration
       notification, warning of the need to re-register the product.


RECOVERING FROM CLONE MEDIA

       If  you  are  running  mmrecov with clone media only, for example, at a
       remote site, you will need to perform the  recovery  using  a  slightly
       different  method.   When selecting the bootstrap identifier, make sure
       that you are using the information associated with the cloned save set:
       the last save set listed in the bootstrap output.  Consider the follow-
       ing list of save sets:

       Jun 17  22:21 1996  mars's NetWorker bootstrap information Page 1

	  date	     time    level	   ssid	     file   record   volume
	6/14/96	   23:46:13   full	 17826163      48	0    mars.1
	6/14/96	   23:46:13   full	 17826163      12	0    mars_c.1
	6/15/96	   22:45:15	 9	 17836325      87	0    mars.2
	6/15/96	   22:45:15	 9	 17836325      24	0    mars_c.2
	6/17/96	   22:20:25	 9	 17851237      52	0    mars.3
	6/17/96	   22:20:25	 9	 17851237	6	0    mars_c.3
       
       In the example above, the ssid of the most recent bootstrap save set is
       '17851237'.  The cloned save set resides on mars_c.3 and the values for
       the file and record locations are 6 and 0, respectively.

       If you lost your resource files and need to use the ones restored  from
       mmrecov,  the  NetWorker  server  needs to be shut down so that you can
       replace the installation resource files with your recovered ones.

       Once the original resource files are in  place,  the  NetWorker  server
       should  be  restarted.   After  it  is  restarted,  you may recover the
       indexes for the server and clients by issuing the  nsrck  -L7  command.
       This  command  queries  the  media  database  for the index backups and
       restores the indexes for the server and each client.  If all clone vol-
       umes  needed  are  online  when the index recovery proceeds, nsrck will
       complete on its own.

       If some of the volumes are not  online,  then  nsrck  will  attempt  to
       recover  the  index  from  the original volume it was backed up to, and
       therefore request the original media.  In the example bootstrap  output
       above,  mars_c.1  and mars_c.3 would both need to be online.  If volume
       mars_c.3 was the only volume online,  then  nsrck  would  also  request
       mars.1.  To finish recovering the server's index in this case, you need
       to perform the following steps:

       1.     Note what volumes are needed for recovery and delete  them  from
              the media database.

              NetWorker Management Console or nsrwatch(8) lists the volumes
              needed for recovery in the Pending messages panel.  Use NetWorker
              Management Console  or  nsrmm(8)  to delete the volumes from the
              media database.

              Given  the scenario in the example above where only mars_c.3 was
              mounted, we would have to delete mars.1 from the media database,
              for example, nsrmm  -d mars.1.

       2.     Restart  the server to terminate the index recovery in progress.

              Use nsr_shutdown(8) to bring the server down.   Run  nsrd(8)  to
              start the server again.

       3.     Recover the server's index by using nsrck  -L7 servername.

       When  nsrck  completes,  the message "The index is now fully recovered"
       appears.


OPTIONS

       -q     Quiet.  Displays only error messages.

       -v     Verbose.  Generates debugging information.
       
       -N     Needs to scan in the volumes.  After recovering media  database,
	      mark  all	 volumes  in  the media database to indicate that they
	      need to be scanned in.

       -F     Set "scan" flag to file and advanced  file  type	volumes	 only.
	      This  option  must  be  used with -N option. When specified, the
	      "scan" flag will not set for volumes that are on tape media.


FILES

       /nsr   If this was a symbolic link when the bootstrap save set was cre-
              ated,  it needs to be re-created manually prior to running mmre-
              cov.

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

       /nsr/mm/mmvolume
              The NetWorker server's media index saved as part	of  the	 boot-
              strap save set, and unconditionally recovered by mmrecov.


DIAGNOSTICS

	      Failed to set `scan' flag for the volume volumename
	      An  error	 message  to indicate that the "scan" flag was not set
	      for the specified volume. The actual error message  will	follow
	      this message.

BUGS

       The name mmrecov is misleading; as a result, mmrecov is often used when
       it       is        not        needed.         A        name        like
       "recover_server_media_database_or_resource_files_when_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, resource files, and media index are intact.

       To recover files that are not in the on-line file index  (for  example,
       files  saved  after  the  last run of savegrp), scanner 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 savegrp and the
       loss of the original index.


SEE ALSO

       mminfo(8), nsr_crash(8), nsr(8), nsrck(8), nsrd(8), nsr_client(5),
       nsr_schedule(5), nsr_shutdown(8), recover(8), save(8), savefs(8),
       savegrp(8), scanner(8), nsrindexasm(8), nsrmm(8), nsrmmdbasm(8),
       nsrwatch(8), nsr_getdate(3)

NetWorker 7.6.2			 Jul 14, 11			mmrecov(8)