vxrestore(1M) vxrestore(1M)
NAME [Toc] [Back]
vxrestore, rvxrestore - restore file system incrementally, local or
across network
SYNOPSIS [Toc] [Back]
vxrestore [-chimrRtvxy] [-b blocksize] [-e opt] [-f file] [-s number]
[filename ...]
rvxrestore [-chimrRtvxy] [-b blocksize] [-e opt] [-f file] [-s number]
[filename ...]
vxrestore key [filename ...]
rvxrestore key [filename ...]
DESCRIPTION [Toc] [Back]
vxrestore and rvxrestore read tapes previously dumped by the vxdump or
rvxdump command (see vxdump(1M)). vxrestore restores from tape on the
local system; rvxrestore restores from tape on a remote system.
rvxrestore runs /usr/sbin/rmt on the remote machine to access the tape
device.
vxrestore and rvxrestore support both getopt(3C) and traditional
restore command line invocations as shown above. The original restore
command line style is supported for compatibility with previous
versions of vxrestore and for synonymy with the existing restore
program used for hfs file systems.
For the original restore command line style, actions taken are
controlled by the key argument where key is a string of characters
containing exactly one function letter from the group irRtx, and zero
or more function modifiers from the group befhmsvy. One or more
filename arguments, if present, are file or directory names specifying
the files to restore. Unless the h modifier is specified (see below),
the appearance of a directory name refers to the files and
(recursively) subdirectories of that directory.
/dev/rmt/0m is the default tape device.
Options [Toc] [Back]
vxrestore recognizes the following options:
-i Allow interactive restoration of files from a dump tape.
After reading the directory information from the tape,
vxrestore provides a shell-like interface that lets you
move around the directory tree selecting files to extract.
The available commands are listed below. For commands that
require an argument, the default is the current directory.
add [arg] Add the current directory or specified
argument to the list of files to extract.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
If a directory is specified, the directory
and all its descendents are added to the
extraction list (unless the h key is
specified on the command line). File names
on the extraction list are displayed with a
leading * when listed by ls.
cd [arg] Change the current working directory to the
specified argument.
delete [arg] Delete the current directory or specified
argument from the list of files to extract.
If a directory is specified, the directory
and all its descendents are deleted from the
extraction list (unless h is specified on
the command line). The best way to extract
most files from a directory is to add the
directory to the extraction list, then
delete unnecessary files.
extract Extract all files named on the extraction
list from the dump tape. vxrestore prompts
for the volume to mount. The fastest way to
extract a few files is to start with the
last volume, then work toward the first
volume.
help List a summary of the available commands.
ls [arg] List the current or specified directory.
Entries that are directories are displayed
with a trailing /. Entries marked for
extraction are displayed with a leading *.
If the verbose key is specified, the inode
number of each entry is also listed.
pwd Print the full pathname of the current
working directory.
quit vxrestore immediately exits, even if the
extraction list is not empty. ctl-D
(control-D) is a synonym for quit.
set-modes Set the owner, modes, and times of all
directories that are added to the extraction
list. Nothing is extracted from the tape.
This setting is useful for cleaning up after
a restore aborts prematurely.
verbose The sense of the v modifier is toggled.
When set to verbose, the ls command lists
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
the inode numbers of all entries. and
vxrestore prints information about each file
as it is extracted.
-r Read the tape and load into the current directory. Be
careful when using the -r option. Restore only a complete
dump tape onto a clear file system, or restore an
incremental dump tape after a full level zero restore. The
following is a typical sequence to restore a complete dump:
/usr/sbin/newfs -F vxfs /dev/rdsk/c0t0d0
/usr/sbin/mount -F vxfs /dev/dsk/c0t0d0 /mnt
cd /mnt
vxrestore -r
The following is a typical sequence to restore a complete
dump if you are using the VERITAS Volume Manager:
mkfs -F vxfs /dev/vx/rdsk/vol1 80m
mount -F vxfs /dev/vx/dsk/vol1 /mnt
cd /mnt
vxrestore -r
You can then execute another vxrestore to restore an
incremental dump on top of this. Note that vxrestore
leaves a file, restoresymtab, in the root directory of the
file system to pass information between incremental
vxrestore passes. Remove this file when the last
incremental tape is restored.
-R Resume a full restore. vxrestore restarts from a
checkpoint it created during a full restore (see -r above).
It requests a particular tape of a multi-volume set on
which to restart a full restore. This provides a means for
interrupting and restarting a multi-volume vxrestore.
-s number
number is the dump file number to recover. This is useful
if there is more than one dump file on a tape.
-t Names of filenames, as specified on the command line, are
listed if they occur on the tape. If no filename is given,
the root directory is listed, which results in the entire
content of the tape being listed, unless -h is specified.
-x Extract named files from the tape. If the named file
matches a directory whose contents are written onto the
tape, and the -h option is not specified, the directory is
recursively extracted. The owner, modification time, and
mode are restored (if possible). If no filename argument
is given, the root directory is extracted, which results in
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
the entire contents of the tape being extracted, unless -h
is specified.
The following options can be used in addition to the letter that
selects the primary function:
-b blocksize
Specify the block size of the tape in kilobytes. If the -b
option is not specified, vxrestore determines the tape
block size dynamically. (This option exists to preserve
backwards compatibility with previous versions of
vxrestore.)
-c By default, vxrestore writes data directly to disk and does
not use the system buffer cache to restore data. This
ensures that the buffer cache does not change on an
operational system, which generally improves system
performance. Writing data synchronously to disk may,
however, slightly slow the restore process. If you specify
the -c option, vxrestore will cache data before writing to
disk. This preserves compatibility with previous versions
of vxrestore.
-e opt
Specify how to handle a vxfs file that has extent attribute
information. Extent attributes include reserved space, a
fixed extent size, and extent alignment. It may not be
possible to preserve the information if the destination
file system does not support extent attributes, has a
different block size than the source file system, or lacks
free extents appropriate to satisfy the extent attribute
requirements. Valid values for opt are:
force Fail to restore the file if extent attribute
information cannot be kept.
ignore Ignore extent attribute information entirely.
warn Issue a warning message if extent attribute
information cannot be kept (the default).
-f file
Specify the name of the archive instead of /dev/rmt/0m. If
the name of the file is -(dash), vxrestore reads from
standard input. So you can use vxdump and vxrestore in a
pipeline to vxdump and vxrestore a file system with the
command
vxdump 0f - /usr | (cd /mnt; vxrestore xf -)
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
You can use an archive name of the form machine:device to
specify a tape device on a remote machine.
-h Extract the actual directory, rather than the files to
which it refers. This prevents hierarchical restoration of
complete subtrees.
-m Extract by inode numbers rather than by file name. This is
useful if only a few files are being extracted and you want
to avoid regenerating the complete pathname to the file.
-v Specify verbose output; list the name of each file
restored, preceded by its file type.
-y Do not ask whether to abort the operation if vxrestore
encounters a tape error, but continue. Normally vxrestore
asks whether to continue after encountering a read error.
With this option, vxrestore continues without asking,
skipping over the bad tape block(s) and continuing as best
it can.
Operands [Toc] [Back]
vxrestore recognizes the following operands:
filename
The name one or more files that contain file or directory
names specifying the files to restore.
key A string of characters controlling what actions are taken
by vxrestore. This string contains exactly one function
letter from the group irRtx, and zero or more function
modifiers from the group befhmsvy.
Compatibility [Toc] [Back]
A file with a large uid (user ID of the file owner) or large gid
(group ID of the file owner) cannot be restored correctly on a file
system that does not support large IDs. Instead, the owner and/or
group of the file will be that of the user invoking vxrestore. (A
large ID is a value greater than 65535. The VxFS Version 2 disk
layout does not support large IDs).
Notes [Toc] [Back]
If the dump tape contains files larger than 2 gigabytes, and if the
file system being restored to does not support files larger than 2
gigabytes, the file is not restored correctly. Instead it is
truncated to 2 gigabytes.
The current version of vxrestore can read dumps produced by older
versions of vxdump. Dumps produced by vxdump on other platforms can
also be read by vxrestore, provided they are not from a version of
vxdump more recent the version of vxrestore in use.
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
vxrestore can restore files to a file system of a type other than
VxFS. If the file system type does not support extent attributes,
than the extent attributes are not restored (see the -e option).
A version of vxrestore resides in /sbin for use when the system is in
single user state.
DIAGNOSTICS [Toc] [Back]
vxrestore complains if a read error is encountered. If the -y option
has been specified, or you respond y, vxrestore tries to continue the
restore.
If the dump extends over more than one tape, vxrestore asks the user
to change tapes. If the -x or -i option has been specified, vxrestore
also asks which volume to mount. The fastest way to extract a few
files is to start with the last volume and work towards the first
volume.
Error Processing [Toc] [Back]
vxrestore typically terminates if it encounters an error condition
severe enough that it cannot continue reliably. Termination generally
indicates that there is a serious problems either in the backup media
or in the administrative procedures used during the dump/restore.
You can override a termination in interactive mode or by specifying
the -y option when you invoke vxrestore. If a termination is
overridden, vxrestore tries to skip over bad data and continue
restoring. It is not a good practice to do this except under
extraordinary circumstances. As part of normal dump/restore
processing, it is best to identify the underlying cause of the problem
and repair it.
Error Conditions [Toc] [Back]
Error conditions that can terminate a restore can be grouped into the
following general categories:
+ media problems
+ resource or permission problems
+ consistency check failures
A media error can occur while accessing the dump/restore media, or may
be caused by selecting an incorrect volume for restore processing.
Also check for physical problems such as damage to the tape, and be
sure that the tape drive is cleaned. Some typical media problem error
messages are:
no header after volume mark!
ran off end of tape
not at beginning of a file
Hewlett-Packard Company - 6 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
unknown tape header type number
unexpected tape header
partial block read: size should be size
Changing volumes on pipe input?
active file into volume 1
A resource allocation or permission problem can occur while trying to
allocate or access files or memory space required by vxrestore for its
internal processing. To avoid some common problems, be sure you are
running with the correct UID, that target files have write permission,
and that there is sufficient memory. Some typical resource allocation
or permission error messages are:
no memory to extend symbol table
no memory directory table
no space for string table
no memory for entry table
cannot allocate space for symbol table
no memory for file removal list
no memory for file dump list
cannot create save file filename for symbol table
output error to file filename writing symbol table
cannot open symbol table file filename
cannot stat symbol table file filename
cannot read symbol table file filename
A consistency check failure generally occurs while examining the data
on the dump/restore media. This kind of problem may be caused by a
media failure, by dumping a mounted and active file system, or because
of an error in media or parameter selection. Some typical consistency
check failure error messages are:
Root directory is not on tape [Toc] [Back]
cannot find directory inode inumber
error setting directory modes
Cannot find directory inode inumber named name
corrupted symbol table
state name impossible state
inumber bad first
unknown file on tape
missing inumber inumber
addino: out of range inumber
deleteino: out of range inumber
deleteino: inumber not found
name is not a directory
name path name too long
bad name to addentry name
link to non-existent name
duplicate entry
bad name
hole in map
Hewlett-Packard Company - 7 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
gethead: bad bitmap encountered
gethead: unknown inode type number
linkit: unknown type number
initsymtable called from command n
unextracted directory name
bad entry entry details
There are numerous consistency checks that vxrestore can list. Most
checks are self-explanatory or rarely occur. Here are some common
errors:
filename: not found on tape
The specified file name was listed in the tape directory but
not found on the tape. This is caused by tape read errors
while looking for the file, and from using a dump tape
created on an active file system.
expected next file inumber, got inumber
A file not listed in the directory appeared. This can occur
when using a dump tape created on an active file system.
Dumps should be performed with the file system unmounted or
the system in single-user mode (see init(1M)) to insure a
consistent dump. If the HP OnLineJFS product is installed,
the dump can be performed in the multi-user environment
using a snapshot file system with the online backup facility
(see the snapof=file option of mount_vxfs(1M)).
Incremental tape too low [Toc] [Back]
When doing an incremental restore, a tape that was written
before the previous incremental tape, or that has too low an
incremental level was loaded.
Note: if this error occurs, you are either restoring tapes
out of order or restoring from a dump file that was created
using the -T option to vxdump. At this point, vxrestore
displays a warning message and asks if you want to continue
doing the restore. Respond with y only if you are sure that
you are restoring from a dump file created using the -T
option. Enter n to abort the restore.
Incremental tape too high [Toc] [Back]
When doing an incremental restore, a tape that does not
begin its coverage where the previous incremental tape left
off, or that has too high an incremental level was loaded.
Note:
If this error occurs, you are either restoring tapes out of
order or restoring from a dump file that was created using
the -T option to vxdump. At this point vxrestore displays a
warning message and asks if you want to continue doing the
restore. Respond with y only if you are sure that you are
Hewlett-Packard Company - 8 - HP-UX 11i Version 2: August 2003
vxrestore(1M) vxrestore(1M)
restoring from a dump file created using the -T option.
Enter n to abort the restore.
Tape read error while restoring filename
Tape read error while skipping over inode inumber
Tape read error while trying to resynchronize
A tape-read error occurred. If a file name is specified,
the contents of the restored files may be incorrect. If
vxrestore is skipping an inode or is trying to resynchronize
the tape, no extracted files are corrupted, although files
may not be found on the tape.
Resync restore, skipped num blocks
After a tape-read error, vxrestore may have to resynchronize
itself. This message indicates the number of blocks skipped
over. This message will also be generated by older versions
of vxrestore while skipping over files larger than 2
gigabytes dumped by a more recent version of vxdump.
WARNINGS [Toc] [Back]
vxrestore can get confused when doing incremental restores from dump
tapes that were made on active file systems.
A level 0 dump (see the vxdump(1M) manual page) must be done after a
full restore. Because vxrestore runs in user code, it has no control
over inode allocation; thus a full dump must be done to get a new set
of directories reflecting the new inode numbering, even though the
contents of the files are unchanged.
vxrestore does not restore access control lists (ACLs).
AUTHOR [Toc] [Back]
vxrestore and rvxrestore are based on the restore program distributed
in the 4.4 Berkeley Software Distribution, developed by the the
University of California, Berkeley, and its contributors.
FILES [Toc] [Back]
/dev/rmt/0m default tape drive
/tmp/rstdr* file containing directories on the tape
/tmp/rstmd* owner, mode, and time stamps for directories
./restoresymtab information passed between incremental restores
SEE ALSO [Toc] [Back]
ls(1), extendfs_vxfs(1M), fsadm_vxfs(1M), init(1M), mkfs(1M),
mkfs_vxfs(1M), mount(1M), mount_vxfs(1M), newfs_vxfs(1M), restore(1M),
rmt(1M), vxdump(1M), getopt(3C).
Hewlett-Packard Company - 9 - HP-UX 11i Version 2: August 2003 [ Back ] |