How do I backup multiple filesystems from different Solaris servers onto a tape drive attached locally to one of the servers?

I would like a script or solution to backup 3 servers filesystems using ufsdump on single SDLT tape drive. The tape drive is attached locally to one of the server (Server1).  Each server has 5  filesystems.

I just want a Solaris script that will manipulate the tape drive to continue to backup filesystems from the other 2 REMOTES servers after completing its local backup.
filesystems to be backed up are in configuration file for each server. see below of some extracts of existing script

 mt -f /dev/rmt/${DEVICE} rewind
echo " "
echo "STARTING $DB BACKUP on server1 (local Tape Drive)"
FS_LIST_local=`cat /optdir/backup.cfg| grep :|cut -f2 -d:`
EXIT_CODE=0
for FS in $FS_LIST_local
do
echo "BACKING UP $FS FILESYSTEM"
ufsdump 0fu /dev/rmt/${DEVICE}cbn $FS

mt -f /dev/rmt/${DEVICE} rewind
mt -f /dev/rmt/${DEVICE} rewind fsf 4      #(skips to end of the 4th filesystems to prepare for filesystems backup of remote server server2)
echo " "
echo "STARTING $DB BACKUP on server2 Tape Drive"
FS_LIST=`rsh server2 cat /optdir/backup.cfg| grep :|cut -f2 -d:`
EXIT_CODE=0
for FS in $FS_LIST
do
echo "BACKING UP $FS FILESYSTEM"
ufsdump 0fu server2:/dev/rmt/${DEVICE}cbn $FS

I also need a script on How to restore each filestsystems from each server backup.

Please help!!! I DO NOT want to backup to a different tape  for each server
nhhgictAsked:
Who is Participating?
 
neteducationCommented:
with ufsdump you can backup to a remote tape, but not backup a remote filesystem.

So as you seem to be pretty good in scripting yourself the basic steps are:

On Server1: dump the local filesystems to the local tape
after that
On Server2: dump the local filesystems to server1:/dev/rmt/{DEVICE}cbn (server1 must trust root trust server 2 for this to work... search for .rhosts-file information if you dn't know how this works
after that
Repeat the second step with any more servers you want.

- you may want to use only /dev/rmt/{DEVICE}n anytime and don't rewind / fsf your tape between the diferent servers and only rewind once at the very end when everything is through.
- instead of running those commands directly on each of the servers you may want to use rsh or ssh to start the commands on the remote servers, so that you can control all from one script.
- if you want to restore something, you need to know which session on the tape it is. Then simply fsf to that session and then use ufsrestore (possibly with a remote drive again)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.