Backing up the ESXi server with Pure
Is it possible to do a backup of the whole ESX server (bare metal server) and not just the VMs running on it?
Would be greate for upgrade/restore purposes when having a lab that goes up and down all the time.
Currently, it is not possible to backup and restore ESXi server configuration within Pure. However, you can do that by executing a couple of simple commands in the ESXi command line:
1. Use ssh to login to your ESXi host directly
2. Sync the configuration changes by executing
3. Backup the configuration data by executing
4. The above command will output an URL. Use a browser or wget to download the configuration backup.
To restore the configuration, do the folliowing:
1. Login to the ESXi using ssh. Put the host into maintenance mode:
2. Copy the configuration backup file to the host (e.g. /tmp/configBundle.tgz) and run the restore command:
vim-cmd hostsvc/firmware/restore_config 1 /tmp/configBundle.tgz
You can find much more details as well as instructions on how to do backup and restore ESXi configuration data using PowerCLI in the official knowledge base article KB2042141
Thanks for your replay.
Is this something that you will add at a later point?
Also will the above commands take all information I need to backup/restore the ESXi after a total reinstall?
I will swap out all drives in the server to upgrade to bigger ones, and I do only have one ESXi server as this is a lab for my private stuff.
I'm afraid that backup and restore of ESXi configuration is not in our short term plans for Pure. However, we do know how to perform this so I will not exclude this from being added to Pure in future.
This ESXi configuration backup contains the configuration settings for your ESXi host, which is usually the thing that you need the most since properly configuring the host usually takes a significant amount of time. One thing to note, though, is the requirement for the new ESXi to use the exact same vSphere version and build number - you cannot simultaneously upgrade to the new version. If you want to upgrade, use the same version to restore first then upgrade at a later point.
What this backup definitely does NOT contain are virtual machines and their data. If you are using local storage for your datastores (instead of an external shared storage), you will need to copy the VM data yourself. Luckily, you have Archiware Pure so you can simply restore backed up VMs to the new host.
Also, even if your datastore is on an external storage, ESXi configuration does not contain the VM inventory list. Which means that you will simply have to login to the new ESXi UI and manually re-add your old VMs from the datastore.
Thanks for the clarification.
On my ESXi I also run vsphere. Does Pure backup through that one or can I restore teh vsphere and everything should be up and running as before?
That would help tremendously if it is so and also minimize the downtime for my servers and also my time in the datacenter where it is hosted.
I guess that by 'vSphere' you mean the vCenter server, running as a VM.
Whenever a vCenter is present, it is advisable to add it to Pure as an Infrastructure server. If a vCenter is added to Pure, all the communication and all the backups will be performed through that vCenter. This is always the recommended way since by communicating directly with ESXi hosts and bypassing the vCenter, the two may go out of sync and vCenter might not be aware of the changes done via the ESXi. Also, in many cases the whole vSphere environment is configured in such a way that restoring to an ESXi host that is currently being managed by a vCenter is not allowed.
So for example, if you had a vCenter server managing 3 hosts (ESXi1, ESXi2 and ESXi3) and the vCenter VM is located on ESXi1, you would want to make sure that the vCenter server is added to Pure as an infrastructure server. Additionally, in order to backup the vCenter VM itself, you would want to add the ESXi1 as an Infrastructure server also. The other two ESXi hosts can be skipped entirely. In all backups and restores, Pure will communicate only with the vCenter server (which will in turn communicate with particular hosts as needed). The only exception is the backup (and verify) of the vCenter VM. Only in that one case, Pure will communicate with the host ESXi1 because this is the host managing vCenter VM.
So yes, you can definitely backup and restore a vCenter VM. Just make sure to add both the vCenter and the ESXi host on which it sits.
I only have 1 ESXi server and all VMs are on that one. the vCenter server is running as a VM in that one.
My question is when I to a complete reinstall of the bare metal the vCenter server is not on the host any more and needs to be restored. Thus the communication can't go that way first time but needs to go directly to the esxi server.
First VM though to restore would in my mind be the vCenter server and then restore all other VMs through that one.
Is this assumption correct?
Also how important is the build number when doing a restore? I run 6.7 U3. On Vmwares page I can only find a newer build to download than the one I am currently running. Is this an issue or should it work anyway?
The version and build number are super important. VMware will simply refuse to restore the ESXi configuration if the build number is changed (even if the major version remains the same).
In your case I would suggest:
- backup all the VMs with Pure
- backup the ESXi configuration
- swap the old disks for the new ones
- install exactly the same ESXi version and build
- restore ESXi configuration, create datastores, etc.
- add the new ESXi to Pure as an Infr. Server
- restore vCenter VM, power it on, logon, make sure everything is ok, adjust configuration if needed
- add the vCenter to Pure
- proceed to restore other VMs
Thanks for all the info. I will surely use this when I swap all the drives out.
And thanks for helping me out with this as I'm fairly new to deeper usage of vmware. I normally just use the VM's on there. Now I have to manage it myself also.