Backup and restore to tape drive Solaris 10
By
Backups should be done regularly and also tested.
Using a Tapedrive for system backups.
1. Login root or become superuser.
# init 0
ok boot –s
2. Bring the system to run level S (single-user mode).
3. Modify the .rhosts, etc/ethers, etc/hosts files, add workstation info on server and add server info on workstation in order for them to communicate to each other.
digi1(server)# vi /.rhosts
vinnie root
vinnie.thc.com root
vinnie(workstation)#vi /.rhosts
vinnie root
vinnie.thc.com root
4. Format the second disk
#format > partition > modify but leave enough space on partition 0
#newfs –F /dev/dsk/c0t2d0s0
5. Make a new empty directory.
#mkdir restore
6. Mount the new file system to the restore directory
#mount /dev/dsk/c0t2d0s0 /restore
7. Insert a tape that is write-enabled into the tape drive.
8. Back up file systems.
# ufsdump 0ucf digi1:/dev/rmt/0 /
# ufsdump 0ucf digi1:/dev/rmt/0 /export/home
9. Bring the system back to run level 3 by pressing Control-D.
10. Restore the files from tape.
# ufsrestore vxf digi1:/dev/rmt/0
Backup Notification ALERT:
Set a cron job to run to alert when backups are needed.
1. edit crontab file
# crontab –e
30 14 1 * * /root/backup.sh
Create a shell script to display the alert message.
2. create backup.sh under root directory
#!/bin/sh
echo “It’s time to backup your workstation.”
exit 0
Tags: switch, vlan, ip, interface, router, vtp












