The VMware vSphere command-Line Interface „vicfg-cfgbackup.pl“ allow you to backup and restore the configuration of your ESXi host
To backup the host you would run the command
vicfg-cfgbackup.pl server <server_name> -s <backup_file_name>
To restore your backup configuration to your host you would run. This will cause the host to reboot once the process is complete. The host must be in Maintenance Mode for this to work. The backup configuration must also match the patch level of the ESXi install. You can add -f to force if needed
vicfg-cfgbackup.pl server <server_name> -l <backup_file_name>