[SOLVED] Most reliable way to backup a Windows 7 guest?

cosmos

Renowned Member
Apr 1, 2013
125
4
83
I am utilizing pve 3.1 as a host, with a single WIndows 7 32-bit VM. This VM is running 24/7 as an antivirus console, so uptime is of paramount importance. The disk storage is a 60Gb raw file on an LVM2 partition.

We are considering methods to backup this thing in a most reliable way. "Reliable" here has the following meaning:
(1) The risk of damaging the VM file system (due to NTFS corruption, abrubt shutdown etc) due to a PVE backup taking place, must be minimized and
(2) We must maximize the chances of the backups taken to be actually usable.

We do not care if we have a 30' or even 60' downtime during backup (it will be taken weekly during after hours, no activity in our network at all).

Which method would you recommend to follow. Due to (2) above it seems that doing a KVM stop backup is the way to go. However, is KVM stop safe? That is, will the Windows 7 guest shut down gracefully from a KVM signal?
 
Last edited:
probably most users think backup is reliable enough. Did you experiment issues with backup and this kind of vm?
Knowing what went wrong, it could be easier to suggest how to avoid.

It could also depend on what you need to specifically backup in the vm. virus config/definitions, mainly?
you could use a (read only) kvm template, containing the base win7 & antivirus setup, and use a separate disk to store all antivirus-related programs/files/ièdates (it could depend a lot an the system)

Marco
 
probably most users think backup is reliable enough. Did you experiment issues with backup and this kind of vm?
Knowing what went wrong, it could be easier to suggest how to avoid.
My rather limited previous message with proxmox 2.x suggested there were issues with clean shutdowns of Windows guests. At the time I was experimenting with XP, but right now with a Win7 guest on PVE 3.1, I am still unable to do a shutdown; it simply does not work. Furthermore, doing a stop from the gui results an unclean shutdown, as evidenced by the guest's event log.

It could also depend on what you need to specifically backup in the vm. virus config/definitions, mainly?
Everything. It is not a large system, just a 60Gb virtual disk, half of which is empty. I do run sdelete regularly to zero the empty space from within the VM, in order to minimize the *.vma backup size.
 
now with a Win7 guest on PVE 3.1, I am still unable to do a shutdown; it simply does not work. .

this relies on vm agents, afaik. Don't know what's available for kvm windows vms.
You could schedule shutdown inside windows just before vm backup (not ideal, I know).
Then, backup, and restart the vm (hook script?)

but, why shutdown? use snapshot, it's fast. Or you have drawbacks?

Marco
 
this relies on vm agents, afaik. Don't know what's available for kvm windows vms.
You could schedule shutdown inside windows just before vm backup (not ideal, I know).
Then, backup, and restart the vm (hook script?)
That's exactly my idea, till I find a way to force a shutdown.

but, why shutdown? use snapshot, it's fast. Or you have drawbacks?
I'd prefer to have the safest way to backup. That is, with the VM turned off. For some reason, even today backing up a live file system gives me the chills :)

What does the snapshot you are referring to utilize? LVM2 snapshot?
 
I'd prefer to have the safest way to backup. That is, with the VM turned off. For some reason, even today backing up a live file system gives me the chills :)
What does the snapshot you are referring to utilize? LVM2 snapshot?

why chills :) ? One thing I learned (the hard way, though) is that pve often/always has best/easiest default options even if you could have different needs: in those cases you have more choices. In extreme cases, and being free software, you have the source and you can start experimenting, at your own risk ;)

I always use snapshot mode for all my vms (even windows servers), never had a glitch. restore happened.

RAW vm disk on LVM/iscsi, backup storage is on nfs

I "use" whatever pve use for its backup "snapshot mode" (see http://pve.proxmox.com/wiki/Backup_and_Restore#Backup)

as wiki says, today, is

  • snapshot (KVM): Use KVM live backup (no downtime, online)
  • snapshot (OpenVZ): Use LVM2 snapshots (no downtime, online)

Marco
 
I also use the snapshot backup for numerous windows VMs, never had an issue restoring windows backups. We restore the most recent backup of every VM each quarter to ensure backups are working well, this is at least 700 restores. I do remember there being one Linux VM that would not boot after restoring once.

Related to shutdown issues with windows, there are many settings that can prevent windows from shutting down.
http://ethertubes.com/unattended-acpi-shutdown-of-windows-server/

I have noticed that I often need to issue two shutdown commands from Proxmox to get Windows 2008 servers to shutdown. I have not done all of the steps mentioned in the article I linked to, maybe one of them will resolve that problem for me.
If you have that problem you could wite a vzdump hook script that would issue additional shutdown commands to ensure it turns off before the backup takes place.

When I have a VM (Windows or not) that has very important data like an Active Directory server or a database server I also use the native tools to backup that data within the VM and copy it offsite.
In the event that the filesystem is corrupted from a snapshot backup I still have an additional backup with the important data that can be restored.
 
Unfortunately, I do not understand what Tom implies.

The bottomline is that I'll follow your advice for the backups: use KVM snapshots to do them without stopping the system. Which leaves one final problem. Shutting down the guest, in the case of a power failure. ATM, I have nut installed on the host. But since shutdown will not work on the client, it will most likely mean that a power failure will also do an unclean shutdown of the guest.

Of course there are alternatives (for example, insert a NUT client inside the Windows 7 VM). But that raises other issues.

In any case, I consider my op to be solved here. Thank you for all your valuable information! :)
 
Actually one more question, now that I've managed to shutdown my win7 vm successfully: the backup options offered are stop, suspend and snapshot. What does the "stop" option do to bring the system down? Shutdown or power off?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!