Become superuser or assume an equivalent role.
(Optional) Write-protect the tapes for safety.
Insert the volume 1 tape into the tape drive.
Change to a directory that will be used to restore the files to temporarily.
# cd /var/tmp |
Start the interactive restoration.
# ufsrestore if /dev/rmt/n |
Some informational messages and the ufsrestore> prompt are displayed.
Create a list of files to be restored.
List the contents of a directory.
ufsrestore> ls [directory-name] |
Change to a directory.
ufsrestore> cd directory-name |
Create a list of files and directories that you want to restore.
ufsrestore> add filenames |
(Optional) Remove any directory or file from the list of files to be restored, if necessary.
ufsrestore> delete filename |
(Optional) Display the file names as they are being restored.
ufsrestore> verbose |
Restore the files.
ufsrestore> extract |
The ufsrestore command asks you which volume number to use.
Type the volume number and press Return. If you have only one volume, type 1 and press Return.
Specify next volume #: 1 |
The files and directories in the list are extracted and restored to the current working directory.
To maintain the mode of the current directory, enter n at the set owner/mode prompt.
set owner/mode for `.'? [yn] n |
You must wait while the ufsrestore command performs its final cleanup.
Quit the ufsrestore program.
ufsrestore> quit |
You then see the shell prompt.
Verify the restored files.
Move the files to the proper directories.
The following example shows how to extract the /etc/passwd and /etc/shadow files from the backup tape.
# cd /var/tmp # ufsrestore if /dev/rmt/0 ufsrestore> ls .: .: .sunw/ export/ net/ sbin/ usr/ Sources/ etools/ opt/ scde/ var/ b/ home/ ptools/ set/ vol/ bin kernel/ pkg/ share/ dev/ lib/ platform/ shared/ devices/ lost+found/ proc/ src/ etc/ mnt/ rtools/ tmp/ ufsrestore> cd etc ufsrestore> add passwd shadow ufsrestore> verbose verbose mode on ufsrestore> extract Extract requested files You have not read any volumes yet. Unless you know which volume your file(s) are on you should start with the last volume and work towards the first. Specify next volume #: 1 extract file ./etc/shadow extract file ./etc/passwd Add links Set directory mode, owner, and times. set owner/mode for `.'? [yn] n ufsrestore> quit # cd etc # mv passwd /etc # mv shadow /etc # ls -l /etc |