Performing File System restores
The ufsrestore command copies files to the disk, relative to the current working directory from backup tapes that were created by the ufsdump command.
Options for the ufsrestore Command
t Lists the table of the backup media
r Restores the entire FS from the backup media
x file1 file2 Restores only the files named on the command line
i Invokes an interactive restore
v Specifies verbose mode. Displays details of the restore operation on the screen
f device Specifies the tape drive name
restoresymtable -- System creates this file when you restore an entire FS. The ufsrestore command uses this file for check=printing or passing information between incremental restores. You can remove this file when the restore is complete.
Restoring the /opt FS
# newfa /dev/rdsk/c0t0d0s5
# mount /dev/dsk/c0t0d0s5 /opt
# cd /opt
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /
# umount /opt
# fsck /dev/rdsk/c0t0d0s5
# ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s5
Always restore a FS by starting with the level 0 backup tape, continue with the next lower level tape and continue through the highest level tape.
Restoring /usr FS
ok boot cdrom –s
# newfs /dev/rdsk/c0t0d0s6
# mount /dev/dsk/c0t0d0s6 /a
# cd /a
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s6
# ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s6
# init 6
Performing a special case Recovery of the /(root) FS
ok boot cdrom -s
# newfs /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /a
# cd /a
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /usr/platform/’uname –m’/lib/fs/ufs
# installboot bookblk /dev/rdsk/c0t0d0s0
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0
# ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s0
# init 6
Invoking an Interactive Restore
# cd /var/tmp
# ufsrestore ivf /dev/rmt/0
ufsrestore> ls -- Display the contents of the directory structure on the backup tape
ufsrestore> cd directory1
ufsrestore> ls
ufsrestore> add file1 file2 -- Add the files you want to be restore to the extraction list
ufsrestore> delete file1 -- to delete a file from the extraction list
ufsrestore> marked -- To view the marked extraction files
ufsrestore> extract -- To restore the selected files from the backup tape
The ufsrestore command has to find the selected files. If you used more than one type for the backup, first insert the tape with the highest volume number and type the appropriate number at this point.
Set directory mde, owner, and times
Set owner/mode for ‘.’?[yn] n -- Answering y sets ownership and permission of the temp
directory to those of the directory structure on the tape
ufsrestore> quit
Move/copy the restored files to their original or permanent directory and delete from the temp directory
Performing an Incremental Restore
Always start with the last volume and towards the first. The system uses info in the restoresymtable file to restore incremental backups on top of the latest full backup.
# more /etc/dumpdates | grep c0t0d0s7
# newfs /dev/rdsk/c0t0d0s7
# mount /dev/dsk/c0t0d0s7 /export/home
# cd /export/home
# ufsrestore rvf /dev/rmt/0
Load the next lower level tape into the tape drive and issue the following command
# ufsrestore rvf /dev/rmt/0
Alternate Steps (5 & 6)
# ufsrestore iv /dev/rmt/0
ufsrestore> ls
ufsrestore> add *
ufsrestore> extract
ufsrestore> q
Load the next tape and perform the below operation
# ufsrestore iv
ufsrestore> ls
ufsrestore> add*
ufsrestore> extract
ufsrestore> q
No comments:
Post a Comment