PDA

View Full Version : Full Master Backup for installing slaves?



xaos
May 6th, 2008, 07:07 AM
Hello,

normally I would make a "mysqldump --opt" in order to make a dump from the mysql master in order to set up mysql slaves. This includes the information about the binlog position and file needed for the "change master to..." statement on the slaves.
So how to do this with Zmanda? I made a backup of the master, restored with on a new slave..the only thing missing is the binlog position and file information..help needed!

Thx in advance
xaos

kkg
May 15th, 2008, 06:56 PM
Hello,

normally I would make a "mysqldump --opt" in order to make a dump from the mysql master in order to set up mysql slaves. This includes the information about the binlog position and file needed for the "change master to..." statement on the slaves.
So how to do this with Zmanda? I made a backup of the master, restored with on a new slave..the only thing missing is the binlog position and file information..help needed!

Thx in advance
xaos


use --replication. This will put the binlog position in the dump file.

--kkg

rvining
July 31st, 2008, 04:05 AM
Surely the replication switch is purely for backing up slave instances, so as to pick up the master.info and the relay-log.info files.

Zmanda looks like it just stores the binlog file name in the index file, but not the binlog position, so how would one create a new snapshot from a master in order to seed a new slave - ensuring the CHANGE MASTER command can be executed with exactly the correct bin position?

kkg
July 31st, 2008, 10:59 PM
Surely the replication switch is purely for backing up slave instances, so as to pick up the master.info and the relay-log.info files.

Zmanda looks like it just stores the binlog file name in the index file, but not the binlog position, so how would one create a new snapshot from a master in order to seed a new slave - ensuring the CHANGE MASTER command can be executed with exactly the correct bin position?

On a regular mysql server if --replication is used, the --master-data=2 will get passed to mysqldump in case of a logical full backup.

Zmanda keeps the binlog name only since that is used for takign the next incremental backup. But if you are sure the database does not get changed during the backup you can basically set the change master to the top of that binlog file name. This is because, at the beginning of any backup, ZRM flushs the logs files.

--kkg

rvining
August 4th, 2008, 02:10 AM
Is there no workaround for this? We run our LVM/snapshot's on a production system. The binlog position is vital for seeding a new slave from a master or point-in-time recovery when a incremental backup hasn't run since the last full one. Correct me if I'm wrong but one can't assume that the top of the next binlog file is ok to start at, as the system might have had transactions in the split second from the flush logs and the start of the snapshot. If this is ok then what bin log position do you start at - 4, 98 - not sure?

kkg
August 4th, 2008, 02:44 AM
Is there no workaround for this? We run our LVM/snapshot's on a production system. The binlog position is vital for seeding a new slave from a master or point-in-time recovery when a incremental backup hasn't run since the last full one. Correct me if I'm wrong but one can't assume that the top of the next binlog file is ok to start at, as the system might have had transactions in the split second from the flush logs and the start of the snapshot. If this is ok then what bin log position do you start at - 4, 98 - not sure?

For snapshot based backups in the latest ZRM release, the binary log position information is logged in /var/log/mysql-zrm.

--kkg