vicfg-cfgbackup - back up and restore ESXi host configurations
vicfg-cfgbackup <conn_options> [--force | --help | --load <backupfile> | --reset | --save <backupfile>]
The vicfg-cfgbackup command backs up ESXi configuration data and restores them later. 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.
Specifies the target server and authentication information if required. Run vicfg-cfgbackup --help
for a list of all connection options.
Forces the restore of the configuration.
Prints a help message for each command-specific and each connection option.
Calling the script with no arguments or with --help
has the same effect.
Restores configuration from <backupfile> onto the host.
Backs up the host configuration.
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.
Resets the host to factory settings.
Performs all operations without prompting for confirmation.
The following examples assume you are specifying connection options, either
explicitly or, for example, by specifying the server, user name, and password.
Run vicfg-cfgbackup --help
for a list of common options including connection options.
Back up the host configuration to the file C:\backup.txt:
vicfg-cfgbackup <conn_options> -s C:\backup.txt
Reset the host, that is, restore to factory settings:
vicfg-cfgbackup <conn_options> -r
Restore a configuration previously saved to C:\backup.txt to the host:
vicfg-cfgbackup <conn_options> -l C:\backup.txt
Restore a configuration from C:\backup.txt without prompting for user confirmation:
vicfg-cfgbackup <conn_options> -l C:\backup.txt -q