A quick blog post about backing up and restoring the configuration of your ESXi hosts. It will shorten your recovery time when something goes wrong during an upgrade or in case of hardware failure and you want to restore the configuration of your ESXi hosts as soon as possible. Here are the steps to perform a back-up and restore of your ESXi host.
Backup
- SSH or login to the vMA.
- Add the host as target to the vMA: vifp addserver <FQDN or IP Address>
- Enter the password.
- Set the server as target: vifptarget -s <FQDN or IP Address> Notice that your prompt will reflect the FQDN or IP address of the host.
- Save the configuration with: vicfg-cfgbackup -s /tmp/<Config_File_Name>
- Done, the config has been saved in the tmp directory of the vMA.
Restore
- Add the host and set it as target in the vMA, just like in step 1 to 3 in the back-up procedure.
- Restore the configuration with: vicfg-cfgbackup -f -l /tmp/<Config_File_Name>
- Type Yes to start the restore procedure.
- When the procedure is finished, the host will reboot with the new settings.
Done!
Cheers!
– Marek.Z