List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:July 26 2011 3:18pm
Subject:Re: Chronicle of fixing broken replication, and a question
View as plain text  

Am 26.07.2011 16:18, schrieb Todd Lyons:

> 1.  I did a full copy of the running master database server using
> xtrabackup to a backup server via nfs.  It took 2 hours, of which the
> last 15 minutes did a write lock of the entire server as it copied
> over the *.frm files and the few myisam tables.  This was the most
> troublesome part as it was visible to both users and website owners
> :-(

why are not using two rsync-runs?
the first while mysqld is running
the second directly after stop mysqld

this way you can be 100% sure that you can start the replication
from scratch and your downtime is only a few seconds, best if
enough space to have this target on the master-machine because
while you take the slow way over the network the master is running
with a fresh binlog

#!/bin/bash
rsync --times --perms --owner --group --recursive --delete-after /mysql_data/
/mysql_backup/
date
/sbin/service mysqld stop
cd /mysql_data/
rm -f /mysql_data/bin*
rsync --times --perms --owner --group --recursive --delete-after /mysql_data/
/mysql_backup/
/sbin/service mysqld start




Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
Chronicle of fixing broken replication, and a questionTodd Lyons26 Jul
  • Re: Chronicle of fixing broken replication, and a questionReindl Harald26 Jul
    • Re: Chronicle of fixing broken replication, and a questionTodd Lyons26 Jul
      • Re: Chronicle of fixing broken replication, and a questionReindl Harald26 Jul