vdump, /etc/vdumpdates, crontab and tape

From: Kjell Andresen <kjell.andresen_at_usit.uio.no>
Date: Fri, 22 Nov 1996 09:44:28 +0100 (MET)

Hello!

I have a little problem writing av script to do full backups.
There are a few problems:

1. When the script is made up of more vdump statments all but the first
one fails as the tapedevice is busy when the next vdump is submitted.

2. vdump -u : Does not log entries in /etc/vdumpdates when the
commands is run in a script. It's OK if the statment is run on the command
line. Sad because it's easy to check in /etc/vdumpdates.

3. The script is not succesfully run if output is written to a file in the
command-line in crontab, so I had to add the exec-line in the beginning of
the script.

TIA
Kjell Andresen Systems administrator, University of Oslo, Norway
                Center for Information Technology Services and
                Department of Geophysics

Here is a similar sample script:
---------------------------------
#!/bin/sh

# A semaphor to check if job is started from cron
touch /tmp/4mm.`date +%y%m%d-%H%M`

#
# Fixing output from script to file
# redir. in crontab does not work, e.g
# 30 22 * * 5 /local/sbin/4mm >/tmp/logg.`date +%y%m%d-%H%M` 2>&1
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

exec >/tmp/logg.`date +%y%m%d-%H%M` 2>&1

echo 1 No-rewind, Quiet-with-warnings, Update-/etc/vdumpdates
/sbin/vdump -0 -Nqu -f /dev/nrmt0h /home

echo 2 This line and the following ones fails because tape is busy
/sbin/vdump -0 -Nqu -f /dev/nrmt0h /

echo 3
/sbin/vdump -0 -Nqu -f /dev/nrmt0h /usr

echo 4
/sbin/vdump -0 -Nqu -f /dev/nrmt0h /my-machine/local

exit 0
Received on Fri Nov 22 1996 - 10:00:01 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT