PDA

View Full Version : Remote Backup in raw mode leaves replication off while copying



halindrome
June 3rd, 2008, 09:17 AM
The summary says it all I think:

I have 2.0 installed on a couple of slackware systems. It is configured such that the backup server, via the socket-copy plugin, creates a raw backup from a MySQL server system. The system is a replicated slave that is on an LVM partition.

When the backup starts, it successfully stops replication, creates an lvm snapshot, captures the replication information and then copies all the data from the slave to the backup server. However, it leaves replication disabled while it is doing this. That seems sort of backwards.... if we are backing up from an LVM snapshot then zrm should be able to restart replication immediately upon creating the lvm snapshot, shouldn't it?

paddy
June 3rd, 2008, 01:34 PM
You should either use replication (replication = 1 in mysql-zrm.conf) or
lvm snapshot. LVM snapshot and replication are used to achieve backup
consistency.

Paddy

halindrome
June 3rd, 2008, 01:52 PM
Just to be clear here.... I AM using those settings. From mysql-zrm.conf for this particular backup set:

root@db5:/etc/mysql-zrm/caps-db6# cat mysql-zrm.conf
port=3411
host=db6-20
backup-mode=raw
replication=1
snapshot-size=30G


When the backup runs, it indeed connects and creates an LVM snapshot. It just doesn't re-enable replication after it does so until it completes copying from the snapshot to the backup server via the network - which takes AGES. And the reason that is a problem is that we want to limit the out-of-sync time of the replicated slave to one or two seconds whilst the snapshot is being taken, not the 30 minutes it takes to suck 35 GB if data over the network.

kkg
June 3rd, 2008, 10:41 PM
Just to be clear here.... I AM using those settings. From mysql-zrm.conf for this particular backup set:

root@db5:/etc/mysql-zrm/caps-db6# cat mysql-zrm.conf
port=3411
host=db6-20
backup-mode=raw
replication=1
snapshot-size=30G


When the backup runs, it indeed connects and creates an LVM snapshot. It just doesn't re-enable replication after it does so until it completes copying from the snapshot to the backup server via the network - which takes AGES. And the reason that is a problem is that we want to limit the out-of-sync time of the replicated slave to one or two seconds whilst the snapshot is being taken, not the 30 minutes it takes to suck 35 GB if data over the network.

Thank you for pointing this out.
Please open a bug report at http://forums.zmanda.com/bugzilla/
We will fix this in the next release.

--kkg

halindrome
June 4th, 2008, 07:49 AM
I have created issue 61. Thanks!