One of those questions you might be asking yourself is the one on How to backup ESXi configuration. You might be saying why backup if the re-installation of an ESXi takes just few minutes, but wait. There is not only the installation of ESXi, but there are all the configuration files concerning virtual switches and their configuration, shared storage (datastores configurations), multipaths, local users and groups and also licensing informations. So, How to backup ESXi configuration.
So it's quite important to have a backup elsewhere for being able to restore your ESXi host in case you need to. So if you have a backup of your ESXi host, you can simply restore that configuration after you reinstalled your host. One reboot will be required.
Which tools you'll use to backup the ESXi configuration files? There are several options, but I would like to point the backup/restore scenario from within VMA. (vSphere Management Assistant). vMA it's free download and it comes with your VMware vSphere anyway and you might be already using VMA in your enterprise for other management tasks. You also need to know about how to use vMA if you want to pass VCAP-DCA exam. You can have a look at vMA with the help of video training from Trainsignal called VMware vSphere Troubleshooting Training.
You can also check my post about VMA here, where I'm installing nano editor…
How to backup the configuration of your ESXi servers, then?
01. First you'll need to open a console session on vMA with vi-admin as a user. (Or you can SSH to vMA with putty for example…)
02. Then enter this command with an -s switch (save…):
vicfg-cfgbackup -s -server 192.168.0.10 /tmp/my-esxi-4-backup
03. To restore (in case you by accident deleted a vSwitch for example) you can use the same command with -l as a switch (you can remember this like “load” configuration). Your ESXi server needs to reboot after the loading the configuration from backup and so you must reply YES to complete the command. The ESXi host will reboot.
vicfg-cfgbackup -l -server 192.168.0.10 /tmp/my-esxi4-backup
After rebooting the ESXi server finds it's configuration files restored.
If you want to store the backup files elsewhere then inside of the vMA, you can connect via SCP by using for example freeware programs like Veeam Backup Free Edition (VeeamZIP) or WinSCP and download the configuration file to your laptop.
I hope that it helps someone with backing up their configuration files before some re-configuration changes or in case of disaster recovery.
Update: You might want to check this post where I'm talking about this Free application from Slymsoft.com, which can backup the ESXi 4/5 configuration files and also the local vSphere SQL database at the same time…. ESXi Configuration Backup Tool – Freeware.
Enjoy… -:)
Ajay says
very nice article. Thanks
Kerrie says
Is this plagiarism?
http://community.spiceworks.com/topic/137892-how-to-take-vmware-esxi-4-1-config-backup
Vladan SEGET says
I replied in the forum as well. Just compare the dates..
Pete L says
Great article, thanks. Is it possible to verify the contents of the file, or to test the file to make sure a restore will work and will be complete?
Aster says
For vSphere 6.5 vMA backup command will be
vicfg-cfgbackup -s –server 192.168.0.10 /tmp/my-esxi-4-backup
Aster says
I believe your wordpress comments plugin eats double minus before server command.
Vladan SEGET says
It does. Really painful.
José Ignacio Martín Jiménez says
Getting more use of vMA. Thanks!