Saving ESXi Configuration State
Contents
Contents
Saving the configuration state of a standalone ESXi server will allow for the restoration of all configurations if a new instance is installed. This will include all virtual machines registrations, switches, port groups, and system configurations.
Backing Up State
Running auto-backup.sh will write the current configuration onto the disk, which is stored in /bootbank/state.tgz. ESXi has a cronjob that will run this script every hour, however, if there was a change made recently and you are backing up the configuration it would be best to run this script.
|
|
The /bootbank/state.tgz file is an archive that contains another file named local.tgz. Inside local.tgz are configraiton files from the /etc/ folder.
In order to backup the configuration of ESXi this file must be saved. In this example I am saving it to my laptop by copying it with scp.
|
|
Restoring State
Assuming that the previous ESXi instance is not around anymore, perhaps the USB it was on broke or maybe it was wiped, a new instance is installed. In order to restore the configuration begin by copying the state.tgz file to the new instance of ESXi.
|
|
After extract the state.tgz file, this will result is a new file named local.tgz being extracted.
|
|
Copy the local.tgz file into the root of ESXi.
|
|
Now extract the local.tgz file located in the root of ESXi. This will overwrite the configuration files located on the system.
|
|
Run the auto-backup.sh script once again. This will update the existing /bootbank/state.tgz with the new files located in /etc.
|
|
Now restart the server, when it boots up the configuration should be restored.