How to Backup and Restore ESXi Configuration via CLI Command
The following commands are used to backup and restore ESXi configuration via CLI. You can back up the host configuration, restore the configuration to the host, force the restore of the configuration, and reset the host to factory settings.
Back up ESXi host configuration before you change the configuration or upgrade the ESXi image. The vSphere Upgrade Guide discusses backing up and restoring the ESXi configuration in some detail.
Important: This command is supported for ESXi hosts but not for ESX hosts.
Command for Backing up ESXi Server configuration.
vicfg-cfgbackup.pl --server vmwesx01 -save "E:backup.bak"
Command Syntax (-S can be used instead of Save)
vicfg-cfgbackup.pl --server (ServerName) -s "Backup File Name"
–save | -s <backupfile>
Include the number of the build that is running on the host that you are backing up in the backup filename. If you are running the vSphere CLI from vMA, the backup file is saved locally on vMA. Local storage for backup files is safe because vMA is stored in the /vmfs/volumes/<datastore> directory, which is separate from the ESXi image and configuration files.
Command for Restoring ESXi Server configuration.
vicfg-cfgbackup.pl --server vmwesx01 -load "E:backup.bak"
Command Syntax (-l can be used instead of load)
vicfg-cfgbackup.pl --server (ServerName) -l "Backup File Path" vicfg-cfgbackup.pl --help Examples
http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/ (vicfg-. commands examples and usage)