How to Backup and Restore the VMware ESXi 6.5 Configuration

How to Backup the ESXi Configuration

First of all, since this tutorial will be using the ESXi command line, you will need to connect to the host using SSH. If you don’t know how to enable SSH, you can learn how in the following post: How to Connect to an ESXi 6.5 Host using SSH on Windows.

Once you have connected to the host via SSH, run the following command to backup the configuration:

vim-cmd hostsvc/firmware/backup_config

The following image shows the output of the command.

Backup VMware ESXi 6.5 Configuration

The backup will be saved in /scratch/downloads

Restoring the ESXi Configuration

In order to restore the backup of the ESXi configuration, you need to install the same version and build number of ESXi on your hardware. Once installed, you need to configure the management network so that you can connect to the device using SSH. Again you will need to enable SSH which you can find out how to do in the post: How to Connect to an ESXi 6.5 Host using SSH on Windows.

Once connected you will need to transfer the backup archive to /tmp/configBundle.tgz on the host using a transfer utility. Read How to Transfer ISO Images and Files to an ESXi Host from Windows to find out how.

With the file transfered, all that’s left to do is run the following commands:

vim-cmd hostsvc/maintenance_mode_enter
vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz

The host will reboot with the old configuration applied. You can now exit maintenance mode and use the host.

https://graspingtech.com/backup-vmware-esxi-6-5-configuration/