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
CLI Error : Saving firmware configuration to backup.cfg …
GET https://192.168.0.1/downloads/configBundle-servername..tgz unsuccessful : 404 Not
Event log : Boot partition : /usr/lib/vmware/hostd/docroot/downloads//files cannot be found
/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