List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 29 2013 2:46pm
Subject:re: replication newbie questions
View as plain text  
Hi!

>>>>> "Ed" == Ed L <mysql.com@stripped> writes:

Ed> Mysql newbie here, looking for some help configuring 5.0.45 master-slave 
Ed> replication.  Here's my scenario...

Ed> We have a heavily loaded 30gb 5.0.45 DB we need to replicate via 
Ed> master-slave configuration to a new, beefier server running same mysql 
Ed> 5.0.45, and then cutover to the new server.  Due to extreme SAN 
Ed> congestion and a grossly overloaded master server, our DB dumps take 5.5 
Ed> hours.  But we cannot afford that much downtime or locking during the 
Ed> replication transition; we can manage 10-15 minutes, but more is very 
Ed> problematic.

Ed> I understand that "FLUSH TABLES WITH READ LOCK" will lock the tables for 
Ed> the duration of the 5.5 hour dump.  Is this true?

Yes.

Ed> If so, we'd like to dump/initialize/sync slave WITHOUT any locking 
Ed> anything the master for more than a few seconds if at all possible.  
Ed> Will this give us the dump we need?

Ed>      mysqldump --single-transaction --master-data --all-databases

You can do a dump without locking by using the xtrabackup tool.
This however assumes you are using InnoDB as the storage engine.

The other option is to use file system snapshots, if your file system
supports that.  In this case you only have to do the FLUSH TABLES
... for the duration of the snapshot.

Regards,
Monty
Thread
replication newbie questionsEd L.28 Aug
  • Re: replication newbie questionsAnanda Kumar28 Aug
    • Re: replication newbie questionsEd L.28 Aug
      • Re: replication newbie questionsAnanda Kumar28 Aug
  • re: replication newbie questionsMichael Widenius29 Aug