Tutorials, VMware

3 Mins Read

How to Take Backup of ESXi Host and Restore from Backup?

Voiced by Amazon Polly

Objective

This lab aims to guide you to take a complete backup of your ESXi host and restore it whenever required.

Get expert vSphere training now

  • Understand new features
  • Best practices available
  • Instructor led courses
Learn more

Prerequisites

  • Access of vCenter through vSphere Web Client.
  • Access of CLI of ESXi Host and SSH enabled.
  • Knowledge of Basic ESXi commands: im-cmd.

Lab Overview

After completing this lab, you will be able:

  1. Understand the need for Backup and Restore of ESXi servers
  2. To back up the ESXi host in the .tgz file
  3. To restore the ESXi host from the backup file
  4. Verify the restoration of ESXi Host and Unregistered VMs

Step-by-Step Lab Guide

PART-I Taking backup of ESXi host

  1. Open vSphere host client and Login to ESXi host (sa-ESXi-01 –> 172.20.10.51) using root.
  2. View all details of the ESXi host as we will back up the sa-ESXi-01 host for backup.
  3. Access the console of an ESXi-01 as a root through SSH, as we will take file-based backup using commands.
  4. First, sync the configuration setting of the ESXi host using:vim-cmd hostsvc/firmware/sync_config
  5. Now Take backup using the command: vim-cmd hostsvc/firmware/backup_configIt will give a URL for downloading the backup bundle in .tgz file format.
  6. Copy the URL and replace FQDN or IP of the ESXi host with *. Here we replaced * with 172.20.10.51 IP. Now using the wget command, download the backup in the current directory.
  7. Create Directory “Backup” under VMFS01-01 datastore.
  8. Copy this .tgz backup file to /vmfs/volumes/VMFS01-01/Backup path.
  9. Cross-check from the datastore tab of the ESXi host client that this backup file should be available in the Backup folder of VMFS01-01 datastore.

PART-II To restore ESXi from Back Up file.

  1. Go to ESXi Host web client and unregister one VM – Ubuntu Server from ESXi host– so automatic VM restoration happens after backup.
  2. copy the backup bundle file from the datastore folder to the /tmp directory.
  3. Put ESXi host into maintenance mode using command and cross verify from ESXi host web client.vim-cmd hostsvc/maintenance_mode_enter
  4. Rename the backup file to configBundle.tgz
  5. Now restore the backup using the following command:vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz Here, reboot the ESXi host as we are restoring from the backup.
  6. Now log in to the ESXi host client again and verify the automatic restoration of the VM – Ubuntu Server and backup.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront Service Delivery PartnerAmazon OpenSearch Service Delivery PartnerAWS DMS Service Delivery PartnerAWS Systems Manager Service Delivery PartnerAmazon RDS Service Delivery PartnerAWS CloudFormation Service Delivery PartnerAWS ConfigAmazon EMR and many more.

WRITTEN BY Rahulkumar Mehta

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!