Date: Thu, 12 Jun 2003 13:57:16 -0400 From: "Eric W. Bates" <ericx@vineyard.net> To: "Scott Gerhardt" <scott@g-it.ca> Cc: freebsd-isp@freebsd.org Subject: Re: Mirroring Solution Message-ID: <05d501c3310c$1030ad60$68c311cc@fortiva> References: <BB078F1D.4F4D%scott@g-it.ca>
index | next in thread | previous in thread | raw e-mail
----- Original Message ----- From: "Scott Gerhardt" <scott@g-it.ca> To: <freebsd-isp@freebsd.org> Sent: Saturday, June 07, 2003 2:46 PM Subject: Mirroring Solution > > Does anyone know of a good way to mirror two servers running Apache, PHP and > MySQL on FreeBSD 4.8? > > The ideal solution would be real-time (synchronous) or near-real-time > mirroring. The failover transfer is already taken care of. > > I think Rsync run from cron would do a good job of syncing the relatively > static files (configs, php scripts etc.). I don't think Rsync would be a > good way of mirroring the MySQL DB though. For that, I'm thinking of using > MySQL's built in replication. You are correct. Syncing live mysql data files is a bad idea. At any given instant they cannot really be considered to be in a consistent state because so much information is in memory. If you want to physically copy files, mysqlhotcopy does a pretty good job. However, we have found that using replication (v 4's circular replication is a big improvement) allows us to run mysqlhotcopy on the backup machine rather than the live one (we do a hot dump every 15 minutes). If you have to restore from tape, you will need a dump. NB: replication is clear-text. (the mysql v4 docs say "no ssl for replication yet") We use stunnel to obscure things. There is a problem with rsync when the list of files to replicate grows too long. We never really nailed it down; but if you attempt to rsync /usr, it will probably fail. What we see is the sending version of rsync eventually timing out while waiting for the receiving copy; meanwhile the receiving copy ends up hung with no visible errors. Our work-around was a little meta script with a config file listing which trees should be synced between which machines; and it runs smaller rsync jobs in sequence. Oddly enough, we ran into similar failure modes with rdist and unison. > I think dumping the MySQL data and importing into the slave would be a bit > clumsy and slow especially when the DB grows quite large. > > Does anyone on the list have any recommendations or experience with > mirroring of this type? > > Any other recommendations besides Rsync + MySQL replication? > > > > Thanks, > > > -- > Scott Gerhardt, P.Geo. > Gerhardt Information Technologies [G-IT] > > > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" >help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?05d501c3310c$1030ad60$68c311cc>
