Backup with hook script - poor man's backup agent

tsajuk

New Member
Jan 9, 2009
22
1
1
After experiencing corruption in the snapshot VZDUMPed MySQL Databases a couple of times now, I need some better solution :)

To minimize downtime I just wanted to stop the WEB- and MySQL-server in the VM just before creation of the snapshot and start them again after the creation.

The vzdump hook script however knows only the phases "pre-stop" and "pre-restart" which are both called up before the snapshot creation. there is no "post-snapshot" phase :(

Is there a better way than using the "pre-stop" phase to ssh the VM to stop the servers, spawn a start of the servers in 20 sec and return?

I can't stop or suspend - the backup takes some 40 min - this is far too long

Is there a better solution?
A stop/snapshot/start combination would be O.K. for OVZ-VMs as well ...
 
actually - another "ppor man" solution would be: dump your mysql-databases within the VE and this way a static file sitting in your filesystem containing the whole backup of your mysql should be vzdumped without any problem.

regards
hk