If your infrastructure is not that big, you can perform individual backups of the ESXi servers using CLI. This might not be a good approach for larger infrastructures, for which you might prefer to automate the whole task.
To perform an individual backup using CLI, perform the following steps:
- Connect to the ESXi server using SSH
- Run the following command: vim-cmd hostsvc/firmware/sync_config And vim-cmd hostsvc/firmware/backup_config
- As an output, you will receive a URL, from which you can download the backup file
To restore an individual ESXi server, perform the following steps:
- Upload the backup file to the ESXi hypervisor (either using the SCP protocol with WinSCP, for example, or by directly uploading the file to the datastore).
- Connect to the ESXi server over SSH.
- Enter Maintenance Mode using vim-cmd hostsvc/maintenance_mode_enter.
- The backup file should be located in the /tmp/ folder. To copy the file to the location, you can use the cp command: cp /vmfs/volumes/datastore1/RESTORE/configBundle-
esxi-prod-4.learnvmware.local.tgz /tmp/configBundle.tgz. - Restore the configuration using vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz.
- ESXi will automatically reboot so be prepared for this.