Link to home
Start Free TrialLog in
Avatar of rpartington
rpartingtonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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.
Avatar of PenguinN
PenguinN

I would recomend Veeam for backup. It's easy and fast.
SOLUTION
Avatar of ded_ch
ded_ch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of rpartington

ASKER

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.
thanks, good luck with it all in the future. Merry Chrimbo.