• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1521
  • Last Modified:

How best to backup an ESXI HOST for a later possible recovery

We have ESXI vers esxi 4.0.0,208167.
At the moment we only have the one host a Dell PowerEdge T710 running 8 virtuals.
Long story but the 8 vms are just disaster recovery copies of 8 physical servers we do use.
We use doubletake software to replicate the physicals over to the VM host.

We are going to upgrade this next year possibly adding 3 hosts in total for VMHA and move our 8 physicals and others into VM.

However my question today is even though this is a disaster recovery VM Host, if it went bang tomorrow ie the config was lost of the Host.
1/ What is the easiest and simplest way to backup the config of this 1 VM Host ready to recover the host.
2/ What is or would be the quickest and easiest process to recover this 1 VM Host using the saved config IF only the original config was lost/corrupt but the actually virtuals were still safe sat on a seperate raid array.

I am assuming in this event if the actual VMs were safe on a seperate raid array and the actual Host was the one that went down due to a corrupt config or damaged drive, if the hosts config was sat on a seperate drive all on its own that you can rebuild the Host using the previously saved config of the host.
We have our 1 Hosts config sat on an internal SD card card within the Dell Poweredge and the VMs are sat on a seperate raid.

Thanks for any response.
0
rpartington
Asked:
rpartington
2 Solutions
 
PenguinNCommented:
I would recomend Veeam for backup. It's easy and fast.
0
 
ded_chCommented:
Try to see if the last entry in this threath helps:  http://communities.vmware.com/thread/231795

0
 
SupportonthespotCommented:
Veeam is what I use for replication and this is by far the best however does not fit for your replication of the HOST machine unless it is also a VM which it is probably not.

In my honest opinion you have a choice to take it offline and use acronis to image the machine, but in all the years I have used VMware.

It takes very little time to build a new one and simply connect it up to the datastore and reimport the VMS, sometimes this would be just as quick as fidling around with replicas.

Very little information is stored on the VMhost unless you were in a cluster and using HA etc, but if its a standard setup you should not have to spend much time just rebuilding it

If you must replicate this just use Acronis
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Okay, a few ideas check out my articles

This article provides information to backup you VMs
VMware ESX/ESXi Backup Guide

This article shows you how to backup an installation of ESXi on a USB or SD card
How to Backup an ESXi installation on an USB Flash Drive or SD card, for security or redundancy.

To Backup the configuration from your current ESXi  host

Backing up your ESXi Configuration:

To backup your ESXi configuration you’ll be using the vicfg-cfgbackup.pl command as follows:

    Download either the vMA or vCLI
    Launch vicfg-cfgbackup.pl:
   
C:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl –save –server 192.168.15.253 –username root –password password backup.bak
   
Restoring your ESXi Configuration:

Restoring your ESXi config can be done after you have the host up and responding over the network again by using the following:

C:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl –load –server 192.168.15.253 –username root –password password backup.bak

With a copy of the ESXi configuration, you can install a new ESXi to SD card USB, or to local disk, and re-apply the configuration.
0
 
xperttechCommented:
I would recommend looking into PowerGUI Pro it's an awesome tool that works in conjunction with PowerCLI which you need to know anyway to manage most things from ESXi hosts.

PowerGUI Pro is free and it has multiple product packs (VMware, Exchange, Active Directory, etc). If you are a sysadmin, you'll find this tool handy.

The VMware pack comes we pre-made scripts for multiple useful tasks and reports, and you can build upon this with your own. This is where backup comes in...

The following script --which I did not make entirely, but rather compiled from multiple sources; works for me to backup 1 or 25 hosts in one shot, if used connected to a vCenter. You can always connect just to a host and output the "firmware" configuration to the destination of your choice.

If you pre-populate your info in the parameter section, the script skips asking those. This script backs up all the configuration needed to restore a host to the configured state it was when the backup was made. You would use the reverse commend (Set-VMHostFirmware) to push the firmware after you you do a plain vanilla installation.

Note: It is always best practice to keep your VMs in a high-end shared storage when multiple hosts collaborate in an HA environment. I believe that's where you're going from your notes. For the time being, I would suggest you have a GOOD backup of your source production servers. Having those VMs in the same disk as the host OS is not the best idea, but I guess you have no choice ($$) right now. If your RAID array failed, but data from VMs was accessible, you would spend time extracting those VMXs and VMDKs before reinstalling your host. When analyzing DR scenarios, you need to consider also time to recovery.

Hope this helps!

-XT
#
# Description:
#  Backup the firmware configuration of an ESX/ESXi v.4.x host or
#  all ESX/ESXi v4.x hosts in a vCenter server
#

param (
        $esxServer = "",
	$vcServer = "",
	$serverType = "",
        $outputDir = "",
	$outputFile = "",
	$backupFile = ""
)

$serverType = Read-Host "Type ""1"" for ESX/ESXi (single host), or ""2"" for vCenter (multi-host) firmware backup. Anything else cancels script processing."

if ($serverType -ne "" -and $serverType -ne $null) {
	if ($servertype -eq "1") {
		$esxServer = Read-Host "Type the ESX or ESXi FQDN or IP to connect to. Anything else cancels script processing."
		if ($esxServer -ne "" -and $esxServer -ne $null) {
		    $esxServer = Connect-VIServer -server $esxServer -WarningAction 0
		} else { 
			write-output "Execution cancelled by user."
			Exit 0 
			}		
	} elseif ($serverType -eq "2"){
		$vcServer = Read-Host "Type the vCenter FQDN or IP to connect to. Anything else cancels script processing."
		if ($vcServer -ne "" -and $vcServer -ne $null) {
		    $vcServer = Connect-VIServer -server $vcServer -WarningAction 0
			$vcServer = Connect-VIServer -server $vcServer -User services -Password Pet712! -WarningAction 0
		} else { 
			write-output "Execution cancelled by user."
			Exit 0 
			}	
	} else {
	Write-Output "Execution cancelled by user."
	Exit 0
	}
	
} else {
	Write-Output "Execution cancelled by user."
	Exit 0
}

$outputDir = Read-Host "Type a path where to place host configuration backup. Default is Temp folder:" $env:Temp

if ($outputDir -ne "" -and $outputDir -ne $null) {
} else {
	$outputDir = $env:Temp
}

Write-Output "Backup output: " $outputDir

if ($serverType -eq "1") {
	$backupStatus = Get-VMHostFirmware -BackupConfiguration –Destinationpath $outputDir
	$outputFile = "--> configBundle-"+$esxServer+".tgz"
	Write-Output $outputFile
} else {
	Get-VMHost | ForEach {
		$_ | Get-VMHostFirmware -BackupConfiguration –Destinationpath $outputDir >> $null
		$outputFile = "--> configBundle-"+$_.name+".tgz"
		Write-Output $outputFile
	$VMhostList = Get-VMHost |
	foreach-object{
		Write-Output $VMHostList.name
	}
	}
}

Open in new window


Freebies: PowerCLI guides...
PowerCLI4.1.1.pdf
Final-PowerCLI-4.1.1.pdf
0
 
rpartingtonAuthor Commented:
xperttech thanks for the info on powergui it looks really interesting and one we shall take a really good look at as well.
Ded_ch thanks I did know that one but did want confirmation.
Andy H as usual loved having a nose through your articles and the imageing on the host config was an interesting twist as well.
You all are quite correct re moving over next year to a fully licensed setup of esxi 5 with ha and vcenter etc with shared san storage, but for the time been just wanted confirmation of getting the 1 host up and running quickly.

Thanks for all the comments its really appreciated.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
thanks, good luck with it all in the future. Merry Chrimbo.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now