[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.6 Using the Restore Script

To restore files that were archived using a scripted backup, use the restore script. Its usage is quite straightforward. In the simplest form, invoke restore --all, it will then restore all the file systems and files specified in ‘backup-specs’ (see section BACKUP_DIRS).

You may select the file systems (and/or files) to restore by giving restore a list of patterns in its command line. For example, running

restore 'albert:*'

will restore all file systems on the machine ‘albert’. A more complicated example:

restore 'albert:*' '*:/var'

This command will restore all file systems on the machine ‘albert’ as well as ‘/var’ file system on all machines.

By default restore will start restoring files from the lowest available dump level (usually zero) and will continue through all available dump levels. There may be situations where such a thorough restore is not necessary. For example, you may wish to restore only files from the recent level one backup. To do so, use ‘--level’ option, as shown in the example below:

restore --level=1

The full list of options accepted by restore follows:


Restore all file systems and files specified in ‘backup-specs’.

-l level

Start restoring from the given backup level, instead of the default 0.


Set verbosity level. The higher the level is, the more debugging information will be output during execution. Default level is 100, which means the highest debugging level.


Display short help message and exit.


Display information about the program’s name, version, origin and legal status, all on standard output, and then exit successfully.

You should start the restore script with the media containing the first volume of the archive mounted. The script will prompt for other volumes as they are needed. If the archive is on tape, you don’t need to rewind the tape to to its beginning—if the tape head is positioned past the beginning of the archive, the script will rewind the tape as needed. See section Tape Positions and Tape Marks, for a discussion of tape positioning.

Warning: The script will delete files from the active file system if they were not in the file system when the archive was made.

See section Using tar to Perform Incremental Dumps, for an explanation of how the script makes that determination.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on August 23, 2023 using texi2html 5.0.