Mark, ----- Alkuperäinen viesti ----- Lähettäjä: "Mark Steele" <[EMAIL PROTECTED]> Vastaanottaja: "'Heikki Tuuri'" <[EMAIL PROTECTED]> Kopio: <[EMAIL PROTECTED]> Lähetetty: Monday, March 08, 2004 6:25 PM Aihe: RE: slave hotbackup question
> Heikki, > > So if I understand this correctly, the following procedure could be used > to create a hot backup from a slave which could be used to create a new > slave server: > > 1) Create a hot backup of the innodb tables on theslave with ibbackup > (with --suspend-at-end) > 2) Create a hot backup of the MyISAM tables with the same kind of > procedure > as mysqlhotcopy once ibbackup suspends near the end of the backup (flush > tables with read lock, copy the *.frm|*.MYI|*.MYD files) yes, this is what the innobackup Perl script http://www.innodb.com/manual.php#innobackup does. > 3) Before unlocking the tables from the read lock get the master log > file > and log file position from the slave and save this information for > setting > up the new slave (from the slave, show slave status and store the values > of Master_Log_File and Read_Master_Log_Pos) InnoDB internally stores in the slave the master binlog position up to which the slave was able to process queries. InnoDB prints out this information in crash recovery. You should use the master binlog file position that mysqld prints out when you start it on the backup you have taken (mysqld at the first start-up does a mock-up 'crash recovery'). Since COMMITs can happen also during the locked phase, there is a theoretic possibility that SHOW MASTER STATUS does not print the right position for the backup. > 4) unlock the tables, allow ibbackup to finish it's backup > 5) Resume normal operation > > Personally I would much rather be able to setup new slaves from another > Slave than having to take snapshots of the master, as this is disruptive > in a mixed InnoDB/MyISAM environment (We are doing somewhere in the > vicinity of > 500 queries/sec in peak times). I can understand this. > Regards, > > Mark Steele > Implementation Director > CDT Inc. > [EMAIL PROTECTED] Best regards, Heikki Innobase Oy InnoDB - transactions, row level locking, and foreign keys for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php Register now for the 2004 MySQL Users Conference! http://www.mysql.com/events/uc2004/index.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]