On Thu, 4 Apr 2002, John Rosendahl wrote: > Does anyone know of a tryly slick way to back up mysql databases. > Right now I am trying to write a script which read-only locks the > databases > then runs amanda and then unlocks the data bases. I am having fun doing it > but I see little reason to re-invent the wheel if someone else has > already done this. > I also could be going about this in an entirly wrong headed manner. All > I know is > I will not have the diskspace to hold an entire mysql hotcopy on disk, > so I am > trying to find a way to have amanda back up the database files directly. > The > ultimate solution would be to have amanda go through and lock the databases > individualy as it works but that I fear is close to impossible. Oh well. > thanks in advance for any help > -john > > > >
I think I found this somewhere in the mysql notes, etc: more /usr/local/sbin/dump_mysql #!/bin/sh # Quick little script to get stable copies of the database. /usr/local/bin/mysqlhotcopy -u root -p **** --allowold <your_table_names> <directory_to_dump_to> You could either do it like that and subsequently compress them, but I'm sure Amanda would take care of that anyway. YMMV -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Doug Silver Network Manager Quantified Systems, Inc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
