Restoring Solaris files with NetWorker 7.x
Using the NetWorker recover utility we can restore files on a Solaris system (or any other UNIX/Linux system) using the command line.
For the benefit of this article, we with use a Solaris NetWorker client (schlumpf) and restore the file /var/adm/messages.
- On the NetWorker backup server, start the
recovercommand specifying -c <client> for the given client. In our example:
# recover -c schlumpfNOTE: At the NetWorker recover prompt (recover>), you can use the ? command at anytime for help on any of the recover sub-commands.
- Use the
chagetimecomand to set the date required for the restore. The date syntax is mm/dd/yyyy. For example:
recover> changetime 02/23/2009
- Now we can walk the directory tree to where the original file was located. For example:
recover> cd /var/adm
- Using the
lscommand we can now perform a listing of the current directory. Or in case we will simply confirm that the file we wish to restore by specificing the complete path on the
lscommand. For example:
recover> ls /var/adm/messages
- If the file(s) are availble for recovery, we can add them to our recovery list. For example:
recover> add /var/adm/messages
- Verify the required volumes are available for the restore. For example:
recover> volumes Volumes needed (all near-line): MBC019 at L180NOTE: If the required media is not available in the Library you will need to insert the tape into the library and perform an inventory of the media to allow NetWorker use of this media:
# nsrjb -a -T <volume> # nsrjb -I -S slot#
- Using the
listwe can conform which file(s) are marked for restore. For example:
recover> list /var/adm/messages
- If you want to change the destination for your recovered files, use the
relocatesub-command. For example:
recover> relocate new destination directory: /var/tmpor all on the command line. For example:
recover> relocate /var/tmpNOTE: If you do not use
relocate, then file(s) will be recovered to their original location.
- Validate the recovery destination using the
destination. For exmaple:
recover> destination recover into /var/tmp
- Begin the recovery