Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Previous: Scripted Backups, Up: Backups


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 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:

-a
--all
Restore all file systems and files specified in backup-specs
-l level
--level=level
Start restoring from the given backup level, instead of the default 0.
-v[level]
--verbose[=level]
Set verbosity level. The higher the level is, the more debugging information will be output during execution. Devault level is 100, which means the highest debugging level.
-h
--help
Display short help message and exit.
-V
--version
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.

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.

 
 
  Published under the terms of the GNU General Public License Design by Interspire