Using mmrecov to recover your NetWorker server

One of the most stressful situations that a backup administrator can face is the loss of the NetWorker server. The good news is that Legato developed a very strong utility that you can use to facilitate this recovery. This utility is mmrecov.

mmrecov will allow you to recover your NetWorker server media database, client index and resource files.

There are several situations where you may need to run mmrecov, including:

  • A hardware error destroyed the media database, index or resource files
  • The media database, index or resources files have become corrupted
  • Moving the NetWorker server to new hardware
  • You accidentally removed many volumes, and would rather recover the media database than run scanner on each tape

Note: The NetWorker version 5.x mmrecov command will recover the media database, servers client index and the resource files. The NetWorker version 6.x mmrecov command will only recover the media database and the resources files. To recover the servers client index on a NetWorker 6.x system, you must use the "nsrck -L 7 -ttime" command.

Prerequisites for running mmrecov

Before you can run mmrecov, you need to make sure the following items have been addressed:

  • The NetWorker software is installed, operational and the daemons, for Unix servers or the services, for Windows servers, are running.
  • If this is a complete recovery, a re-installation of NetWorker, make sure all patches that were applied to the production server have been applied to the new installation.
  • You must have the latest bootstrap saveset and report available.

Note: For more information on the bootstrap saveset and bootstrap report, please refer to my other article "Bootstrap Management"

Running mmrecov

The text shown in figure 1 is an actual mmrecov session using a NetWorker version 6.0.1 server running on Solaris 8. The commands entered by the operator are in bold.

root@alpha99# mmrecov

NOTICE: mmrecov is used to recover the NetWorker server's medi index and resource file from media, backup tapes or disks, when any of this critical NetWorker data has been lost or damaged. Note this will command will OVERWRITE the server's existing media index. mmrecov is not used to recover NetWorker clients' on-line indexes; normal recover procedures may be used for this purpose. See the Legato NetWorker Disaster Recovery Guide for more details,

What is the name of the devicee you plan on using [/dev/rmt/0cbn]?<enter>
/dev/rmt/0cbn: unmounted smurf.004

Enter the latest bootstrap save set id: 11043998081
Enter starting file number (if known) [0]: 14
Enter starting record number (if known) [0]: 0

Please insert the volume on which save set id 2204398081 started
into /dev/rmt/0cbn. When you have done this, press <RETURN>: <eenter>

Scanning /dev/rmt/0cbn for save set 1104398081; this may take a while...
scanner: scanning dlt tape smurf.004 on /dev/rmt/0cbn
/nsr/res.R/nsr.res
/nsr/res.R/nsrjb.res
/nsr/res.R/nsrla.res
/nsr/res.R/servers
/nsr/res.R/
/nsr/res.R/nsr/mm
scanner: ssid 2204398082: scan complete
scanner: ssid 1104398081: 105 KB, 7 file(s)
/dev/rmt/0cbn: verifying label, moving backward 2 file(s)
/dev/rmt/0cbn: verifying label, moving backward 1 file(s)
/dev//rmt/0cbn: mounted dlt tape smurf.004 (write protected)

If your resource files were lost, they are now recovered in the 'res.R' directory. Copy or move them to the 'ress' directory, after you have shut down the service. Then restart the service.

Otherwise, just restart the service.

If the on-line index for alpta99 was lost, it can be recovered using the nsrck command.

Note: If we had been running mmrecov on aa NetWorker version 5.x system, the services client index would have been recovered after the media database and resource files.

Recovering the media database using a clone volume

Using a clone volume with mmrecov is the same as using a normal backup volume. When prompted, enter the correct ssid, file and record of the cloned bootstrap saveset. Then mount the clone tape on the drive any you're off!

Recovering the NetWorker servers client index file using nsrck (NetWorker version 6.x only)

Once you have the media database recovered, you can recover the NetWorker servers client index database, if required. With NetWorker version 6.x this is accomplished using the nsrck -L7 command. For example, to recover the client index file for a NetWorker 6.x server named alpha99 to the date of 01/13/2002, the following command was used:

nsrck -L7 01/13/02 alpha66

Recovering the resource (res) files

When mmrecov finishes, it places the recovered res files in the directory:

/nsr/res.R

In most mmrecov situations you will want to use these recovered res files. To activate tge recovered res files, perform the following:

  • shutdown the NetWorker services
  • rename the /nsr/res directory to /nsr/res.corrupt
  • rename the /nsr/res.R directory to /nsr/res
  • restart the NetWorker services

Final Thoughts

Luckily, the mmrecov utility is rock-solid. I have only seen this command ail once. This was caused, or at least we deduced that it failed because of multiple level 9 bootstrap savesets that had to be read in order to complete the recovery. Rather than risk the possibility of level 9 bootstrap causing problems at your site, I recommend that you always perform Full backups of your bootstrap savesets. The bootstrap saveset is not all that big, so performing a full should be of minimal impact

You should also keep in mind the fact that mmrecov will not recover your client index file, the NetWorker version 5.x mmrecov command will recover the servers index file, but no others. If you need to recover your client index files, you must use methods, such as file restores, or using the "nsrck -L7" command, for NetWorker 6.x environments. The client index management article contained in this article provides tips and techniques that you can use to protect and recover your client index files.