Restore Usage

From Gruff Goat Wiki
Jump to: navigation, search

Restore files and filesystems saved with dump. Learn more with 'man restore'.


To rebuild a filesystem, it is best to start clean. Start clean with the command newfs. For example, a server has the mount point /home at /dev/idad0s1g.

umount /home
newfs /dev/idad0s1g
mount /dev/idad0s1g /home
cd /home
restore -rf /backup/dump_level_0
restore -rf /backup/dump_level_1
restore -rf /backup/dump_level_2
# Do until all dump levels are restored
rm restoresymtable
cd /


An interactive restore allows you to select which files or directories to restore. Use this command to restore files to an already populated directory. To restore files to the mount point /home, follow the example

cd /home
restore -if /backup/dump_level_0

Once you are in restore interactive there are a number of commands you may use. Enter 'help' to get a list of commands. Add the files or directories you wish to extract. Wildcards are acceptable. When done adding, extract the files into the filesystem. For example:

ls              # List directory contents
cd export       # Change to the export directory
add mine        # Add the file or directory named export
cd /
add *           # Add all files and directories in the present directory
delete notmine  # Remove notmine from the extraction
extract         # extract the selected files

The restore process begins after you answer 2 question.

Specify next volume #:          1
set owner/mode for '.'? [yn]    n

Verify that all worked as expected.