Date: Wed, 28 Mar 2001 17:50:52 +0200 From: Juan Fco Rodriguez Hervella <jrh@it.uc3m.es> To: "(Lista) freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>, "(Lista) freebsd@es.freebsd.org" <freebsd@es.freebsd.org> Subject: Dump Message-ID: <3AC2085C.6FFAE3F3@it.uc3m.es> References: <3AC204DE.A806F35F@it.uc3m.es>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------B9B1C635ED3356B29B72639B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi:
Someone has worked with dump/restore ?
I have in the crontab:
0 3 * * * /root/bin/backup
The file "backup" is a script that execute the
call to dump. (is attached to this mail).
My problem is that sometimes "dump" is blocked, and
nothing is shown in the file log, and worst, I can
not kill the process (state "D")
I have read in the "man dump" the following:
<< Dump requires operator intervention on these conditions: end of tape,
end
of dump, tape write error, tape open error or disk read error (if there
is more than a threshold of 32). In addition to alerting all operators
implied by the -n key, dump interacts with the operator on dump's
control terminal at times when dump can no longer proceed, or if
something is
grossly wrong. All questions dump poses must be answered by typing
``yes'' or ``no'', appropriately. >>
I suppose that this is the problem, but I can not know how solve it, and
I
do not understand what is "dump's control terminal"...
If I run the script from the crontab, where do I define the terminal?
How?
Is this the problem actually? Can I execute dump without this
interactivity ?
Thanks in advance and sorry if this question is not appropiate for this
list, but some idea will be very appreciated.
Best Regards.
--
*********************************
Juan F. Rodriguez Hervella
Universidad Carlos III de Madrid
********************************
--------------B9B1C635ED3356B29B72639B
Content-Type: text/plain; charset=us-ascii;
name="backup"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="backup"
#! /bin/sh
# Lugar donde depositar los backups
MOUNTPT="/backup"
# Montamos el disco de backup
/bin/mount $MOUNTPT
# File System (o directorio) del que hacer el backup.
TARGET_1="/home"
TARGET_2="/var/spool/mail"
TARGET_3=""
TARGET_4=""
# Nivel del backup a realizar. Dom=0 Lunes=1 ... Sab=6
if [ -e $MOUNTPT/full ] ; then
DUMPLEVEL=0
rm -f $MOUNTPT/full
else
DUMPLEVEL=`date +%w`
fi
#Fichero donde dejar el backup:backup.<fecha:yyyymmdd>.<nivel>.<num de volumen>
FILE_1="home.`date +%Y%m%d`.$DUMPLEVEL"
FILE_2="mail.`date +%Y%m%d`.$DUMPLEVEL"
FILE_3=""
FILE_4=""
# Hoy toca full, movemos los historicos
if [ "$DUMPLEVEL" = "0" ] ; then
rm -fr /backup/week1
mv /backup/current /backup/week1
mkdir /backup/current
fi
# realizamos el dump
for I in 1 2 3 4; do
eval TARGET=\$TARGET_$I
if ! [ "$TARGET" = "" ]; then
eval FILE=\$FILE_$I
DRIVE=$MOUNTPT/current/$FILE
/sbin/dump -$DUMPLEVEL -B 2048000 -u \
-f $DRIVE.1,$DRIVE.2,$DRIVE.3,$DRIVE.4 $TARGET >> /root/backup.log 2>&1
# Comprimimos el backup realizado.
for i in 1 2 3 4; do
if [ -e $DRIVE.$i ]; then
/bin/gzip $DRIVE.$i
fi
done
fi
done
#desmontamos el disco de backup
/bin/umount $MOUNTPT
#limpiamos por si acaso
/sbin/fsck -a $MOUNTPT
--------------B9B1C635ED3356B29B72639B--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AC2085C.6FFAE3F3>
