You cannot use this procedure to restore root (/) or /usr. See "How to Restore the root (/) and /usr File Systems" for instructions on restoring these file systems.
If necessary, unmount the file system.
# umount /dev/rdsk/device-name |
Create the new file system with the newfs command.
# newfs /dev/rdsk/device-name |
You are asked if you want to construct a new file system on the raw device. Verify that the device-name is correct so you don't wipe out the wrong file system.
Confirm that the new file system should be created.
newfs: construct a new file system /dev/rdsk/cwtxdysz: (y/n)? y |
The new file system is created.
Mount the new file system on a temporary mount point.
# mount /dev/dsk/device-name /mnt |
Change to the /mnt directory.
# cd mnt |
You have changed to the mount-point directory.
Write-protect the tapes.
Insert the first volume of the level 0 tape in the tape drive.
Use the ufsrestore command to restore the files on the tapes.
# ufsrestore rvf /dev/rmt/n |
The level 0 dump is restored. If the dump required multiple tapes, you will be prompted to load the next tape.
Remove the tape and load the next tape in the drive.
Always restore tapes starting with 0 and continuing until you reach the highest level.
Use the ufsrestore command to restore the file system.
# ufsrestore rvf /dev/rmt/n |
The next level tape is restored. If the dump required multiple tapes, you will be prompted to load the next tape.
Verify the file system is restored.
# ls |
Remove the restoresymtable file.
# rm restoresymtable |
The restoresymtable file created by ufsrestore is removed.
Change to another directory.
# cd / |
Unmount the newly restored file system.
# umount /mnt |
Remove the last tape and insert a new tape that is not write-protected in the tape drive.
Use the ufsdump command to back up the newly restored file system.
# ufsdump 0uf /dev/rmt/n /dev/rdsk/device-name |
You should always do an immediate backup of a newly created file system because ufsrestore repositions the files and changes the inode allocation.
Mount the restored file system.
# mount /dev/dsk/device-name /mount-point |
The restored file system is mounted and available for use.
Verify the restored and mounted file system is available.
# ls /mount-point |
In this example, the /export/home file system is restored.
# umount /export/home # newfs /dev/rdsk/c0t3d0s7 newfs: construct a new file system /dev/rdsk/c0t3d0s7: (y/n)? y /dev/rdsk/c0t3d0s7: 41040 sectors in 57 cylinders of 9 tracks, 80 sectors 21.0MB in 4 cyl groups (16 c/g, 5.90MB/g, 2688 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 11632, 23232, 34832, # mount /dev/dsk/c0t3d0s7 /mnt # cd /mnt # ufsrestore rvf /dev/rmt/0 Verify volume and initialize maps Media block size is 126 Dump date: Wed Nov 06 16:21:10 1996 Dumped from: the epoch Level 0 dump of /export/home on pluto:/dev/dsk/c0t3d0s7 Label: none Begin level 0 restore Initialize symbol table. Extract directories from tape Calculate extraction list. Warning: ./lost+found: File exists Make node ./kryten Make node ./kryten/letters Make node ./kryten/memos Make node ./kryten/reports Make node ./rimmer Make node ./rimmer/sc.directives Make node ./rimmer/tests Make node ./rimmer/answers Extract new leaves. Check pointing the restore # ls # rm restoresymtable # cd / # umount /mnt # ufsdump 0ucf /dev/rmt/0 /export/home . . . # mount /dev/dsk/c0t3d0s7 /export/home # ls /export/home |