We all know how important it is to have a backup of your data, and ESXi host configuration is no exception. If suddenly a USB flash drive or a disk with the operating system of your server fails, thanks to the previously created backup, you can restore the configuration of your virtualization server, while spending a minimum of time to configure it. The backup process and the restore process for VMware ESXi host configuration are described in detail below.
Backing up the ESXi host configuration
Since we will be using the ESXi command line in our examples, we will need to connect to the host using the SSH console. After you connect to the host via SSH, you must run the following commands to back up the current configuration:
A backup copy of the ESXi host settings will be saved in the /scratch/downloads directory .
As everyone knows, storing a backup on the same device is not the right solution, so you should move the created archive to another location. This can be done using a web browser by entering the URL that the vim-cmd command returned to you. You will only need to replace * with the IP address of your ESXi host.
Alternatively, you can use the WinSCP utility or another SSH utility to transfer the archive.
ESXi configuration recovery
To restore the ESXi configuration from a backup, you will need to install the same version and build of ESXi that was installed on the old hardware. After installation, you need to set up a network on the host, all this is necessary for you to be able to connect to the device using the SSH Protocol.
after connecting, you need to transfer the archive with the backup copy of /tmp/config Bundle.tgz to the host using the data transfer utility (suitable WinSCP).
Once you do this, you will only have to run the following commands:
vim-cmd hostsvc/maintenance_mod> e_enter
vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
After rebooting the host, boot the previously saved configuration. You will only have to bring the host out of maintenance mode.
In this article, we have mastered the method of backing up and restoring VMware ESXi 6.5 host configuration using the ESXi command line. It should be noted again that to restore a backup, the host version must exactly match the version of the previous backup. Keep in mind that you need to update the backup each time you upgrade the host.