Hi
You can write a wrapper, I'm doing so with smbclient but should work for
gtar or dump. I use it to display a Windows popup saying the user to
close applications for a while, sleep 20 seconds, back it up, and a second
popup notifying we are finished. Per machine.
My /usr/bin/smbclient look something like:
#!/bin/bash
(some pre-exec code here)
/path/to/real.smbclient "$@"
returncode=$?
test "$returncode" == "0" && {
(some post-exec code here)
}
exit $returncode
If you want to do diferent things for diferent hosts you can extract
de hostname from the parameters (host=`echo "@" | [sed|awk|...]`) and
write a case sentence (case $host in ... ). You will see the command line
passed to your dump program in the amdump files or in debug files under
/tmp/amanda.
For politeness, you can leave the original program (smbclient,gtar,
dump...) untouched and compile with "--with-smbclient=/path/to/myscrip"
(or dump etc ..) But I think you will need it later in the clients to
restore (just symlink "myscript" to "smbclient" in the clients)
Hope this can help you.
Jordi
>On Mon, 21 Oct 2002 08:55:00 -0700 (PDT) Jerry <[EMAIL PROTECTED]> wrote.
>Is there a way to tell amanda to run a script before a
>backup (i.e. shutdown a database) and a script after
>the backup is done to start the database back up?
>
>My entire run takes 40 minutes so I would prefer
>being able to run the script when the backup for just
>that host starts.
>
>Jerry
>
>__________________________________________________
>Do you Yahoo!?
>Y! Web Hosting - Let the expert host your web site
>http://webhosting.yahoo.com/