Backing Up VMware ESXi Host Configuration
Backing up the configuration of your VMware ESXi host ensures that in the event of a failure or corruption, you can restore the ESXi host’s settings and configuration without reinstalling or reconfiguring everything from scratch. This article details how to back up the ESXi configuration using Putty and the ESXi command line.
Table of Contents
Step-by-Step Guide
Step 1: Enable ESXi Shell and SSH Service
Before backing up the ESXi host configuration, ensure that ESXi Shell and Remote SSH services are enabled.
- Log into the VMware vSphere Client.
- Go to Host > Manage > Services.
- Locate ESXi Shell and SSH, and ensure both services are running.
Step 2: Connect to ESXi Host Using Putty
- Download and Install Putty on your local machine.
- Open Putty, and enter the IP address of your ESXi host in the Host Name (or IP address) field. Use Port 22 for SSH.
- Example: 192.168.1.10
- Click Open.
- When prompted with a Security Alert, click Yes to accept the key and establish the connection.
- Enter your ESXi username (typically root) and password when prompted.
Step 3: Synchronize the ESXi Host Configuration
Once connected via Putty, the first step is to synchronize the ESXi configuration to ensure everything is up to date.
Type the following command to sync the configuration:
bash
Copy code
vim-cmd hostsvc/firmware/sync_config
- Press Enter. This will synchronize the configuration files to ensure they are in their latest state.
Step 4: Backup the ESXi Host Configuration
To create the backup, use the command that will generate a .tgz file containing the ESXi configuration.
Enter the following command to back up the ESXi host configuration:
bash
Copy code
vim-cmd hostsvc/firmware/backup_config
- Press Enter. After running this command, you will receive a download link to access the backup file (a configBundle.tgz file).
- Example output:
bash
Copy code
The result of the operation will be saved as a URL:
http://192.168.121.130/downloads/52f5684b-120c-4fe3-50b4-15cf5acbe691/configBundle-ESXi-02.localdomain.tgz
Step 5: Download the Configuration Backup File
Copy the URL generated from the command output. It will be in the format:
bash
Copy code
http://<ESXi-host-IP>/downloads/<unique-ID>/configBundle-ESXi-<hostname>.tgz
- Open a web browser, paste the URL in the address bar, and hit Enter.
- The browser will download the configBundle.tgz file, which contains the backup of your ESXi configuration.
- Save the file to a secure location, such as a backup folder on your local computer or an external drive.
Important Notes
- Compatibility: The backup file can only be restored on an ESXi host with the same version. Ensure your host versions are identical when performing restores.
- File Security: Keep the configBundle.tgz file secure, as it contains sensitive configuration data.
- Regular Backups: Regularly back up your ESXi host configuration, especially after making significant changes to your environment.
Click yes
Type a username and password.
Backup VMware ESXi Host Configuration
Enter the below command
vim-cmd hostsvc/firmware/sync_config
Backup ESXi configuration command
vim-cmd hostsvc/firmware/backup_config
As a result, you will receive a link to download the ESXi configBundle.tgz backup file from the ESXi host. You need to replace the * with the IP address of the ESXi host.
http://*/downloads/52f5684b-120c-4fe3-50b4-15cf5acbe691/configBundle-ESXi-02.localdomain.tgz
http://192.168.121.130/downloads/52f5684b-120c-4fe3-50b4-15cf5acbe691/configBundle-ESXi-02.localdomain.tgz
Open a web browser, paste the address, and then hit enter. Note: It might be that you will get a connection error, so you can use a different browser.
The host configuration backup file is saved to the downloads folder.
Find backup.
By following these steps, you have successfully backed up the configuration of your ESXi host. In the event of an issue, you can restore the ESXi configuration using this backup, ensuring minimal downtime and faster recovery.