What Is ghettoVCB? The Free ESXi VM Backup Script Explained

If you run a small VMware ESXi host, you probably know the backup problem well. The big commercial backup products assume you have vCenter, a licensed edition, and a budget to match. Your host might be a single server in a closet, a lab box, or a free ESXi install running a handful of virtual machines that matter a lot to you. You still need backups, and you need them to be simple enough that you will actually run them. That is the gap ghettoVCB fills, and it has filled it for years with nothing more than a shell script.

ghettoVCB is a free, open-source shell script by William Lam, who writes at virtuallyGhetto, and the project lives on GitHub at lamw/ghettoVCB. It backs up virtual machines on ESX and ESXi hosts. It works without vCenter and without the VMware backup APIs, which means it also works with free ESXi. That single fact explains most of its popularity. It is a community script, not an officially VMware-supported product, and you should go in with that understanding. What you get in return is a backup method that is transparent, cheap, and entirely under your control.

What ghettoVCB Actually Does

At its core, ghettoVCB takes a snapshot of a live, running virtual machine, copies the virtual machine’s files to a backup destination, and then deletes the snapshot. The files it backs up include the master VMDK files plus the VMX configuration file, the NVRAM file, the VMSD file, and related files that describe the virtual machine. When the backup finishes, you have an ordinary set of VM files sitting on another datastore, a SAN volume, or an NFS share. Nothing about the result is proprietary. You can look at the files, copy them, and register them again later, which is exactly how a restore works.

The method follows the same idea as VMware’s old VCB tool, which is where the name comes from. ghettoVCB uses the resources of the ESXi Shell on the host itself to do the work, rather than offloading the job through a separate backup proxy. That keeps the setup small. There is no extra server to install, no agent to deploy inside each guest, and no database to maintain. You run a script on the host, and the host copies its own virtual machines. For a one-host or few-host setup, that simplicity is the whole appeal.

Snapshot Backups, Explained Plainly

To back up a running VM safely, you cannot just copy its disk files while they are changing. ghettoVCB solves that with a snapshot. The snapshot freezes a point in time: the VM keeps running, and new writes go into a delta file while the backup reads the stable base disks. When the copy is done, the script deletes the snapshot, and the delta merges back. The VM is briefly stunned during snapshot creation and deletion, and the snapshot work adds I/O load, so you should not schedule backups at peak hours.

One consequence matters for planning. ghettoVCB skips any VM that already has a snapshot, unless you change the ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP setting. That default protects you from stacking snapshots on top of snapshots. If a previous backup failed and left a snapshot behind, you need to consolidate it and find out why before the next run, or the next run will skip that VM too. A skipped VM is easy to miss if you never read the log, which is why checking the log after every run is part of using this tool properly.

What You Need to Run It

You need an ESX or ESXi host, access to the ESXi Shell or SSH as root, and a backup destination with enough free space. The README lists ESX(i) versions 3.x through 9.x as tested, so the script has a long history across many releases. Your backup destination can be local storage, a SAN volume, or NFS, and each choice has trade-offs that later guides on this site cover in detail. The most important rule is the simplest one: backups must live on different storage from the VMs they protect. A backup on the same datastore as the original VM does not survive the datastore failure it is supposed to protect you from.

There is no graphical interface. ghettoVCB runs from the command line, and it is non-interactive, which is what makes it easy to schedule. You will type commands like ghettoVCB.sh -m MyVM to back up one VM by its display name, or ghettoVCB.sh -a to back up all VMs. That command line style puts some people off, but it also means every backup is a command you can read, repeat, and put in a cron job. There is nothing hidden behind a wizard.

Before your first run, have these ready:

  • Root SSH access to the ESXi host
  • A backup destination on separate storage, with free space checked
  • The exact display name of one small test VM
  • A log file path for the script output

Who ghettoVCB Is For

ghettoVCB suits home lab owners, small businesses with one or two ESXi hosts, and anyone running free ESXi who still needs real backups. It suits people who are comfortable in a shell and who like knowing exactly what a backup tool did. It also suits anyone who wants a second, independent backup copy alongside a commercial product. A script that produces plain VM files is a good safety net, because the files it makes do not depend on any vendor’s catalog or database to restore.

It is a weaker fit if you need a supported product with a support contract, a graphical dashboard, or application-aware backups with vendor guarantees. It is also a weaker fit if you manage dozens of hosts and need central reporting. In those cases, a commercial backup product is the honest recommendation, and the comparison guide on this site walks through the differences. ghettoVCB does one job for small environments, and it does it well, but it does not pretend to be an enterprise backup suite.

What ghettoVCB Is Not

Honest limits matter with a backup tool, so here they are. ghettoVCB has no changed-block tracking and no true incremental backups. Every run is a full copy of the VMDKs, so each backup costs the full disk space and copy time. Rotation settings and thin disk formats control how much space that costs, but they do not change the full-copy nature of the job. There is no deduplication, no replication, no encryption, and no cloud upload built in. If you need those features, you need another tool or another layer on top of the backup files.

ghettoVCB also does not monitor itself. If a cron job fails, nobody tells you unless you set up email alerts or you read the logs. It does not verify a backup by booting it, and it does not warn you that a restore has never been tested. Those responsibilities stay with you. An untested backup is not a backup, whatever tool made it, and ghettoVCB’s plain-file output makes testing easy: register the backed-up VMX on a test host or datastore and power it on.

Getting Started in Plain Steps

The path to your first backup is short. Enable the ESXi Shell and SSH on the host, get the script onto a datastore, and make it executable. Run it in dry run mode first with -d dryrun to see what it would do without copying anything. Then back up one non-critical VM, read the log, and check that the backup files appeared where you expected. A successful run reports “Final status: All VMs backed up OK!” in its output. Only after that first small success should you schedule the script and point it at every VM you care about.

Read the README before you edit the configuration file. The configuration controls the destination, the disk format, how many old backups to keep, and whether VMs are powered down first, and a wrong value there can fill a datastore or skip the VMs you meant to protect. The configuration guide on this site explains each setting in plain language, but the README is the authority for your version of the script.

Conclusion

ghettoVCB is a small, free, community script that backs up ESXi virtual machines without vCenter and without backup APIs, using snapshots and plain VM files. It is transparent, cheap, and easy to schedule, and it works on free ESXi. Its limits are just as clear: full copies every run, no graphical interface, no built-in deduplication or cloud features, and no support contract. If you run a small ESXi setup and you are willing to read logs and test restores, it is one of the most practical backup tools you will find. Start with one VM, prove the backup, prove the restore, and build from there.

Read next: How to Download and Install ghettoVCB on ESXi, How to Back Up a VM with ghettoVCB: Your First Backup, ghettoVCB vs Veeam and Other ESXi Backup Tools

2 thoughts on “What Is ghettoVCB? The Free ESXi VM Backup Script Explained”

  1. Pingback: How to Download and Install ghettoVCB on ESXi

  2. Pingback: ghettoVCB vs Veeam and Other ESXi Backup Tools

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top