Без рубрики

How to back up and restore the ESXi host configuration

Original https://kb.vmware.com/s/article/2042141

Backing up ESXi host configuration data

  1. To synchronize the configuration changed with persistent storage, run this command:# vim-cmd hostsvc/firmware/sync_config
  2. To back-up the configuration data for the ESXi host, run this command:# vim-cmd hostsvc/firmware/backup_config

Note: The command will output a URL (http://<host_fqdn_orIP>/downloads/123456/configBundle-xx.xx.xx.xx.tgz) from where you can download the backup file, either by opening it in a web brower or using other means like wget.

3. download file

Restoring ESXi host configuration data

  1. Rename configBundle-HostFQDN.tgz to configBundle.tgz before initiating the restore command.
  2. Put the host into maintenance mode by running the below command:
    # vim-cmd hostsvc/maintenance_mode_enter
  3. Copy the backup configuration file to the ESXi host or an available datastore.
  4. Reboot the host. This step is required, otherwise the restore workflow might not finish completely
  5. Once ESXi has rebooted, move the config bundle file to /tmp/configBundle.tgz.

Then run this command to restore the ESXi host configuration:
# vim-cmd hostsvc/firmware/restore_config 0

Note:  Add a 1 to force an override of the UUID mismatch.
For example: # vim-cmd hostsvc/firmware/restore_config 1

  • Executing this command will initiate an automatic reboot of the host after command completion.
  • However, starting from vSphere 7.0 U2, the configuration could be encrypted using TPMs and in which case, the -force option will not work if the host got changed. We need the same TPM that was used on the host during backup, to restore. In other words, 
    from vSphere 7.0U2, the override will not work if the host has TPM enabled.

admin

Share
Published by
admin

Recent Posts

vCenter Converter Standalone download

vCenter Converter Standalone 6.6.0 download (далее…)

1 год ago

VMware remote console (VMRC) 12 download

VMware remote console (VMRC) 12.0.5 download Last version: VMware Remote Console 12.0.5  28 NOV 2023…

2 года ago

Mysql calculate row size for all tables

SELECT col_sizes.TABLE_SCHEMA, col_sizes.TABLE_NAME, SUM(col_sizes.col_size) AS EST_MAX_ROW_SIZE FROM ( SELECT cols.TABLE_SCHEMA, cols.TABLE_NAME, cols.COLUMN_NAME, CASE cols.DATA_TYPE WHEN…

2 года ago

Mysql change date format in database

UPDATE DB SET column = DATE(STR_TO_DATE(column, '%Y-%d-%m')) WHERE DATE(STR_TO_DATE(column, '%d-%m-%Y')) <> '0000-00-00'

2 года ago

esxi debian lvm extend partition

echo 1 > /sys/class/block/sda/device/rescan #maybe run under root> sudo fdisk /dev/sda2 > d > 2…

2 года ago

SQL max/min length for all columns

First variant SELECT CONCAT(GROUP_CONCAT( CONCAT('(SELECT \'',COLUMN_NAME,'\' AS `column`, MAX(CHAR_LENGTH(`',COLUMN_NAME,'`)) AS `max_length`, MIN(CHAR_LENGTH(`',COLUMN_NAME,'`)) AS `min_length` ',…

2 года ago