On Friday 11 October 2002 05:07, John P. Looney wrote:
> Hi, I was wondering if anyone had solutions for backing up live
>databases.
>
> I've some (smallish) databases - around 2GB maybe, that I'd like
> to backup. I was wondering how amanda could be configured to do
> this.
>
> Is it possible to do something like getting the amanda user to
> run a script shutting down the database, while it runs tar/dump
> on the database filesystems ? (or, as in the case of informix,
> the raw partitions) ?
>
> Or, am I better off having a huge disk on the database boxes, and
> doing a dump of the databases as SQL to disk every night, before
> the backup is run ?

Generally, I think most have recommended that some sort of a 
snapshot be done, and the snapshot then backed up.  This is the 
essence of your latter idea.

However, I'd see no real problem in my limited experience in 
attempting to write a script wrapper around amanda that did the 
former.  That would still take only one crontab entry.  For error 
catching the next morning I think I'd want to do it in something 
resembling this pseudocode:
-------------
#!/bin/bash
do whatever shuts down the database && \
run amanda && \
restart database
-------------
The output of that simplied script should be redirected to a logfile 
of some kind to be inspected the next morning, and any corrective 
action required can then be taken.  The && \
stuff means that the script will exit on any error before the next 
line has a chance to cover up the error with its excessive 
verbiage.  Lots easier to troubleshoot that way, and simple enough 
to complete by hand once the error is investigated.

Database experts please feel free to shoot me down. :-)

--- 
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz  512M
99.17% setiathome rank, not too shabby for a WV hillbilly

Reply via email to