Amanda-Users

Re: Do not start Job if label not correct?

2008-04-02 05:47:35
Subject: Re: Do not start Job if label not correct?
From: Tony van der Hoff <tony AT vanderhoff DOT org>
To: amanda-users AT amanda DOT org
Date: Wed, 2 Apr 2008 10:02:05 +0100
On 2 Apr at 9:47 Theodotos Andreou <theo AT francoudi DOT com> wrote in message
<47F3482A.20907 AT francoudi DOT com>

> Is there a way to tell a Backup job not to start if there is no correct
> label found on the changer? I do not want to use amflush later because
> /amandadumps is too small to host all level 0 images during a monthly
> archival backup.
>

I do this:

----------------------------------------------------
#!/bin/bash
#Check tape, and only run backup if successful

DUMP=HomeDumps

/usr/sbin/amcheck -w $DUMP
if [ $? -eq 0 ]
then
        #retension tape
        mt retension

        #run backup for group
        /usr/sbin/amdump $DUMP

        #verify the tape
        echo Verifying ${DUMP}
        /usr/sbin/amverify $DUMP
else
        echo Failed $DUMP
fi
----------------------------------------------------

Customise to suit...
-- 
Tony van der Hoff        | mailto:tony AT vanderhoff DOT org
Buckinghamshire, England 

<Prev in Thread] Current Thread [Next in Thread>