Hello Nhadie (Ron),
On 4/4/2012 12:09 AM, nhadie ramos wrote:
> Hi
>
> Is it possible if i grab a dump of a certain table from the master
> restore it on the slave and start replication again?
> I have a table that is is not synched on the server, i have tried
> using pt-table-checksum to that table but i get the error "because 1
> cannot be nibbled safely."
>
> so i'm thinking of just stopping the slave, grab a dump of the table
> and restore to slave. will there be any data corruption?
>
> thanks in advance.
>
> Regards,
> Ron
>
Yes, you can do what you propose but it requires careful coordination of
the binary log coordinates at the time you take the image of the table
you want to restore. You want to stop the slave at the exact position
you backup the table, restore the table, then resume replication. If you
do not do it in that sequence, you run the risk of repeating events or
skipping events that were/should have been applied to the table you just
restored.
I propose you learn about the command START SLAVE UNTIL... to see how to
have the slave to stop at a specific log position.
http://dev.mysql.com/doc/refman/5.5/en/start-slave.html
I also recommend reading about the the --master-data option of
mysqldump. There are other ways to take a backup of a table but
whichever method you choose also needs to capture the binary log
position at the moment you make the backup. This is just one easy way.
http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html
With this information, you should be able to capture a good copy of the
table and safely add it to the slave at the appropriate location in the
replication stream.
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN