test veritas logo



vxrestore - restore file system incrementally


vxrestore [ -chimrRtvxy ] [ -b block_size ] [ -e opt ]
[ -f filename ] [ -s number ] [ filename ...]




vxrestore restores files previously copied to tape by the vxdump command (see vxdump(1M)).

The temporary files rstdr* and rstmd* are placed in /tmp by default. If the environment variable TMPDIR is defined with an absolute pathname, that location is used instead of /tmp.

Cluster File System Issues

No cluster issues; command operates the same on cluster file systems.

OPTIONS: Functions

The following options select the primary function:
-i Allows interactive restoration of files from a dump tape. After reading the directory information from 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] Adds the current directory or specified argument to the list of files to extract. 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 asterisk (*) when listed by ls.
cd [arg] Changes the current working directory to the specified argument.
delete [arg] Deletes 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 Extracts all files named on the extraction list from the dump tape. vxrestore prompts for the tape volume to mount. The fastest way to extract a few files is to start with the last tape volume, then work toward the first tape volume.
help Lists a summary of the available commands.
ls [arg] Lists the current or specified directory. Entries that are directories are displayed with a trailing slash (/). Entries marked for extraction are displayed with a leading asterisk (*). If the verbose option is specified, the inode number of each entry is also listed.
pwd Prints the full path name of the current working directory.
quit vxrestore immediately exits, even if the extraction list is not empty.
setmodes Sets 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 the inode numbers of all entries, and vxrestore prints information about each file as it is extracted.
-r Reads the tape and loads 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 0 restore. The following is a typical sequence to restore a complete dump if you are using the Veritas Volume Manager:

mkfs -t vxfs /dev/vx/rdsk/fsvol/vol1 80m mount -t vxfs /dev/vx/dsk/fsvol/vol1 /mnt cd /mnt vxrestore -r

You can then execute another vxrestore to restore an incremental dump on top of this. vxrestore leaves a file, restoresymtable, 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 Resumes 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-tape backup volume on which to restart a full restore. This provides a means for interrupting and restarting a multi-tape backup volume vxrestore.
-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. This results in the entire contents of the tape being listed unless -h is specified.
-x Extracts 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. This results in the entire contents of the tape being extracted, unless -h is specified.

OPTIONS: Function Modifiers

The following options can be used in addition to the letter that selects the primary function:
-b block_size
  Specifies the block size of the tape in kilobytes. If the -b option is not specified, vxrestore determines the tape block size dynamically up to a default maximum of 63. So, if -b option is used when creating a dump, but not used while restoring the dump, the restore will fail when the tape block size is specified to be greater than 63. This option preserves 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 Specifies 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 Fails to restore the file if extent attribute information cannot be kept.
ignore Ignores extent attribute information entirely.
warn Issues a warning message if extent attribute information cannot be kept (the default).
-f filename
  Specifies the name of the archive instead of the default device. If the name of the file is - (dash character), vxrestore reads from standard input. So you can use vxdump and vxrestore in a pipeline to dump and restore a file system with the command:

vxdump 0f - /usr | (cd /mnt; vxrestore xf -)

You can use an archive name of the form machine:device to specify a tape device on a remote machine.
-h Extracts the actual directory rather than the files to which it refers. This prevents hierarchical restoration of complete subtrees.
-m Extracts by inode numbers instead of by file name. This is useful if only a few files are being extracted and you want to avoid regenerating the complete path name to the file.
-s number
  number is the dump file number to recover. This is useful if there is more than one dump file on a tape.
-v Specifies verbose output; types the name of each file restored, preceded by its file type.
-y Does not ask whether to abort the operation if vxrestore encounters a tape error. Typically vxrestore asks whether to continue after encountering a read error. With this option, vxrestore continues without asking, skipping over the bad tape blocks and continuing as best it can.


vxrestore complains if a read error is encountered. If the -y option is specified, or you respond y, vxrestore continues with the restore.

If the dump extends over more than one tape, vxrestore prompts you to change tapes. If the -x or -i option is specified, vxrestore also prompts for which tape volume to mount.

There are numerous consistency checks that vxrestore can list. Besides media errors, other problems that can interrupt a restore include permission inconsistencies, resource unavailability, or inconsistencies encountered on the media that are the result of incorrect dump procedures.

    Error Processing

vxrestore typically terminates if it encounters an error condition severe enough that it cannot continue reliably. Termination generally indicates that there is a serious problem 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

Error conditions that can terminate a restore can be grouped into the following general categories:
o media problems
o resource or permission problems
o consistency check failures
A media error can occur while accessing the dump/restore media, or may be caused by selecting an incorrect tape 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 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 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 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

Most checks are self-explanatory or rarely occur. Some common errors and possible causes are listed below.
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 with the system in single-user mode (see the init(8) manual page) to ensure a consistent dump. The dump can also be performed in the multi-user environment using a snapshot file system with the online backup facility (see the snapof=filesystem option of the VxFS mount command).
Incremental tape too low
  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
  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 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 GB dumped by a more recent version of vxdump.


A file with a large (greater than 65535) user ID or group ID cannot be restored correctly on a file system that does not support large IDs. Instead, the owner and group of the invoking vxrestore is substituted.


If the dump tape contains files larger than 2 GB, and if the file system being restored to does not support files larger than 2 GB, the file is not restored correctly. Instead it is truncated to 2 GB.

The current version of vxrestore can read dumps produced by older versions of vxdump.

vxrestore can restore files to a file system of a type other than VxFS. If the file system type does not support extent attributes, the extent attributes are not restored (see the -e option).

Neither vxdump nor vxrestore work with Storage Checkpoints.


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; 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 is based on the restore program distributed in the 4.4 Berkeley Software Distribution, developed by the University of California, Berkeley, and its contributors.


/dev/tape Default tape drive.
$TMPDIR/rstdr* File containing directories on the tape.
$TMPDIR/rstmd* Owner, mode, and time stamps for directories.
./restoresymtable Information passed between incremental restores.


ls(1), fsadm_vxfs(1M), mount(1M), ufsrestore(1M), vxdump(1M), getopt(3), init(8), mkfs(8)

VxFS 8.0 vxrestore(1M)