Re: can amanda trigger a script?
2008-03-04 05:25:33
fedora <zuki AT abamon DOT com> (Di 04 Mär 2008 10:26:17 CET):
>
> Hi Marc/all,
>
> U have gave me this script to export database to other directory.
> http://marc-muehlfeld.de/scripts/mybackup.sh
>
> If I use this script on cronjob to export databases, Amanda does not know
> when will it finishes. Manual way, If let say this script finish exported
> databases at 3am. Then I have to run "amdump DailySet1" (cronjob) at 3.30am
> for instance. So, I always have to check and monitor when the script finish
> export databases and the time depends on the size of databases. I have to
> change time setting on cronjob as well. Can Amanda trigger that script so
> that after exporting databases it will run "amdump DailySet1" automatically?
Just run the script in the same cron command:
0 3 * * * mybackup.sh; amdump DailySet1
or if the result of mybackup.sh is critical:
0 3 * * * mybackup.sh && amdump DailySet1
(Supposed that the script will not trigger some background jobs and exit
before they're finished.)
Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
signature.asc
Description: Digital signature
|
|
|