[pve-devel] VZdump MySQL backup patch

Aleksey Chudov aleksey.chudov at gmail.com
Mon Feb 20 08:30:15 CET 2012


Hello,

I wrote small patch for vzdump for correctly backup MySQL containers.

The main idea is simple and taken from mylvmbackup script. Execute 
'FLUSH TABLES WITH READ LOCK' before creating MySQL container snapshot 
and then 'UNLOCK TABLES' after snapshot completed. I thought about using 
hook script but currently it is not possible to save DB handle using 
hook. As soon as we lost DB handle, MySQL connection and 'read lock' is 
lost also. So I changed vzdump code.

I have carefully tested this patch in different conditions and not found 
any issues. I use it on my production servers. Please look at attached 
diffs. If you found it useful please include this patch in main vzdump code.


Best regards,
Aleksey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vzdump.diff
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20120220/1a1cd122/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VZDump.pm.diff
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20120220/1a1cd122/attachment-0001.ksh>


More information about the pve-devel mailing list