ESXi host configuration backup and restore

From Notes_Wiki

Home > VMWare platform > VMWare vSphere or ESXi > ESXi host configuration backup and restore

Backup of ESXi configuration

To take backup of ESXi configuration use following steps:

  1. Save/Sync latest ESXi configuration to bootbank:
    vim-cmd hostsvc/firmware/sync_config
    ESXi configuration is saved every hour automatically to the /bootblank/state.tgz file. For this reason, you should ensure that the current ESXi configuration is written to ESXi configuration files right now to confirm that all changes made to ESXi configuration since the last autosave are saved:
  2. Take/Download backup of saved configuration using:
    vim-cmd hostsvc/firmware/backup_config
  3. The above command will output temporary URL (Shortlived - Valid for a few minutes). Use that URL by replacing asterisk (*) with IP/FQDN of ESXi host to download the configuration.
  4. The file gets created in subtree of downloads folder of Scratch partition (Refer ESXi persistent scratch location esp. for VSAN nodes)


Restore ESXi configuration

If you have backup of ESXi configuration taken using steps mentioned above, then the same can be restored using:

  1. Enable maintenance mode on host using:
    esxcli system maintenanceMode set –enable yes
    OR other option is to use
    vim-cmd hostsvc/maintenance_mode_enter
  2. Copy (scp) the bundle to ESXi host datastore
  3. Ensure that file is named 'configBundle.tgz'.
    mv /tmp/configBundle-esxi6-7b.localdomain.tgz /tmp/configBundle.tgz
  4. Restore the configuration using:
    vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
  5. Disable maintenance mode using:
    esxcli system maintenanceMode set –enable no
    Or other option is to use
    vim-cmd hostsvc/maintenance_mode_exit


Refer:



Home > VMWare platform > VMWare vSphere or ESXi > ESXi host configuration backup and restore