Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My company has a VMWare server. We run 6-8 virtual machine. I would like to perform daily backup them in a storage server.

How to do this with VMWare? Is there some "component" I don't know ? Or simply, I need to 'physical' copy vmdk files with a simple Bash script ?

share|improve this question

migrated from superuser.com Nov 22 '11 at 12:03

This question came from our site for computer enthusiasts and power users.

1  
Voted to migrate to ServerFault. Maybe check out superuser.com/questions/43690/… and superuser.com/questions/102080/… for some ideas –  techie007 Nov 17 '11 at 15:14
    
Another VMWAre Backup solution that I wrote in python if anyone is interested github.com/Barmaley13/VMWare-Backup I've tested it only on Linux, it might work on Windows and/or Mac but I'm pretty sure code would need to be modified for those platforms. –  Barmaley Jan 12 at 20:09
    
Also, Mr. @Paul maybe you should write your own piece of software before deleting another people's answers. I would say that would make you far better moderator... –  Barmaley Feb 5 at 17:37

3 Answers 3

up vote 1 down vote accepted

It's not a simple bash script by any stretch of the imagination but I've used this excellent script written by Iamw before and it's worked like a charm. We had a 2GB Netgear NAS attached to the network and added as an NFS Datastore:

http://communities.vmware.com/docs/DOC-8760

This script performs backups of virtual machines residing on ESX(i) 3.5/4.x+/5.x servers using methodology similar to VMware's VCB tool. The script takes snapshots of live running virtual machines, backs up the master VMDK(s) and then upon completion, deletes the snapshot until the next backup. The only caveat is that it utilizes resources available to the Service Console of the ESX server or Busybox Console (Tech Support Mode) of the ESXi server running the backups as opposed to following the traditional method of offloading virtual machine backups through a VCB proxy.

share|improve this answer

You can use a variety of software, provided by VMWare to do this. One of them best (IMO) is VMWare Consolidated Backup, altough it can only do file-level backup from Windows-machines. You can schedule it to run every x time.

Read more about it here (Page 30). It's for ESX(i) 3, but it hasn't changed all that much.

I, personally, don't backup virtual machines.

Don't get attached to them. When they fail, throw them away and build a new one. Make sure you have procedures in place that allow you to quickly set up a new VM and put the most recent backup of your data back. A great way to do this is to provision them. You can read all about it here (Page 17).

If you do backups, backup what matters. Backup the raw data. Files, Databases, ...

share|improve this answer
    
It can take hours to rebuild a machine. Backing up a VM would save time. –  cja Jun 18 '14 at 11:02
    
I think you need to look at your deployment strategy. If it takes more then 30 mins to rebuild an existing machine, you might need to invest in this a bit. –  Bart De Vos Jun 18 '14 at 13:06
    
I may be able to automate the rebuilding of my Windows 8.1 development VM, but it'd probably take a lot longer than backing up the VM. –  cja Jun 18 '14 at 13:08
    
Have to go with Bart on this one. A rapid easy to use deployment strategy and backing up what matters makes sense. VM backups are like an attic: You keep throwing what you don't want to think about into the attic until it's full of mostly what you don't need and it's hard to find what you do. –  Mark172 Jan 23 at 20:30

I just wrote simple backup script in python, check it out http://blog.erben.sk/2014/05/30/vmware-backup-script/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.