Backup and Restore ESXi configuration using VMware vSphere CLI

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>  --server  --username root
--password your_password --save backup.cfg

Possible Errors:

CLI Error :  Saving firmware configuration to backup.cfg …
GET unsuccessful : 404 Not

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.  --server  --username root
--password your_password --load backup.cfg

About Albin Sebastian

I am a Technology Blogger, System Administrator by profession and webmaster by passion. Technology blogger, Active in Online and offline tech communities.

Check Also

hp_moonshot_1500_chassis thumb

HP Moonshot System – Atom-based Servers from HP

HP launches first Atom-based Moonshot servers. It is a blade server kind of concept with …


  1. 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 

    PS : It’s free :-D