6.5

Table Of Contents
Backing Up Configuration Information with vicfg-cfgbackup
After you congure an ESXi host, you can back up the host conguration data. You should always back up
your host conguration after you change the conguration or upgrade the ESXi image.
I The vicfg-cfgbackup command is available only for ESXi hosts. The command is not available
through a vCenter Server system connection. No equivalent ESXCLI command is supported.
Backup Tasks
During a conguration backup, the serial number is backed up with the conguration.
The number is restored when you restore the conguration. The number is not preserved when you run the
Recovery CD (ESXi Embedded) or perform a repair operation (ESXi Installable).
You can back up and restore conguration information as follows.
1 Back up the conguration by using the vicfg-cfgbackup command.
2 Run the Recovery CD or repair operation.
3 Restore the conguration by using the vicfg-cfgbackup command.
When you restore a conguration, you must make sure that all virtual machines on the host are stopped.
Backing Up Configuration Data
You can back up conguration data by running vicfg-cfgbackup with the -s option.
The following example backs up conguration data in a temporary location.
vicfg-cfgbackup <conn_options> -s /tmp/ESXi_181842_backup.txt
For the backup lename, include the number of the build that is running on the host that you are backing
up. If you are running vCLI on vMA, the backup le is saved locally on vMA. Backup les can safely be
stored locally because virtual appliances are stored in the /vmfs/volumes/<datastore> directory on the host,
which is separate from the ESXi image and conguration les.
Restore Configuration Data
If you have created a backup, you can later restore ESXi conguration data.
When you restore conguration data, the number of the build running on the host must be the same as the
number of the build that was running when you created the backup le. To override this requirement,
include the -f (force) option.
When you run the vicfg-cfgbackup vCLI command, you can specify one of the options listed in
“Connection Options for vCLI Host Management Commands,” on page 19 in place of <conn_options>.
Procedure
1 Power o all virtual machines that are running on the host that you want to restore.
2 Log in to a host on which vCLI is installed, or log in to vMA.
3 Run vicfg-cfgbackup with the -l ag to load the host conguration from the specied backup le.
n
If you run the following command, you are prompted for conrmation.
vicfg-cfgbackup <conn_options> -l /tmp/ESXi_181842_backup.tgz
n
If you run the following command, you are not prompted for conrmation.
vicfg-cfgbackup <conn_options> -l /tmp/ESXi_181842_backup.tgz -q
vSphere Command-Line Interface Concepts and Examples
24 VMware, Inc.