backup question

Craig Beasland craig at hotmix.com.au
Sat Feb 7 04:34:48 PST 2004


Hi there,

We have a large disk that now required 2 tapes to backup.  We are trying
to use the -M --new-volume-script to execute a script which sends an
email to the person and waits for them to press the "c" key to continue.
The next-tape scripts works when run from the console directly and the
message is displayed to the user to insert the next tape, but tar still
reports an error.

Have I missed an important step?  The tar seems to execute the script
but then immediately try to write onto the next tape - before I get a
chance to put the new tape in.

Any ideas on how to fix this, or a better method of backing up to multi
tapes?

Here is my script:
#!/bin/sh
mt -f /dev/st0 rewind
tar -c                                                  \
        -v                                              \
        -f /dev/st0                                     \
        --new-volume-script "/etc/scripts/next-tape"    \
        --multi-volume /backup

mt -f /dev/st0 eject

and here is the next-tape command
#!/bin/sh
cat /etc/scripts/newtape.txt | mail -s "new tape" craig at hotmix.com.au

echo -n Press 'C' to continue
while true
do
        read -n 1 keypressed
        if [ "$keypressed" = 'c' ];
                then break;
        fi
        if [ "$keypressed" = 'C' ];
                then break;
        fi
done

cheers
craig


More information about the freebsd-questions mailing list