On Thu, May 24, 2001 at 01:17:08PM -0400, Billy Harvey wrote:

> Jeremy Zawodny <[EMAIL PROTECTED]> wrote:
>  > It is possible to get in a situation where you either "miss" updates
>  > on the slave, or your slave tries to run an update query that is
>  > already reflected in the table that you are copying.
>  > 
>  > If the table is not updated frequently (and doesn't take long to
>  > copy), it probably won't be a problem for you. But with larger tables
>  > which are constantly changing, this can become a problem that requires
>  > a little more work on your part.
>  > 
>  > Jeremy
> 
> Jeremy/others,
> 
> What problems does the audience see in using an rsync approach to
> keeping masters and slaves in sync?

Using rsync isn't unreasonable. It's very useful if you need to
control exactly when/how it happens. You might

  -- have a slow connection between the servers and only want to use
     it during non-peak time

  -- have a dial-up connection between the servers

  -- don't need a completely up-to-date copy of data on the slave

and so on.

The trick is making sure that the files are in a clean state when to
attempt to rsync them. This means that you'll want to do something
like:

  (1) FLUSH TABLES WITH READ LOCK; (on master)
  (2) shutdown the replica
  (3) run rsync
  (4) start the replica
  (5) disconnect from master to release the locks

Granted, I've not tested that, but it's based on the same idea as
`myrepl', the script I wrote to make it easy to create an initial
replication snapshot.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878    Fax: (408) 349-5454    Cell: (408) 439-9951

MySQL 3.23.29: up 5 days, processed 34,536,269 queries (79/sec. avg)

---------------------------------------------------------------------
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

Reply via email to