Backup and Restore the VMware ESXi 6.X Configuration

In this post, we will discuss how to backup and restore the VMware ESXi 6.X configuration

Difficulty Level: Intermediate


Introduction

Having regular backups of your ESXi hosts will save you hours of time and heartache in the event of a catastrophic issue. 

Backup the ESXi Configuration

Connect to the ESXi host using SSH with a tool such as Putty. If you don't know how to enable SSH, you can learn how in the following post: How to Connect to an ESXi Host using SSH.

Once you have connected to the ESXi host using SSH enter the below command.

vim-cmd hostsvc/firmware/backup_config



The backup will be saved in /scratch/downloads

Now we need to transfer the compressed ESXi host configuration file off of the host to store it elsewhere. We can do that by entering the URL of the backup commands output into a web browser. Ensure you replace the * with the ESXi host IP address. 

http://10.192.30.1/downloads/52ed45a5-a5d9-6665-ef4c-b443ccaae1f8/configBundle-ESXi-1.tgz

Also, you can use a SFTP tool to transfer the archive using SSH.

Restore 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. If you don't know how to enable SSH, you can learn how in the following post: How to Connect to an ESXi Host using SSH.

Once connected you will need to transfer the backup archive to /tmp/configBundle.tgz on the host using a transfer utility. Such as, WinSCP.

With the file transferred to the ESXi host, run the below command:

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

The host will reboot with the restored configuration applied. 

No comments

Back to Top