Amanda-Users

Re: Make amanda unload tape drive?

2003-01-16 01:58:01
Subject: Re: Make amanda unload tape drive?
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Thu, 16 Jan 2003 01:13:14 -0500
On Fri, Jan 10, 2003 at 11:14:55AM +0000, Pavel Rabel wrote:
> > > >Can amanda send a signal to my DLT IV to unload the tape after backups
> > > >are finished, so whoever goes back to swap tapes can just do it without
> > > >waiting to manually unload?
>  
> > For amdump this is easy.
> > 
> > I didn't find a way to do this for amflush.
> > 
> > You must start amflush in the forground in order to answer the
> > questions, and then it backgrounds itself. So you do not know when
> > amflush really ends.
> 
> You may try to run amflush with the -f switch.

Pavel, Sven, others ...

Check if the attached script will help.
I've called it "ampwait", AManda Process WAIT.

By default it checks every 60 seconds for a running amflush.
The period between checks (granularity) can be set with a "-g seconds" option
and the program to wait for can also be specified as a command line argument.

Any additional arguments are a program to execute upon completion of amflush.

An example of usage might be:

   $ amflush DailySet1
     <answer questions>

   $ ampwait -g 20 amflush amtape DailySet1 eject

Alternatively run just 'ampwait' which defaults to '-g 60 amflush' and
run the amtape command separately when ampwait completes.

HTH
jon
-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

Attachment: ampwait
Description: Text document