How to backup
Here is the command to Backup ESXi server configuration to your local computer. You should have access to the ESXi server using vSphere CLI tool. This will help administrator to schedule ESXi backup using Scripts. Download vSphere CLI tool from here. Open the CLI console and run following command.
Tool located at C:\Program Files (x86)\VMware\VMware vSphere CLI>
vicfg-cfgbackup.pl --server 192.168.0.1 --username root --password your_password --save backup.cfg
Possible Errors:
CLI Error : Saving firmware configuration to backup.cfg …
GET https://192.168.0.1/downloads/configBundle-servername..tgz unsuccessful : 404 Not
Found
Event log : Boot partition : /usr/lib/vmware/hostd/docroot/downloads//files cannot be found
Solution :
/usr/lib/vmware/hostd/docroot/downloads is only a link to /scratch/downloads/
and /scratch is link to /tmp/scratch
Problem will be solved after create a folders under /tmp
SSH to ESXi Server
cd /tmp mkdir scratch cd scratch mkdir downloads cd downloads
How to restore
We are using same command to restore also, Use –load (-l) syntax instead of –save
While restore all the guest machines should in off state. Command will give a message to shutdown all the gust VMs. ESXi will go to maintenance mode and restore the configuration and reboot the server.
vicfg-cfgbackup.pl --server 192.168.0.1 --username root --password your_password --load backup.cfg
Thank you it helped me.
I also would like to let you know I developped a few tools for VMware.
One is called “ESXi Configuration Backup” and will automatically backup all your ESXi Configurations with a specified retention.
Another one is “AutoConf iSCSI” to automatically configure iSCSI following best practices for HP MSA P2000, HP LeftHand P4000 and Dell Equallogic.
You can download them on http://slymsoft.com
PS : It’s free :-D