From: Reindl Harald Date: July 26 2011 3:18pm Subject: Re: Chronicle of fixing broken replication, and a question List-Archive: http://lists.mysql.com/mysql/225428 Message-Id: <4E2EDAB3.3010101@thelounge.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA16E7A5E2030C7E22EA5F53C" --------------enigA16E7A5E2030C7E22EA5F53C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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_d= ata/ /mysql_backup/ date /sbin/service mysqld stop cd /mysql_data/ rm -f /mysql_data/bin* rsync --times --perms --owner --group --recursive --delete-after /mysql_d= ata/ /mysql_backup/ /sbin/service mysqld start --------------enigA16E7A5E2030C7E22EA5F53C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4u2rMACgkQhmBjz394Anlr2QCfVsq2g6tRE7HZUpqd43Knayii F5YAn3KxId1Bb/JXnbU3QD65JemnB2zu =orSb -----END PGP SIGNATURE----- --------------enigA16E7A5E2030C7E22EA5F53C--