SUMMARY:RE: ufsdump many systems to one tape

From: rmckee <rmckeever_at_earthlink.net>
Date: Sat Nov 02 2002 - 14:20:48 EST
Thanks for all the response's.

Almost everyone suggested that I use a no-rewind device, which I do anyway
(/dev/rmt/1ln along with a stacker/library unit).
Many people suggested I look into amanda. But I need to stay with
ufsdump/ufsrestore with ssh.

Thanks to Paul Galjan, I decided to use the "for do done" which seems to
work well. I still need to do a complete restore, but was able to extract
single files from each host.

#
#! /bin/ksh
#
#
CYRCS=/usr/bin/cyrcs; export CYRCS
CYSTACKER=/dev/cychs0; export CYSTACKER
device='-j /dev/cychs0'
WK=`date +%W`
ON_WK=`expr $WK % 2`
tape=/dev/rmt/1ln
tlog=/logs/tape/Buplog-`date|awk '{print $2"-"$3"-"$6}'`
hosts="host1 host2 host3 host4"

if [ $ON_WK = 1 ]; then

#------- Check that Systems are available
for host in $hosts
do
alive=`/usr/sbin/ping -v $host 3 | awk '{print $3}'`
alive1=`/usr/sbin/ping -v libunit 1 | awk '{print $3}'`
done
if [ $alive = "alive" ] && [ $alive1 = "alive" ];
then
#------- Systems are available

echo "######## Begin of Backup for  `date` ################"

# Move Arm/Tape into correct position
sleep 2
cyrcs $device -c 'move slot 5 drive 1'
sleep 100
mt -t $tape rew
sleep 20

# ------------- loop through full backups---
# ------------- Using ssh And Auth_keys ---

for host in $hosts
do

 /usr/local/bin/ssh -T -o "IdentityFile2 /home/user/.ssh/backup" $host

done

# Move Tape/Arm back
sleep 20
cyrcs $device -c 'move drive 1 slot 5'
sleep 10
echo "######## End of Backup for `date` ################"
sleep 2

else
 echo "Unable to ping and do backup for $host" >> $tlog
 /bin/mailx -s "Backup Problem for $host or cylib" user@company.com < $tlog
exit 1
fi

# Mail Log if OK
/bin/mailx -s "Log file for Backups" user@company.com < $tlog
exit 0

# To say we run on odd or even week of year
else
echo This is an even week. This Schedule runs backups on odd weeks. |
/bin/mailx -s "Backup did not run, even week" user@company.com
 fi
exit 0
#

Ron

-----Original Message-----
From: sunmanagers-admin@sunmanagers.org
[mailto:sunmanagers-admin@sunmanagers.org]On Behalf Of
rmckeever@earthlink.net
Sent: Friday, November 01, 2002 7:17 AM
To: sunmanagers@sunmanagers.org
Subject: ufsdump many systems to one tape


Hi,

I have an AIT-3 tape that is 100gb. I have a few systems I would like to
ufsdump to the one tape. What is the best method? Below is what I think
would
work in a shell script? Any input would be great. Thanks.


First system:
mt -f $tape rew
ufsdump 0u $tape /
ufsdump 0u $tape /usr
etc...

Second system:
mt -t $tape eom
ufsdump 0u $tape /
ufsdump 0u $tape /usr
etc...

Third system:
mt -t $tape eom
ufsdump 0u $tape /
ufsdump 0u $tape /usr
etc...

Regards,
Rob
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Nov 5 18:17:06 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:58 EST