Site icon Information2 | Data Management & Recovery Pioneer

How to Backup ESXi Configuration & Restore: A Complete Guide

In any VMware-based virtual infrastructure, ESXi hosts are the foundation of your entire environment. A hardware failure, failed upgrade, or configuration mistake can instantly disrupt networking, storage mappings, and host-level settings—making backup ESXi configuration a critical operational task for IT teams.

This guide explains the most efficient ways to handle the ESXi host configuration backup and restoration process. These steps help administrators minimize downtime and keep business services running smoothly during a recovery scenario.

What Is ESXi Host Configuration Backup and Why It’s Essential

An ESXi host configuration backup saves key settings of your hypervisor, such as network profiles, storage mappings, local user accounts, and firewall rules.

It securely stores critical data like virtual switch configurations and license information outside the host itself.

This kind of backup is essential for fast recovery after hardware failures and for reducing human error during upgrades. A reliable ESXi configuration backup and restore strategy also helps your infrastructure meet audit and disaster recovery compliance requirements.

How to Backup ESXi Configuration with 4 Method

There are four primary ways to secure your hypervisor settings, ranging from manual commands to automated enterprise scripts. 

Method 1: Back Up ESXi Configuration via the Native ESXi Command Line

The native ESXi command line offers a simple, direct way to back up your ESXi configuration through the CLI, with no external tools or extra software required.

Best for

Small-scale environments, single ESXi hosts without vCenter access, or quick one‑time manual backups.

How to Perform the Backup
  1. Enable SSH: Log into the ESXi Host Client, navigate to Manage > Services, and start the TSM‑SSH service.
  2. Access the Shell: Connect to your host using an SSH client such as PuTTY.
  3. Sync Settings: Run vim-cmd hostsvc/firmware/sync_config to make sure recent changes are saved to persistent storage.
  4. Generate the Backup File: Execute vim-cmd hostsvc/firmware/backup_config. A download link will be generated automatically.
  5. Download the Configuration Bundle: Copy the URL into your browser, replace the * with your ESXi host IP address, and download the .tgz configuration file.
How to Restore Your ESXi Configuration
  1. Prerequisites: The target host must run the same ESXi version and build number as the original backup.
  2. Enable Maintenance Mode: Place the host in maintenance mode with the command esxcli system maintenanceMode set --enable true.
  3. Upload the Backup File: Use an SFTP tool to upload your backup file to the host (for example, to /tmp/configBundle.tgz).
  4. Run the Restore Command: Execute vim-cmd hostsvc/firmware/restore_config 0 /tmp/configBundle.tgz. The host will reboot automatically to apply the restored settings.
Pros
  • No extra tools needed
  • Fast and natively supported
  • Ideal for emergencies
Cons
  • Fully manual process
  • Requires basic CLI knowledge
  • Difficult to scale across multiple hosts

Method 2: Backing Up ESXi Host Settings Using vSphere CLI Commands

The vSphere CLI allows you to backup ESXi configuration remotely from a management workstation, without logging directly into the host’s local shell.

Best for

Administrators managing multiple ESXi hosts who prefer centralized control and already have the vSphere CLI installed on their local machine.

Performing the Backup with vSphere CLI
  1. Install Tool: Make sure VMware vSphere CLI is installed on your Windows or Linux workstation.
  2. Open Command Prompt: Navigate to the folder where your vSphere CLI tools are located.
  3. Run Backup Command: Execute

vicfg-cfgbackup --server=HOST_IP --username=root -s C:\backups\esxi_config.tgz

(Replace HOST_IP with your ESXi host IP address.)

  1. Verify File: Enter the root password when prompted and confirm the configuration file is saved to your local path.
Restoring the Configuration via vSphere CLI
  1. Maintenance Mode: Place the target ESXi host into maintenance mode before starting the restore process.
  2. Run Restore Command: Execute

vicfg-cfgbackup --server=HOST_IP --username=root -l C:\backups\esxi_config.tgz

  1. Confirm Reboot: The host will validate the backup file and reboot automatically to apply the restored settings.
Pros
  • Scalable for multiple hosts
  • Supports remote operations
  • No need to enable SSH on the host
Cons
  • Requires extra software installation
  • Less commonly used in ESXi 7.0 and later, compared to PowerCLI

Method 3: Automate ESXi Configuration Backup with VMware PowerCLI

VMware PowerCLI is the go-to tool for enterprise administrators to automate ESXi configuration backups, making it ideal for efficiently managing large host clusters.

Best for

Enterprise environments, managing multiple ESXi hosts at once, and organizations that need scheduled, fully automated backups with no manual intervention.

Automating ESXi Configuration Backups via PowerCLI
  1. Install PowerCLI: Open PowerShell as Administrator and run Install-Module -Name VMware.PowerCLI.
  2. Connect to Host: Use Connect-VIServer -Server <Your_ESXi_IP> and log in with your root username and password.
  3. Execute Backup: Run Get-VMHostFirmware -VMHost <Your_ESXi_IP> -BackupConfiguration -DestinationPath C:\ESXi_Backups.
  4. Set Up Automation: Create a .ps1 script with the above commands, then use Windows Task Scheduler to run it on a weekly or monthly schedule.
Sample PowerShell Script

# Connect to the target ESXi host

Connect-VIServer -Server 192.168.1.100 -User root -Password MyPassword

# Backup the ESXi host configuration to the specified path

Get-VMHostFirmware -VMHost 192.168.1.100 -BackupConfiguration -DestinationPath "C:\Backups"

Restoring ESXi Configurations with PowerCLI
  1. Enable Maintenance Mode: Connect via PowerCLI and run Set-VMHost -VMHost <Your_ESXi_IP> -State Maintenance.
  2. Run Restore Command: Execute

Set-VMHostFirmware -VMHost <Your_ESXi_IP> -Restore -SourcePath "C:\Backups\configBundle.tgz" -HostUser root -HostPassword <YourPassword>.

  1. Verify Restoration: The host will automatically reboot, exit maintenance mode, and complete the ESXi configuration restore process.
Pros
  • Highly scalable for large environments
  • Eliminates repetitive manual work
  • Easy to integrate into enterprise disaster recovery plans
Cons
  • Requires basic PowerShell/PowerCLI knowledge
  • Needs initial setup of the PowerCLI environment

Method 4: Manual Backup and Restore Workflow for ESXi Host Configurations

For administrators who prefer visual tools over command lines, the manual GUI-based workflow offers a simple way to back up ESXi configurations without advanced technical skills.

Best for

Emergency situations where CLI tools are unavailable, small environments with only a few hosts, or users who favor a graphical interface over scripts.

Backup Procedure Using the ESXi Host Client GUI
  1. Access Host Client: Open a browser and log into the ESXi Host Client at https://[ESXi-IP]/ui with root credentials.
  2. Enable Maintenance Mode: Go to the Host tab, click Actions, and select Enter Maintenance Mode.
  3. Generate Configuration Backup: Access the built-in firmware backup URL in your browser to download the .tgz configuration bundle.
  4. Store the File Securely: Save the downloaded configuration file to a safe location such as a NAS or encrypted storage.
Restoration Process via the GUI & Minimal Shell
  1. Prepare the Target Host: Install the same ESXi version and build on the destination host.
  2. Enter Maintenance Mode: Log into the ESXi Host Client and place the host into maintenance mode.
  3. Upload Backup File: Use Storage > Datastore Browser to upload the config bundle to the /tmp directory.
  4. Complete the Restore: Run the restore command in the ESXi shell. The host will automatically reboot to apply the restored settings.
Pros
  • Intuitive for GUI users
  • No PowerCLI or vSphere CLI required
  • Easy to visually confirm host status
Cons
  • Not a true one-click process
  • Still needs minimal shell interaction for restore
  • Inefficient for large clusters

Protect Your Virtual Machines: Backup VMs with i2Backup

Backing up your ESXi host configuration is critical for restoring network, storage, and system settings. However, it does not back up the virtual machines, applications, or business data running on your host.

To build complete data protection for your VMware environment, you need a dedicated VM backup solution. i2Backup is designed to work alongside your ESXi configuration backup strategy to keep your entire virtual infrastructure safe.

Key Benefits of i2Backup for VMware Environments

With i2Backup, you can protect both your ESXi host configurations and your critical virtual machines for complete, end‑to‑end data resilience.

FREE Trial for 60-Day
Secure Download

Best Practices for Secure ESXi Configuration Backups

A reliable backup ESXi configuration workflow is key to keeping your virtual infrastructure resilient. Simply creating a backup is not enough—you must also secure the files and ensure they can be restored quickly during a disaster. These best practices will help you maintain safe, usable ESXi configuration backups.

Automate Regular Backups

Avoid relying on manual processes. Use PowerCLI or API‑based tools to schedule automatic backups whenever settings change, or at a fixed weekly interval.

Store Backups Securely and Offsite

Save configuration files to an encrypted NAS, secure administrative share, or offsite storage—separate from your production environment. This prevents total data loss if a host or site fails.

Verify ESXi Build Consistency

Configuration backups only work with the same ESXi version and build during restore. Always include the host’s version number in your backup filename for easy reference.

Test Restorations Regularly

Perform routine disaster recovery drills on a test host to confirm your ESXi configuration backup and restore process works correctly and that files are not corrupted.

Enforce Strict Access Control

Encrypt backup files and limit access to authorized administrators only. ESXi configuration files contain sensitive network, storage, and permission data that must be protected.

Final Thoughts

Securing your virtualization environment starts with a reliable ESXi configuration backup strategy. For small or single-host environments, CLI or GUI methods work well. For enterprise clusters, PowerCLI automation ensures consistency across all hosts.

A complete disaster recovery plan protects both hypervisor settings and virtual machines. By implementing a robust backup ESXi configuration and using a dedicated VM backup solution like i2Backup, you can prevent costly downtime and maintain business continuity.

Exit mobile version