Hello...
Aaron Smith wrote:
> Does Amanda have any kind of hooks to run external programs? I need to
> backup a database server and would like a nice, clean way to have the
> database
> shutdown before the amanda backup begins. Ideally, it would be great if
> this
> could be done on the client side. That way the database server could
> shut down
> the database processes, do it's amanda thing, and then restart the DB
> without having
> to sit around and wait for the amanda server to finish with, say, the
> mail server or
> some such. It's possible to do with scripts, I'm sure, but would have
> to be timed just
> right and just really smacks of one of those "Well, the balloon pops
> which scares the
> chicken into laying an egg which hits the lever releasing the cannon
> ball...etc..." kind
> of solutions. :)
>
This is what I do...
With mysql I run 'mysqlhotbackup'. This is a script that comes with
mysql that locks the DB tables readonly, then copies the db files
somewhere else. Like /var/mysql/database/whatever.frm ->
/backup/mysql/database/whatever.frm. it uses cp or scp by default, but
It was easy to hack it to use rsync.
With oracle I use rman and have it do a datafile copy
# This is for crontab
connect target rman/<passwd>;
connect catalog rman/<passwd>;
# oops almost sent <passwd> to amanda-list :(
run {
allocate channel ch1 type disk;
sql "alter system archive log current";
copy current controlfile to '/backup/oracle/controlfile.ctl';
copy datafile '/oracle/PATH/datafile.dbf'
'/backup/oracle/datafile.dbf';
copy datafile ...
...
release channel ch1;
}
list copy;
I run these via cron about midnight. They finish well before 1am. I
start amanda at 1am and backup "/backup", among other things.
make sense?
It works for me, YMMV
--
Christopher McCrory
"The guy that keeps the servers running"
[EMAIL PROTECTED]
http://www.pricegrabber.com
True, it returns "" for false, but "" is an even more interesting number
than 0. -- Larry Wall in <[EMAIL PROTECTED]>