Amanda-Users

Re: Possible to run scripts just before an amdump?

2006-06-01 21:57:17
Subject: Re: Possible to run scripts just before an amdump?
From: Olivier Nicole <on AT cs.ait.ac DOT th>
To: paul.bijnens AT xplanation DOT com
Date: Fri, 2 Jun 2006 08:47:24 +0700 (ICT)
> > So, my question would be: is there a way to tell amdump to execute
> > one or several scripts just before the backup begins (and of course,
> > wait that these scripts complete)?
> 
> An ugly method is to use a so-called wrapper, explained here:
> 
> http://wiki.zmanda.com/index.php/Backup_client#pre_and_post-_backup_scripts_.28wrappers.29

Just a couple of remarks:

- be carefull what is the value of the PATH enviuronment variable set
  by default in your script.

- using a wrapper will have amverify to give messages like:

Skipped database1000._database.20060602.1 (** Cannot do /usr/local/bin/mygtar 
dumps)

- there may be implications if you do a recover of that DLE on Amanda
  server where mygtar is unknown.

- having a builtin mechanism would of course be nice, but that would
  not save the burden of writting the pre and post scripts...

- once the architecture of the wrapper is written, it can be adjusted
  to do different actions for different DLE.

Best regards,

Olivier