Shutdown, stop and vzdump

dik23

Well-Known Member
Apr 3, 2011
102
1
56
I have a couple of questions concerning shutdown, stop and vzdump.

Firstly, what is the difference between shutdown and stop, command wise ?

The reason I ask is because when I do a stop on one of my OpenVZs, running Zimbra on 8.04, it fails to startup again unless I reset it a second time. I am presuming that this is caused by the stopping of one of the databases involved making it go into recovery on reboot.

From what I read stop isn't very database friendly:

http://www.ctacat.net/blogs/ctacat/2010/08/28/proxmox-et-larret-des-systemes-virtuels-shutdown-sur-linterface/

Shutdown works fine as does shutting down Zimbra inside the vm before using stop.

This impacts on backup of this vm.

In these forums I've read that both suspend and snapshot aren't particularly database friendly. The whole point of a backup is to preserve data so I'm not happy using either of these, plus they are slower to complete than stop which is important if I have to have Zimbra shutdown while it's happening.

The stop backup option causes the same behaviour as I described with stop above.

Is it possible to use vzdump with shutdown rather than stop ?

Can --stopwait used for this ? I have found very little written on what --stopwait is used for.

It would be much cleaner than using cron to shutdown Zimbra a short while before vzdump --stop.

This must affect other vms containing databases too, not just Zimbra.
 
why don´t you use snapshots (LVM). works great for me.
 
Maybe you should go for application aware backup - as far as I know there are a lot of howto on the Zimbra wiki to make a backup.

You can also run scripts before vzdump starts (e.g. to cleanly shutdown a database).
 
I currently use cron to zmcontrol stop Zimbra before vzdump stop.

I thought it'd be useful seeing as stop shuts the vm down to have the vm shutdown "properly" by vzdump, ie ACPI, seeing as shutdown is already an option in the Proxmox gui
 
ACPI is only relevant for KVM guests. if you stop zimbra before the backup I suggest to to for snapshots.
 
So what is shutdown in the gui ? It seems to work like ACPI in that my databases don't go into recovery after using it.

Also what is --stopwait used for ?
 
if you click on 'shutdown' you can go to Administration/Logs/Tasks and you will which command was executed.
(vzctl stop VMID)

(stop is 'vzctl stop VMID --fast')

see also 'man vzctl'
 
Ok, thanks for that.

I still don't see what --stopwait is for in vzdump. Do you think I'd have better results if I used stopwait ?

vzdump man states "maximal time to wait until a VM is stopped". Would this option enable running processes to shutdown cleanly ?