Backing up the configuration of your ESXi Host May 19, 2012Posted by vbry21 in VMware blogs.
Configuration Backup of an ESXi Host
One of the things I always get asked about on my vSphere ICM courses is “why do I need to backup the configuration of my ESXi host if the entire configuration is stored in the vCenter Database?”
Well the answer is, all the configuration data isn’t stored in the vCenter database, a good example is the Standard Virtual Switches, and in this case the configuration is stored locally on the ESXi host.
We sometimes get a case where the delegate deletes the vmnic0 from the vSwitch0 and hey presto vSphere client loses connectivity, the quick fix is to reset the networking through the DCUI and then rebuild the networking through the vSphere Client (great as long as you knew how it was configured, but let’s be honest how many people document their systems).
So how about we actually back up the configuration. Well, we can.
There is a command which is available through the vCLI (command line interface), or the vMA (vSphere Management Assistant) and the command is vicfg-cfgbackup
The vicfg-cfgbackup is used to both backup and restore the ESXi configuration.
vicfg-cfgbackup <conn_options> -s location this would backup the configuration, so an example would be.
vicfg-cfgbackup –server esxi01a –username root –password password –s /tmp/esxi_backup01.txt
To restore an ESXi configuration from backup
vicfg-cfgbackup <conn_options> -l location this would restore the configuration, so an example would be.
vicfg-cfgbackup –server esxi01a –username root –password password –l /tmp/esxi_backup01.txt
The above command will then prompt for confirmation, to not prompt add –q at the end of the command.
To restore back to factory defaults type
vicfg-cfgbackup –server esxi01a –username root –password password –r
The link to the VMware documentation this article is based on is
Of course if you have Enterprise Plus license you could use the Host Profiles functionality as a configuration backup as wellJ, (my preferred method as I don’t have to do any command line)