mpg187
Contributor
Contributor

Backups VMs while they are running?

Is it safe to backup VMs while they are running? Or do I have to shut them down before backing them up?

0 Kudos
13 Replies
AntonVZhbankov
Immortal
Immortal

VCB and all the backup solutions are designed to be safe to backup running VMs.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
0 Kudos
mpg187
Contributor
Contributor

I am just using Windows Explorer (or Nautilus on my Laptop w/ Ubuntu) to copy the files. Is there a better way?

0 Kudos
Dave_Mishchenko
Immortal
Immortal

How you backup will depend on what product you're using to host the VMs. As mentioned it's safe to use snapshots to backup a VM, but you should be aware of some items.

1) It's not support for Microsoft domain controllers (as the restore can create issues in Active Directory).

2) When you backup a VM while it is running, a snapshot is taken first which eliminates write operations from the vmdk file. If you restore a VM using that VMDK file, it's a bit like the power was pulled on the VM so if you have database type servers (like SQL Server or Exchange) you may want to consider the impact and if necessary include something to quiesce the file system just prior to the snapshot being taken. In some cases it'll be done for you with for example MS volume shadow copy services (VSS) or you may write a script to pause/stop your service prior to the snapshot being created.

Dave

VMware Communities User Moderator

New book in town - vSphere Quick Start Guide -http://www.yellow-bricks.com/2009/08/12/new-book-in-town-vsphere-quick-start-guide/.

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL - http://www.vm-help.com/forum/viewforum.php?f=21.

0 Kudos
mpg187
Contributor
Contributor

So while the backup is going the VM will stop working? So what if I am writing stuff as I am backing up? Will the VM stop running while that's happening, or will it keep writing to the original VMDK, but the backup one will contain the same thing as the VMDK at the time it was running.

So here's the VMDK (Modified 12:00 PM lets say) and I am backing up. If VM Ware is writing to the virtual hard drive it's stored in RAM while the VMDK is being copied. Once the backup is done whatever information that is in the RAM get's written to the VMDK. Say the backup is done at 12:30 PM. So the VMDK the backup is using will be 12:30, but the backup one will still be 12:00?

0 Kudos
AntonVZhbankov
Immortal
Immortal

First of all - what is snapshot. When you snapshot VM all vmdk'd become freezed and all new data you write in guest OS is written to delta file. Next snapshot - next delta file. When you delete snapshot you actually commit it and all changes from delta file are written to original vmdk. Or parent delta file if there is another snapshot.

Backup starts with snapshotting VM. After that all vmdk's and delta's of previous snapshots are copied while current changes are witten to temporary delta. Temporary snapshot is deleted upon backup completion.

If I undertstand you right - backup state will be at moment backup started. So if backup started at 12:00 and finished at 12:30 then VM state at 12:00 will be stored as backup.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
0 Kudos
mpg187
Contributor
Contributor

So any changes made after 12:00 are written to the delta file and at 12:30 (When backup is done) the delta file gets written to the VMDK. Meanwhile the VMDK as of 12-12:30 is the backup?

Does the VM still run while backing up, is the backup transparent as your are using the VM (maybe a little lag?).

Anf finally, how do I backup my running VMs?

0 Kudos
AntonVZhbankov
Immortal
Immortal

VM continues to run, backup is done transparently.

how do I backup my running VMs?

It doesn't matter if VM is running or not.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
0 Kudos
mpg187
Contributor
Contributor

But how do I back them up?

0 Kudos
AntonVZhbankov
Immortal
Immortal

There are a lot of tools and solutions: VMware Consolidated Backup, VMware Data Recovery, Veeam Backup, PHDVirtual esXpress, Vizincore vRanger

First two are free, Veeam Backup IMHO is the best in the rest, but it costs some money.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
0 Kudos
mpg187
Contributor
Contributor

I have VM Ware Server, does that have come with one of those programs or do I have to download and install seperatly?

0 Kudos
AntonVZhbankov
Immortal
Immortal

Those are for ESX. In your case you should backup VMs manually or by script:

1) Create list of files in VM directory

2) Create snapshot

3) Copy files in list from 1) to backup directory

4) Delete snapshot


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
0 Kudos
mpg187
Contributor
Contributor

Can I still back them up while they are running in VM Ware Server? I don't follow what you mean by create a list of files, you mean the files with the folder where the VM is stored (Mainly the VMX and VMDK)

0 Kudos
mpg187
Contributor
Contributor

Bump

0 Kudos