Our solution for (client != server) has been to still use a cron job
to stop/restart the database. Since I manage amanda (usually as
user=amanda) and can restart (Oracle) from a script running as root
I can easilly shutdown - because I schedule the amanda job on the
server; startup is slighly more difficult but only in that we have
to schedule a fairly wide window ie: dbase can't come up as soon as
amanda finishes, we have to leave 'in-case' time.
Actually this is the same for us when client == server. There is no
direct tie from amanda to root, though I suppose I could...
root cron
---------
dump.sh
-------
su - oracle -c dbshutdown.sh
su - amanda -c amdump config
su - oracle -c dbstartup.sh
and tie it together that way.
> Yu Chen wrote:
>
> > I think it is easier just modify the amdump script to run scirpts
> > before/after backups, so no recompiling, no testing, plain shell
> > scripting. Just put whatever you want at the beginning and end of amdump.
>
> Yes, but amdump runs on the server, not on the client.
>
> And if it's only one machine where server = client,
> then why don't you just execute this from crontab:
>
> #!/bin/sh
> dbstop
> amdump TheConfig
> dbstart
>
> No need at all to change amdump in this case.
> Or did I miss something?
>
> --
> Paul Bijnens, Xplanation Tel +32 16 397.511
> Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512
> http://www.xplanation.com/ email: Paul.Bijnens AT xplanation DOT com
> ***********************************************************************
> * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
> * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
> * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
> * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
> * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
> * ... "Are you sure?" ... YES ... Phew ... I'm out *
> ***********************************************************************
>
|