<snip>
> > Jim,
> >
> > I didn't word my question quite right because I was only guessing at
> > what a LVM snapshot was. Moreover, what you're saying is all correct.
> > However, I was not suggesting that the snapshot be kept around once the
> > backup is made.
> >
> > Let's go to article "What is a Logical Volume Manager (LVM) snapshot and
> >  how do I use it?" in the RedHat k'base
> > <http://www.redhat.com/apps/support/knowledgebase/>.  It says "After
> > performing the backup of the snapshot partition we release the
> > snapshot".  This implies, at least to me, that one doesn't need a 2nd
> > database server or to do a mysqldump (your steps 5-7).  Instead, we just
> >  tar cv /mnt/ops/dbbackup (to use the article's example name for the
> > mounted snapshot), save the tape, and dispense with the snapshot.
> > Wouldn't that work?  MySQL keeps its data in files already, so why is it
> >  necessary to mysqldump it?  Are you only trying to avoid having to also
> >  backup the mysqld version that wrote the data files (to ensure that
> > these can be read later)?
> >
> > George
> The LVM snapshot will hold the state of the database as it is written to
> the  disk.  However, the database engine may have to write several things
> to the disk to ensure consistency (e.g, main table and index). If you take
> the snapshot between these two operations the database will be in an
> inconsistent state.  Mysqldump locks the tables before performing a dump
> to prevent this.
> 
> -------
> 
> William R. Mussatto, Senior Systems Engineer
> http://www.csz.com
> Ph. 909-920-9154 ext. 27
> FAX. 909-608-7061

William,

Doesn't "TABLES WITH READ LOCK" avoid the kind of db inconsistency problems you describe?

Jim's original post, http://lists.mysql.com/mysql/188871, specified step one as
    
 1. effectively quiesce and stabilize the database via "flush tables
with read lock"

which, according to http://dev.mysql.com/doc/mysql/en/flush.html, 

              Closes all open tables and locks all tables for all
              databases with a read lock until you execute
              UNLOCK TABLES. This is very convenient
              way to get backups if you have a filesystem such as
              Veritas that can take snapshots in time.

George
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to