Re: HP Autoloader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Joshua Baker-LePain wrote:
On Fri, 18 Jan 2008 at 12:21pm, Joseph L. Casale wrote


...

I use a simple script with tar.

The core is:

cd /
tar cvlbf 512 /dev/nst0 \
    --multi-volume --new-volume-script /usr/local/bin/mtxnext \
    --ignore-failed-read \
    . >$LOGDIR/root_$BACKUPDATE.log 2>&1

The mtxnext script contains:

#!/bin/bash

echo start of mtxnext
date
/usr/sbin/mtx status
echo mtxnext switching tape
/usr/sbin/mtx next
if test $? -ne 0
then
  exit 1
fi
echo mtx next done, wait for tape at `date`
/usr/local/bin/waittapeload
if test $? -ne 0
then
  exit 1
fi
/usr/sbin/mtx status
date
echo mtxnext ended
exit 0

and waittapeload contains:

#!/bin/bash

# wait for tape to be loaded:

count=1
tapeloaded=0

until test $count -gt 600 -o $tapeloaded -eq 1
do
  mt -f /dev/nst0 status | fgrep -q "BOT ONLINE"
  if test $? -eq 0
  then
    tapeloaded=1
  fi
  count=`expr $count + 1`
  sleep 1
done
if test $tapeloaded -eq 1
then
  exit 0
else
  exit 1
fi

The main script does a tar of /boot followed by a tar of /

Easy and simple.

Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@xxxxxx Homepage: http://www.crc.dk
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux