On Wed, Jan 17, 2001 at 09:46:40PM -0800, Mike Wexler wrote:
> It appears to be clearer, but its hard to tell unless you are
> actually trying to set it up. The first time I read it, I was
> setting up replication and the same time.
So was I. And I failed the first 2 or 3 times until I made some
assumptions and guesses.
> My one concern, is it sounds like in order to set up replication you
> need to bring down the master for long enough to archive all the
> databases.
You do need to bring the server down briefly to at least have it pick
up the binary log entry in my.cnf. But that's really it.
> This could have a major impact on a 24/7 server.
Agreed. I had mine down for 15 minutes during a scheduled maintenance
window when I made my initial snapshot. I didn't like having to do it,
but I needed replication "yesterday" at that point (we had already
suffered one hardware failure).
> These are exactly the kind of servers that would have replication
> set up. Is there no way of during on the binlog, then do a
> mysqlhotcopy or mysqldump | rsh mysql and then using the binlog to
> sync up the changes?
I believe so. What you MUST do is get a consistent snapshot of your
data which matches the time at which your enable the binary log on
your server. I'm working on a section for the manual that describes
how to do it in a more on-line fashion. Here's the rough untested
idea...
* Enable binary logging in my.cnf. This requires a server
stop/start, but that's a few seconds of downtime.
* Get a READ lock on ALL your tables for as long as it takes to back
them up. That allows other clients to at least run SELECTs while
you do it.
* The moment you snapshot finishes, run a "RESET MASTER" to reset
the binary log.
* Release the READ locks and let things run as normal.
* Setup your slaves whenever you get around to it...
Come to think of it, it wouldn't be that hard to script this process.
I think I just might try that. :-) It'd sure make a nice addition to
the MySQL distribution.
Damn. And I was planning on going to bed early...
Jeremy
--
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878 Fax: (408) 530-5454
Cell: (408) 439-9951
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php