Backup O/S in Solaris

I've got DLT7000 (Magnetic Tape drive) at my office as the backup device. I'm gonna test it before send it to my customer. The easy way is to perform O/S backup. I'm using SUN Ultra 60, Solaris 5.8 using ufsrestore and ufsdump command. Btw, it's full backup


Step-by-Step:

1.Go to the single-user mode
# init -s

2.Check the partition consistency
# fsck –m /dev/dsk/c0t0d0s0

3.Check the status of the tape
# mt status

4.Rewind the tape
# mt –f /dev/mnt/0 rew

5.Perform full backup backup
# ufsdump 0vf /dev/rmt/0n /dev/rdsk/c0t0d0s0

That's it.. The process will take some time because of the tape is working in sequential way.

How to restore:

1.Go to single-user via the cdrom
ok> boot cdrom –s

2.Create the same partition on the new disk

3.Create new file system on every slices
# newfs /dev/rdsk/c0t0d0s0
# newfs /dev/rdsk/c0t0d0s6
.
.
.

4.Create new directory in /tmp/root/a
# mkdir /tmp

5.Mount c0t0d0s0 to /mnt
# mount c0t0d0s0 /mnt

6.Check tape status
# mt –f /dev/rmt/0 status

7.Rewind the tape if u'r not sure
# mt –f /dev/rmt/0 rew

8.Change directory to /mnt
# cd /mnt

9.Execute the process
# ufsrestore rvf /dev/rmt/0n

10.After completed the process, don't forget to create the bootblock
# cd /tmp/usr/platform/'uname -m'/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0

11. Try it by rebooting the system

PS: Don't forget to edit the /etc/vfstab

No comments:

Post a Comment