0

my database size is very big around 100gb and when I restore it takes 3 days to restore. I am using amazon ec2.

My question is I want to setup a new slave to MYSQL master, can I take a snapshot of the Master and create a new instance using the snapshot and then enable replication in between.Given that I take log position before the snapshot and my.cnf changes as required. Snapshot is very fast and takes 1-2hours to create a new machine, whereas mysqldump is taking very very long.

I was just worried if replication works using above method, can anyone help please.

0

I would advise you to drop mysqldump and move to Percona Xtrabackup. It will give you a filesystem level backup that can be made online. Restoring those backups will be orders of magnitude faster.

0

on Amazon system you can use following steps to setup replication for MySQL

  • Choose a low/off production window
  • Note Master co-ordinate using show master status
  • You may consider using flush tables with read-lock, just to make sure you are sure that your co-ordinates doesn't change while you are creating snap shot
  • take snap shot and restore
  • Change server-id and relay log and issue change master

Hope it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.