[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mysql snapshot

You can do all the work in one mysql connection by using Perl and the DBI
module.  It basically lets u script an interactive client.  That way u never
lose ur lock.  You can even control all the servers in ur cluster
simultaneously from the same script to change the master.  The MySQL manual
has some good documentation on the Perl DBI.

At 02:13 AM 8/5/05 +0200, Christian wrote:
>but "CHANGE MASTER TO" takes the "recorded_log_position" as an argument
>and so i'd have to issue SHOW MASTER STATUS on the (LOCK'ed) server first.
>but all this should be done in a script and when i issue the READ LOCK or
>"SHOW MASTER STATUS" on the server (mysql -h server...) the server is
>unlocked again, when "mysql -h server ..." returns. all the howtos out
>there assume that i do "mysql backups" with 2 interactive shells: issue
>READ LOCK on the server, keep the mysql client connected - then take the
>snapshot, CHANGE MASTER TO... - then UNLOCK the server.
>how do i take snapshots / issue CHANGE MASTER TO on a client, while the
>master is still LOCK'ed?

"...ne cede males"


Reply to: