UASM(8) Legato NetWorker 4.0 UASM(8)
NAME
uasm - NetWorker module for saving and recovering UNIX filesystems
SYNOPSIS
uasm -s [-bednv] [-ix] [ -t time ] [ -f proto ] [ -p ppath ] file...
uasm -r [-dnv] [ -i {nNyYrR} ] [ -m <src>=<dst> ] -z suffix ] [ file
]...
DESCRIPTION
uasm is the default UNIX filesystem ASM (Application Specific Mod
ule). It is called directly by save(8) and recover(8). This
description of uasm applies to all ASM's. For clarity only uasm is
mentioned.
uasm has two modes, saving and recovering. When saving, uasm will
walk UNIX directory trees and generate an XDR stream, see
nsrdata(5), on its stdout representing the files and organization of
the directory tree. When recovering, uasm reads an XDR stream on its
stdin and creates the corresponding directories and files.
While saving, uasm's behavior may be controlled by directive files.
The directive files control how descendent directories are searched;
which files are ignored; how the XDR stream is generated; and how to
process subsequent directive files, see nsr(5). When walking a
directory tree, symbolic links are never followed.
The following table lists the properties of the ASM's supplied with
NetWorker.
c c c c c c l c c c c c. ASM
name internal walking filtering auto-applied skip X
null X nullasm X holey X X X
always X X uasm X logasm X mailasm X
swapasm X xlateasm X X
compressasm X X nsrmmdbasm X
nsrindexasm X
Internal ASM's are not separate programs, but are contained within
all ASM's. External ASM's are separate programs, and are invoked as
needed. For security reasons, external ASM names must end in asm and
be located in the same directory as the originally invoked program
(typically save or recover). Walking ASM's traverse directory trees.
The skip, null, and nullasm ASM's do not walk.
Generally, a file is processed by just one ASM. While saving, for
example, an ASM reads a file and generates the appropriate XDR
stream. When a different ASM is needed to process a file, the new
ASM is invoked and it generates the XDR stream. When a filtering ASM
is traversing a directory tree and invokes another ASM, that ASM's
XDR stream is processed by the filtering ASM. Hence, while using
compressasm to save a directory tree, the mailasm can still be used
to process the mail files correctly.
Auto-applied ASM's are used under certain conditions, and do not need
Licensed material--property of copyright holder(s) 1
UASM(8) Legato NetWorker 4.0 UASM(8)
to be specifically mentioned in a directive file. For example, when
a large file only has a small number of disk blocks allocated, the
holey ASM is automatically invoked to process the file. Auto-applied
ASM's are not used when a file's name matches an explicit directive.
The skip ASM skips saving files and directories and does not place
the file name in the parent directory's online index. The null ASM
skips saving files and directories, but leaves the file name in the
parent directory's online index. nullasm is an alternate name for
the null ASM and is so named for backward compatibility with earlier
releases where nullasm was a separate executable program instead of
an internal ASM. The holey ASM checks for blocks of zeros (holes)
when saving and recovering files. The always ASM always saves, it
ignores the file's modification time. The logasm does not complain
if a file changes during the save and can be used for log files and
other similar files where a file changing during a save is not worth
noting. The mailasm uses mail style file locking and maintains a
file's access time, thus preserving most mail handlers' new mail has
arrived flag. The swapasm doesn't save any actual file data and on
recovery recreates a zero-filled file of the correct size; this is
useful for diskless clients' swap files. The xlateasm translates the
file data; it does not change directory data. The compressasm uses
the Lempel-Ziv compression algorithm to compress file data, directo
ries are not compressed. The nsrmmdbasm is used to process Net
Worker's media index. The nsrindexasm is used to process NetWorker's
client file indexes.
OPTIONS
All ASM's accept the options described below. These options are gen
erally referred to as the standard-asm-arguments. ASM's may also
have additional options. A particular ASM's additional options must
be capital letters.
Either -s (saving) or -r (recovering) must be specified, and must
precede any other options. When saving, at least one file argument
must be specified. File may be either a directory or file name.
The following options are valid when saving or recovering:
-n Perform a dry run. When saving, do everything except produce
the XDR stream. When recovering, consume the input XDR
stream, but do not actually create any directories or files.
-v Turn on verbose mode. The current ASM, its arguments, and the
file it is processing are displayed. When a filtering ASM
operating in filtering mode (that is processing another ASM's
XDR stream) modifies the stream, its name, arguments and the
current file are displayed within square brackets.
When saving, the following options may also be used:
-b Produce a byte count. This option is like the -n
option, but byte count mode will estimate the amount of
data that would be produced instead of actually reading
Licensed material--property of copyright holder(s) 2
UASM(8) Legato NetWorker 4.0 UASM(8)
file data so it is faster but less accurate than the -n
option. Byte count mode produces three numbers: the
number of records, i.e. files and directories; the num
ber of bytes of header information; and the number of
bytes of file data. Byte count mode does not produce a
save stream so its output cannot be used as input to
another asm in recover mode.
-e Do not generate the final ``end of save stream''
boolean. This flag should only be used when an ASM
invokes an external ASM and as an optimization chooses
not to consume the generated save stream itself.
-i Ignore all save directives from .nsr directive files
found in the directory tree.
-f proto
Specifies the location of a .nsr directive file to
interpret before processing any files, see nsr(5).
Within the directive file specified by proto, <<path>>
directives must resolve to files within the directory
tree being processed, otherwise their subsequent direc
tives will be ignored.
-p ppath
This string is prepended to each file's name as it is
processed.
-t date
The date (in getdate(3) format) after which files must
have been modified before they will be saved.
-x Cross filesystem boundaries. Normally, filesystem
boundaries are not crossed during walking. Symbolic
links are never followed.
When recovering, the following options may also be used:
-i {nNyYrR}
Specifies the initial default overwrite response. Only
one letter may be used. When the name of the file
being recovered conflicts with an existing file, the
user is prompted for overwrite permission. The default
response, selected by just pressing return, is dis
played within square brackets. Unless otherwise speci
fied with the -i option, `n' is the initial default
overwrite response. Each time a response other than
the default is selected, the new response becomes the
default. When either N, R, or Y is specified, no
prompting is done, and each subsequent conflict is
resolved as if the corresponding lower case letter had
been selected.
The valid overwrite responses and their meanings are:
Licensed material--property of copyright holder(s) 3
UASM(8) Legato NetWorker 4.0 UASM(8)
n Do not recover the current file.
N Do not recover any files with conflict
ing names.
y Overwrite the existing file with the
recovered file.
Y Overwrite files with conflicting names.
r Rename the conflicting files. A dot, .,
and a suffix are appended to the recov
ered file's name. If a conflict still
exists, the user will be prompted again.
R Rename conflicting files by appending a
dot, ., and a suffix.
-m src=dst
This option will map the file names that will be cre
ated. Any files that have start exactly with src will
be mapped to have the path of dst replacing the leading
src component of the path name. This option is useful
if you which to perform relocation of the recovered
files that were saved using absolute pathnames into an
alternate directory (e.g., -m /usr/etc=.).
-z suffix
Specifies the suffix to append when renaming conflict
ing files. The default suffix is R.
file Used to restrict the files being recovered. Only files
with prefixes matching file will be recovered. This
checking is performed before any potential name mapping
is done with the -m specification. When file is not
specified, no checking is done.
EXAMPLES
Copying files
To copy all of the files in the current directory to tar
getdir, use:
uasm -s . | (cd targetdir; uasm -rv)
This will preserve ownership, time, and the other unix
attributes. Only the data in holey files will be copied, the
holes will not be.
Copying a file tree to an archive directory
To copy the file tree under the directory here to archive and
overwrite any files with conflicting names, use:
cd here
uasm -s . | (cd archive; uasm -r -iY)
Note that we cd to here first and give the first uasm doing
the save a relative path so that the second uasm doing the
recover will recreate the file tree under archive.
Licensed material--property of copyright holder(s) 4
UASM(8) Legato NetWorker 4.0 UASM(8)
Another way to get the same effect is to use the -m option on
the second uasm doing the recover to explicitly map the path
names.
uasm -s here | uasm -r -iY -m here=archive
FILES
.nsr Save directive files located throughout the filesystem.
SEE ALSO
compressasm(8), logasm(8), mailasm(8), nsr(5), nsrindexasm(8),
nsrmmdbasm(8), nsrdata(5), recover(8), save(8), scanner(8),
swapasm(8), XDR(3N), xlateasm(8).
Licensed material--property of copyright holder(s) 5