To restore specific tables (or full databases) I often use this trick (I'm
just writing this down from memory, you would want to run it through a
test environment first). It runs something like this:
1) MASTER: query> FLUSH TABLES WITH READ LOCK;
query> SHOW MASTER STATUS\G
2) SLAVE: query> SHOW SLAVE STATUS\G # repeat until caught up with master
query> FLUSH TABLES WITH READ LOCK;
3) MASTER: copy table or database to local disk or directly to slave
query> UNLOCK TABLES; # master is operational again
4) SLAVE: copy new tables into database
query> UNLOCK TABLES;
Atle
-
Flying Crocodile Inc, Unix Systems Administrator
On Tue, 7 Mar 2006, Michael Jeung wrote:
> Hi Folks,
>
> We've got a Single Master/Multiple Slave environment.
> Recently, we had some corruption on one of the slaves and I had to
> repair the affected tables.
>
> After the repair completed, some of the rows on the slave had been
> deleted - so the Master and the Slave weren't exactly in synch. The
> slave was missing some records. I verified this myself with a
> select count(*) on the table.
>
> Now, I know this is the normal way for MySQL to repair it's database.
>
> However, what I'd like to do is restore these missing rows to the
> Slave without doing a dump and reload from my backups. Is this
> possible?
>
> The way that we normally approach this problem is to take an
> unaffected slave and copy the mysql directory from an unaffected
> slave over to the corrupt slave. Then we restart MySQL on the
> corrupt slave and things work out without too much difficulty.
> However, this has always seemed like a terrible way to restore a
> corrupt slave to me. Is there a more elegant way to do it?
>
> Regards,
> Michael Jeung
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]