Backup and Restore ESXi Configuration via CLI Command

How to Backup and Restore ESXi Configuration via CLI Command

VMware vSphere CLI

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.

Examples (http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/vicfg-cfgbackup.html)

vicfg-cfgbackup.pl --help

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)

Check Also

VMware ESXi step-by-step Installation Guide with Screenshots

The following article would cover VMware ESXi Step-by-step Installation guide with screenshots. VMware ESXi comes with a 60 days evaluation mode, however there is also a Free version available as well.

Leave a Reply