MySQL Forums
Forum List  »  Utilities

restoring a DB from slave to the master in a replicated 2 node environment
Posted by: Ronan McGlue
Date: April 27, 2009 01:55AM

I know what is required for the simple case of restoring a DB to a point in time before some user hits drop table.

stop master
copy over last nights full backup to data dir
fix FS permissions
start master with limited access
run binlog until drop is found.
skip drop and continue.
verify and bring up full master.

My Question is what is to be done if there are more than one DB on the server and as before a user in one of the DBs drops a a table and needs it restored. Can this be done without affecting the other DBs? Ie can this be warm restored by revoking all access to that specific DB and copying backup files into DATADIR then running binlog against DB as mentioned?

what about if the error isnt noticed until an arbitrary time later when the table has new inserts in it? how can the backups be used in this instance? mv the datadir to a temp location. restore from backup and then replay all binlog up to latest (obviously ignoring the drop statement)?

Is there somewhere I can RTM on restoring from slave to master in a replicated 2node environment!?



Options: ReplyQuote

Written By
restoring a DB from slave to the master in a replicated 2 node environment
April 27, 2009 01:55AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.