Home VM Backup How to Restore ESXi VM from Backup with Ghettovcb-restore.sh?

How to Restore ESXi VM from Backup with Ghettovcb-restore.sh?

2023-09-13 | Nick Zhao

Table of contents
  • What is ghettoVCB-restore.sh?
  • How to restore ESXi VM with ghettoVCB-restore.sh?
  • How to backup and restore ESXi VM with a professional solution?
  • Conclusion
Are you looking for a robust VM backup solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

ESXi VM can be backed up with ghettoVCB script and there is a post on how to backup ESXi VM with ghettoVCB.

ghettoVCB will generate a full backup of the VM every time, and then you can use ghettoVCB-restore.sh to restore the VM from the backup.

What is ghettoVCB-restore.sh?

The GhettoVCB-restore.sh script is a part of GhettoVCB and is primarily used to restore backed-up virtual machines (VMs). Its main purposes are as follows:

1. Restore a single backup of a VM, including all the VMDKs stored on the data storage disk.

2. Restore multiple backups of VMs stored on the data disk, including all the VMDKs on that data storage.

Before using the script, make sure that the destination for the restore job has enough space to avoid any issues.

Supported disk types: zeroed thick, 2gbsparse, thin, eagerzeroed thick

How to restore ESXi VM with ghettoVCB-restore.sh?

1. Enabling SSH

SSH should be enabled on the ESXi host and the procedures can be found in the post on how to make ESXi VM with ghettoVCB.

2. Preparations

Download ghettoVCB-restore, upload it to the datastore of the ESXi host, and unzip it. Also, find the download link and procedures in that post.

3. options of ghettoVCB-restore

-c VM backup list

-l File to output logging

-d Dryrun/Debug Info [1|2]

4. Create a list

This list should indicate the full path of the location where the VM backup is located and where the VM will be stored after recovery.

Also, set up the virtual disk type in this step:

1=zeroedthick (When creating a virtual hard disk in this format, the system allocates the full size of the virtual hard disk from the underlying data storage. The allocated space is initialized based on the operating system backup, and the remaining space is initialized as needed.)

2=2gbsparse (A unique format that allows the hard disk size to be divided into multiple disk spaces, with each partitioned space being a maximum of 2GB.)

3=thin (Similar to a dynamic disk, the size of the vmdk virtual disk in this format reflects the actual size of the stored data.)

4=eagerzeroedthick (When creating a virtual hard disk in this format, the system allocates the full size of the virtual hard disk from the underlying data storage. All the space is initialized during creation.)

Here is an example of the list.

/vmfs/volumes/datastore1/backup/backup/test/test-2023;/vmfs/volumes/datastore1;4

5. Testing

Use Dryrun/Debug to test the script and list

  1) Dryrun:

~ # ./ghettoVCB-restore.sh -c vms_to_restore -d 1

  2) Debug:

~ # ./ghettoVCB-restore.sh -c vms_to_restore -d 2

6. Restore ESXi VM from backup

Use the parameter [-c] to start the restoration of the backup with the new list named "vms_to_restore".

~ # ./ghettoVCB-restore.sh -c vms_to_restore

After that, you can check whether this VM has been restored in vCenter.

How to backup and restore ESXi VM with a professional solution?

ghettoVCB is easy to use but can’t provide the key features for enterprises like incremental backup, differential backup and schedule. Constantly generating full backup puts pressure on the backup system so a professional backup solution is needed to build a highly efficient backup system.

Vinchin Backup & Recovery is a professional backup system for not only ESXi 8/7/6/5/4 but also other VM like Hyper-V, XenServer, XCP-ng, oVirt, RHV, etc. There will be a user-friendly web console to help easily manage the backup system like creating backup and restore jobs, restoring VM on another virtualization platform (V2V), instantly restoring a VM from its backup (in about 15 seconds), monitoring the status of the whole backup system, etc.

You just need 4 steps to backup ESXi VM.

1. Select the ESXi VM

Select VMware VM

2. Select the storage to store the VM backup

Select Backup Destination

3. Select the backup strategies like incremental backup, schedule, LAN-free backup, etc.

Select Backup Strategies

4. Submit the job

Submit the job

Vinchin Backup & Recovery has been selected by thousands of companies and you can also start a 60-day full-featured free trial here. Also, contact us, leave your requirements, and then you will receive your tailored solution. We have established partnerships with reputable companies all over the world so if you would like to do a local business, you can select a local partner here.

Conclusion

VMware ESXi is often used to deploy virtual environments. For the individual users, ghettoVCB script is enough to backup and restore the VM and there are guides to make backup and restore jobs with it, which for the enterprise users, a more efficient backup system is needed.

Vinchin Backup & Recovery has served thousands of companies and has got a good reputation so you can try it to backup VMs in the production environment. Don’t, miss the free trial.

Share on:

Categories: VM Backup
You May Also Like...