On Thu, Jun 10, 2004 at 12:04:52PM -0400, Tabor J. Wells <[EMAIL PROTECTED]> is thought to have said:
> I have a fairly complicated and large MySQL installation that I need to add > a new slave server to and I'm uncertain about the best way to get this done > with the least risk to my live environment and least downtime of my existing > masters. I'm hoping that someone here can suggest the best way for me to do > this. > > Here's the setup: > > ServerA (Redhat 9, MySQL 4.0.16) > Replicates 4 dbs from ServerB > Replicates 2 dbs to ServerB > > ServerB (RedHat 9, MySQL 4.0.16) > Replicates 4 dbs to ServerA > Replicates 2 dbs from ServerA > Has 19 other dbs > > I need to add ServerC which would contain replicas of all 23 dbs > (which is about 60gb of data total). ServerC is a RedHat 7.3 server and > would be running MySQL 4.0.20. > > The problem is that those dbs contain a mixture of InnoDB and MyISAM tables > How do I get a consistent snapshot of those dbs and get the replication set > up? > > Is it safe to just shutdown ServerB, copy all of the mysql data dir (including > the ibdata files) to ServerC, restart ServerB, and then change the my.cnf of > ServerC to set a new server-id, master-host, replicate-do-db entries and start > ServerC? > > Is there anything else that needs to be done to ensure the consistency of > the data and that the replication will work as expected? > > If this isn't the best way to set up replication for an already-running > server with a mixture of InnoDB and MyISAM tables, what is? For the sake of the list archives and anyone else that needs to do this in the future, the method I suggested above does in fact work just fine and doesn't require the use of mysqldump --opt as Egor suggested. It took about 5.5 hrs to rsync -ac the mysql data directory from ServerB to ServerC over a 100M connection while ServerB's mysql instance was shut down. -- -------------------------------------------------------------------- Tabor J. Wells [EMAIL PROTECTED] Fsck It! Just another victim of the ambient morality -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]