Previous: Scripted Backups, Up: Backups
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 BACKUP_DIRS).
You may select the file systems (and/or files) to restore by
giving restore
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:
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 Tape Positioning, 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 Incremental Dumps, for an explanation of how the script makes that determination.