vxrestore - restore file system incrementally


vxrestore [-rRtxihmvy] [-snumber] [-bblock_size] [-eopt] [-f file] [file_name...]

vxrestore key [file_name...]


vxrestore reads tapes previously dumped by the vxdump command (see vxdump(ADM)).

vxrestore supports both getopt(S) and traditional ufsrestore(ADM) command line invocations as shown above. The original ufsrestore command line style is supported for compatibility with previous versions of vxrestore and for synonymy with the existing ufsrestore program used for ufs file systems.

For the original ufsrestore 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 rRxtsi, and zero or more function modifiers from the group befhmvy. One or more file_name arguments, if present, are file or directory names specifying the files that are to be restored. Unless the h modifier is specified (see below), the appearance of a directory name refers to the files and (recursively) subdirectories of that directory.


Read the tape and load into the current directory. -r should be used only after careful consideration, and only to restore a complete dump tape onto a clear file system or to restore an incremental dump tape after a full-level zero restore. Thus,

mkfs -F vxfs /dev/vx/dsk/vol1 80m
mount -F vxfs /dev/vx/dsk/vol1 /mnt
cd /mnt
vxrestore -r

is a typical sequence to restore a complete dump. Another vxrestore can then be performed 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. This file should be removed when the last incremental tape has been restored.

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.

Extract named files from the tape. If the named file matches a directory whose contents had been 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 file_name argument is given, the root directory is extracted, which results in the entire contents of the tape being extracted, unless -h has been specified.

Names of file_names, as specified on the command line, are listed if they occur on the tape. If no file_name is given, the root directory is listed, which results in the entire content of the tape being listed, unless -h has been specified.

-s number
number is used as the dump file number to recover. This is useful if there is more than one dump file on a tape.

This option allows interactive restoration of files from a dump tape. After reading in the directory information from the tape, vxrestore provides a shell-like interface that allows the user to move around the directory tree selecting files to be extracted. The available commands are given below; for those commands that require an argument, the default is the current directory.

add [arg]
The current directory or specified argument is added to the list of files to be extracted. If a directory is specified, it 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]
The current directory or specified argument is deleted from the list of files to be extracted. If a directory is specified, it and all its descendents are deleted from the extraction list (unless h is specified on the command line). The most expedient way to extract most files from a directory is to add the directory to the extraction list, then delete unnecessary files.

All files named on the extraction list are extracted from the dump tape. vxrestore asks which volume the user wants to mount. The fastest way to extract a few files is to start with the last volume, then work toward the first volume.

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 set, the inode number of each entry is also listed.

Print the full pathname of the current working directory.

vxrestore immediately exits, even if the extraction list is not empty.

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.

The sense of the v modifier is toggled. When set, the verbose key causes the ls command to list the inode numbers of all entries. It also causes vxrestore to print out information about each file as it is extracted.

The following options can be used in addition to the letter that selects the primary function desired:

-b block_size
Specify the block size of the tape in Kbytes. If the -b option is not specified, vxrestore will determine the tape block size dynamically. (This option exists to preserve backwards 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 lack free extents appropriate to satisfy the extent attribute requirements. Valid values for opt are:

Issue a warning message if extent attribute information cannot be kept (the default).

Fail to restore the file if extent attribute information cannot be kept.

Ignore extent attribute information entirely.

-f file
Specify the name of the archive instead of /dev/ctape1. If the name of the file is -, vxrestore reads from standard input. Thus, vxdump and vxrestore can be used in a pipeline to vxdump and vxrestore a file system with the command

vxdump 0f - /var | (cd /mnt; vxrestore xf -)
An archive name of the form machine:device can be used to specify a tape device on a remote machine.

Extract the actual directory, rather than the files to which it refers. This prevents hierarchical restoration of complete subtrees.

Extract by inode numbers rather than by file name. This is useful if only a few files are being extracted and one wants to avoid regenerating the complete pathname to the file.

Type the name of each file restored, preceded by its file type. Normally vxrestore does its work silently; the -v option specifies verbose output.

Do not ask whether to abort the operation if vxrestore encounters a tape error. Normally vxrestore asks whether to continue after encountering a read error. With this option, vxrestore continues without asking, attempting to skip over the bad tape block(s) and continue as best it can.


vxrestore complains if a read error is encountered. If the -y option has been specified, or the user responds y, vxrestore attempts 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 the user wants to mount. The fastest way to extract a few files is to start with the last volume and work towards the first volume.

There are numerous consistency checks that can be listed by vxrestore. Most checks are self-explanatory or can "never happen." 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 showed up. 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 environment (see init(ADM)) to insure a consistent dump. If the VxFS Advanced feature set is enabled, 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(ADM)).

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 has been loaded.

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 has been loaded.

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 has occurred. If a file name is specified, the contents of the restored files are probably partially wrong. 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 Gbyte dumped by a more recent version of vxdump(ADM).


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

Dumps produced by older versions of vxdump can be read by the current version of vxrestore.

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 (see vxdump(ADM)).

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 will not be restored (see the -e option).


vxrestore can get confused when doing incremental restores from dump tapes that were made on active file systems.

A level-zero dump (see the vxdump(ADM) manual page) must be done after a full restore. Since 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 is based on the restore program distributed in the 4.4 Berkeley Software Distribution, developed by the the University of California, Berkeley, and its contributors.


Default tape drive.

File containing directories on the tape.

Owner, mode, and time stamps for directories.

Information passed between incremental restores.


fsadm(ADM), init(ADM), mkfs(ADM), mount(ADM), ufsrestore(ADM), vxdump(ADM), getopt(S)

Copyright © 2005 The SCO Group, Inc. All rights reserved.