NetWorker: Using uasm for save and recovery
Summary: This Article describes several uses for the NetWorker uasm command, which underlies save and recover data encoding and decoding operations. It can be used for performance testing by isolating specific datapath activities and for troubleshooting operations. Finally, it can be used as a low-level recovery assistant for damaged savesets sometimes. ...
Instructions
About uasm
The uasm command is a low-level utility used by NetWorker for encoding any sort of data using external data representation (XDR). It underlies the save and recover utilities and while it is not used in common scenarios, it has various uses which this article describes:
- Impromptu save, recovery of move of NetWorker index file systems.
- Testing the read or write speed of a data source on a client, without other software or network overhead.
- Recovering data from damaged savesets (tape, in particular).
Note: the uasm command is not strictly supported for normal NetWorker recovery operations. This information is provided as a means to perform complex manual recovery operations on problem savesets or for testing purposes. uasm cannot be expected to recover non-file system backups due to the index and multi-saveset dependencies in more complex savesets, such as databases.
Saving or moving index file systems
NetWorker Index file systems have special properties and the recommended way to move them is using uasm. See NetWorker: How to Move a Client File Index to a New Location for complete details. Assuming you have access from the command line to both the source and destination file system, run the command:
uasm -s -i /nsr/index/client_name | uasm -r -m "/nsr/index"="/new_index_path"
Replace /nsr/index/client_name with the full path of the index or source folder. In the -m argument, replace the parent folder (/nsr/index) with the source parent folder, and the destination parent (/new_index) with the appropriate location for the folder to copy (client_name).
Testing save read speed from source data
To test the host disk subsystem's data transfer speed to uasm for encoding, run a uasm save and discard the data immediately to isolate source read performance:
Linux
date +%FT%T; uasm -s -i <source_directory> > /dev/null 2>&1; date +%FT%T
Windows
time /t & uasm -s -i <source_directory> > NUL 2>&1 & time /t
Recovering from scanner-created files
For tapes which have bad spots or other partial saveset damage, it may become necessary to use uasm to recover from the files created by scanner. See NetWorker: Using the scanner utility for more information about how to bypass the recover command and NetWorker's normal workflow to produce uasm-recoverable scanner_file saveset dumps.
UNIX file systems cannot be recovered to Windows file system, and conversely. To recover a scanner-generated file, first run uasm to ensure that the file is viable, and determine the path hierarchy in the saveset:
uasm -rnv < scanner_file
Once the path is known, you can run the recover by redirecting from the original_path of the saveset to a recovery_path of your choosing, which will be re-created if it does not already exist:
uasm -rv -m "original_path"="new_path" < scanner_file
If the path is already known, you can specify it directly as part of the uasm command to only recover the file or directory argument supplied. This can be used with the -m path redirection switch, or not. The recover path provided is case-sensitive.
uasm -rv "/etc"="/tmp/etc" /etc/hosts < scanner_file
This method can also be used in a pipeline directly from the scanner command, if disk space is not available to create a scanner saveset file. You can pipe the scanner command directly to any of the above uasm examples, as appropriate, with the same scanner command used to create a scanner saveset file, but instead of redirecting to file, pipe to uasm, for example:
scanner -S saveset_id device_path | uasm_command