Is it necessary to backup vmware host
A backup of the VMware ESXi host configuration contains the host bootloader and bootbank partitions, the host state, the extensions and patches, and the log files. It enables you to restore your ESXi host on different hardware.
Actually, in VMware, it's usualy not necessary to backup the host. Reconfiguring an ESXi host is not difficult. And if you have too many VMware hosts to configure, there are many automated deployment tools to choose from, for example, vSphere Auto Deploy. What really matters is to backup VMware ESXi virtual machines, which contains almost all the data you need.
However, if you only have one vmware host, or if reconfiguring your VMware ESXi host is considered complex and time-consuming, then you can back up your host to reduce the impact of host failure, and save time.
Fortunately, there are several official tools that can help you with this. In this article I will introduce 3 ways to back up VMware ESXi host configuration using official tools.
How to backup VMware ESXi host configuration
In this section, I will introduce you 3 ways in VMware ESXi to backup host configuration:
- Using ESXi command line to back up ESXi host configuration, you do not need to install additional software.
- VMware PowerCLI is a collection of PowerShell Modules to manage VMware infrastructure. It’s convenient for windows users since PowerShell is installed by default with Windows OS or Windows Server.
- The vSphere CLI provides perl based tools, allows you to run common system administration commands against ESXi systems from any machine with network access to those systems. But since it is deprecated in vSphere 7.0, reliance on vSphere CLI is not recommended.
Using ESXi command line to backup ESXi host configuration
1. Enable Secure Shell (SSH), and connect to your ESXi host via SSH.
2. Since every hour the ESXi host configuration is automatically saved in the /bootblank/state.tgz file, you need to first run the following commands to save the current ESXi host configuration in that file, that is, to synchronize the changed configuration with the persisitent storage.
3. Now you can back up the ESXi host configuration by running the following commands:
It will output a link below for you to download the configuration file with a web browser.
4. Replace the * in this link with your own ESXi host IP/FQDN, and navigate to this link from the web browser.
5. The backup file will be in the /downloads directory (default is browser or choose to download to a specific directory) with the name configBundle-HostFQDN.tgz.
Using VMware Power CLI to backup ESXi host configuration
1. Install and configure VMware Power CLI module.
2. Run Power CLI as administrator, and run the following commands to connect to your ESXi host:
Connect-VIServer ESXi_IP_address -user user_name -password your_password
3. Now you can run the following commands to back up your ESXi host configuration:
Get-VMHostFirmware -VMHost ESXi_host_IP_address -BackupConfiguration - DestinationPath output_directory
Then your ESXi host configuration will be backed up in tgz format to the directory you specified.
Using vSphere CLI to backup ESXi host configuration
1. Install and configure vSphere CLI. You can refer to the official documentation and references: vSphere CLI
2. Run the following command to back up the ESXi host configuration:
vicfg-cfgbackup --server= ESXi_host_IP_address --username=root -s output_file_name
In vSphere CLI for Windows:
2. Navigate to C:\Program Files\VMware\VMware vSphere CLI\bin in Command Prompt.
3. Run the following command to back up the ESXi host configuration:
vicfg-cfgbackup.pl --server=ESXi_host_IP_address --username=root -s output_file_name
Then a backup text file will be saved in the current working directory where you run the vicfg-cfgbackup script.
How to backup and restore multiple VMs on VMware ESXi (free)
After backing up your VMware ESXi host configurations, the next thing you need to do is backing up the VMs on the host. In fact, since backing up VMs is the only way to protect the critical VM data, it is much more important than backing up host configurations.
There are few ways to create independent ESXi VM backups. For example:
- Download the VM files from the datastore
- Export VMs as OVF/OVA templates
- Clone virtual machines
However, in these ways you can only back up a single VM at a time. It is inconvenient especially when you want to migrate to another datastore or host.
Therefore, next I will introduce you a handy tool for free VMware backup: AOMEI Cyber Backup.
It simplifies multiple VM backups into 3 concise steps. Here I will demonstrate how to backup and restore ESXi VMs as an example. You can click the button to download the perpetual free edition and get started:
*You can choose to install this VM backup software on either Windows or Linux system.
3 simple steps to backup and restore ESXi VMs
1. Bind devices: Access to AOMEI Cyber Backup web client and navigate to Source Device tab to add your VMware ESXi host, the VMs on the host will be clearly listed with their backup status for monitoring and restoring.
2. Backup multiple VMs: Navigate to Backup Task > + Create New Task and setting Task Name, Backup Type, Device, Target, Schedule on an intuitive page, you can quickly create a complete backup task that can automatically executing and deleting old backup files.
You can cover multiple VMs on the host within one task. Backup files will be clearly distinguished by the VM name, backup time, and type, in a folder named by the task name you specified.
3. Restore entire VM: clicking … > Restore on the separately listed backup task, all restore points related to the task will be listed, you can then select from them according to your needs.
✎While the Free Edition has covered most VM backup needs, you can also upgrade to enjoy:
✜Backup cleanup: Set up a retention policy to auto delete old backups and save storage space.
✜Restore to new location: Restore the backup to create an identical VM in the same or another datastore/host, which can also be used to clone VMs.
With AOMEI Cyber Backup you can quickly complete backup and restore tasks of multiple VMs. In addition, you can create sub-accounts with limited privileges, to further protect your VMs from others’ accidental mis-operations.
In most cases, backing up the VMware ESXi host configuration is not necessary. Redeploying the host is quick and easy, and can be assisted with automated deployment tools.
However, if you manage smaller sites, you may not want to set up the host from scratch. In this article I summarized 3 ways of using official tools to back up VMware ESXi host configuration. They can be helpful in this case.
After backed up your host, the next important thing is to back up VMs on it. In this article I introduce AOMEI Cyber Backup that can back up multiple VMs on the host at once, and restore to another datastore or host. It is convenient especially if you want to migrate to a new host.