Free VMware ESXi backup script
ghettoVCB: Free VM Backup for VMware ESXi
ghettoVCB is an open-source shell script by William Lam that creates backups of running virtual machines directly on an ESXi host. It takes a temporary snapshot, copies the VM’s disks and configuration to a datastore or NFS share, then cleans up — no backup appliance, agent or vCenter Server required.
- Free & open source
- ESX(i) 3.x – 9.x
- Runs in the ESXi Shell
Open source
Script and docs published on GitHub
Host-side
Runs inside the ESXi Shell itself
ESX(i) 3.x – 9.x
Long-running community project
Cron-ready
Non-interactive, easy to schedule
About ghettoVCB
What is ghettoVCB?
ghettoVCB is a Bourne-shell script that backs up VMware virtual machines from inside the ESXi host. William Lam first published it during the ESX 3.5 era as a free alternative to VMware Consolidated Backup, and it has been maintained on GitHub ever since.
Each backup is a plain copy of the VM folder — the .vmx file plus cloned VMDKs — so you can register it on any ESXi host or restore it with the bundled ghettoVCB-restore.sh. Because it only needs the ESXi Shell, it suits home labs and single-host setups where commercial backup suites are overkill.
- Online backups of powered-on VMs using snapshots
- Targets: local datastore, SAN LUN or NFS export
- Per-VM policies with global defaults in ghettoVCB.conf
- Simple restore script included
Key features
ghettoVCB features that matter day to day
A short tour of what the ghettoVCB script actually does, based on the project’s own documentation.
Hot backups of running VMs
A temporary snapshot freezes the base disk so it can be copied while the VM keeps working. The snapshot is removed when the copy finishes.
Local, SAN or NFS targets
Write backups to any datastore the host can see. ghettoVCB can also mount an NFS export for the run and unmount it afterwards.
No proxy or appliance
Everything runs in the ESXi Shell with built-in tools such as vim-cmd and vmkfstools. Nothing extra has to be deployed.
Backup rotation
VM_BACKUP_ROTATION_COUNT keeps the newest copies and deletes older ones, so a backup volume does not silently fill up.
Choice of disk format
Store backups as thin, zeroedthick, eagerzeroedthick or 2gbsparse disks. Thin is the usual pick when space matters.
Per-VM policy files
Point the -c flag at a folder of policy files named after each VM to override rotation, format or power settings per machine.
Dry-run mode
Run with -d dryrun to see each VM's disks, total size and any blockers before a single byte is copied.
Email log reports
Optionally email the log after each run, so failed jobs are noticed without logging in to the host.
Built-in restore
ghettoVCB-restore.sh copies a backup to a target datastore, converts the disk format if needed and registers the VM.
Before you start
ghettoVCB system requirements
ghettoVCB is not a desktop program, so there is no Windows or Linux installer. It runs on the ESXi host; your PC is only used to copy files over.
| Requirement | Details |
|---|---|
| Hypervisor | VMware ESX / ESXi 3.x through 9.x (check the README for notes on your exact release) |
| Host access | ESXi Shell or SSH enabled, logged in as root |
| Package | VIB or offline bundle (ESXi 5.x and later), or the raw shell scripts on older hosts |
| Backup storage | A datastore with room for every VM × your rotation count — local VMFS, SAN or NFS |
| Your workstation | Any Windows PC, Linux or macOS machine with an SSH/SCP client (for example OpenSSH or WinSCP) |
| vCenter Server | Not required — ghettoVCB talks to the host directly |
ghettoVCB download
Download ghettoVCB from the official source
The only official place to get ghettoVCB is William Lam’s GitHub repository. Releases include a VIB and an offline bundle for esxcli, and the source tree contains the plain scripts. Version numbers and file sizes are listed on the release page itself — we link there instead of rehosting files.
- Software: ghettoVCB
- Author / publisher: William Lam (lamw on GitHub)
- License: free and open source — see the repository's license file
- Runs on: VMware ESX/ESXi host (3.x – 9.x)
- Formats: VIB, offline bundle (.zip), shell scripts
- Latest version & file size: shown on GitHub Releases
Before you download
- Read the README for the release that matches your ESXi version.
- Compare the file you receive with what the GitHub release page lists.
- Test on a non-critical VM first and run a dry run.
- Keep at least one backup copy off the host itself.
ghettovcb.com is an independent informational site. It is not affiliated with William Lam, VMware or Broadcom, and it does not host ghettoVCB files.
Installation
How to install ghettoVCB on ESXi
The steps below follow the project’s README. File names can change between releases, so check the release page before you copy commands.
1. Download
Grab the VIB or offline bundle from GitHub Releases on your PC or Linux machine.
2. Copy to the host
Enable SSH on the ESXi host, then copy the file to /tmp with scp or WinSCP.
3. Install with esxcli
Install the VIB (-v) or offline bundle (-d). Use update instead of install to keep an existing config.
4. Configure & test
Edit /etc/ghettovcb/ghettoVCB.conf, list your VMs, then run a dry run before the first real backup.
# from your workstation
scp vghetto-ghettoVCB.vib root@esxi01:/tmp/
# on the ESXi host (SSH)
esxcli software vib install -v /tmp/vghetto-ghettoVCB.vib -f
# or, using the offline bundle
esxcli software vib install -d /tmp/<offline-bundle>.zip -f
# remove later if needed
esxcli software vib remove -n ghettoVCB Guide
How to use ghettoVCB
Day-to-day use comes down to a handful of flags. Scripts live in /opt/ghettovcb/bin/ after a VIB install.
| Command | What it does |
|---|---|
ghettoVCB.sh -f vms_to_backup | Back up the VMs listed (one name per line) in the file |
ghettoVCB.sh -a | Back up every VM on the host |
ghettoVCB.sh -f vms_to_backup -d dryrun | Preview what would be backed up, without copying anything |
ghettoVCB.sh -f vms_to_backup -g /path/ghettoVCB.conf | Use a specific global configuration file |
ghettoVCB.sh -f vms_to_backup -c /path/vm_configs | Apply per-VM policy files from a folder |
ghettoVCB.sh -f vms_to_backup -l /vmfs/volumes/ds1/ghettoVCB.log | Write the log to a datastore instead of volatile /tmp |
Schedule nightly backups with cron
ESXi keeps root’s crontab in /var/spool/cron/crontabs/root. Changes there do not survive a reboot on their own, so also add the cron line to the host’s startup script (/etc/rc.local.d/local.sh on current ESXi) and run /sbin/auto-backup.sh to save the configuration.
# run every night at 01:00
0 1 * * * /opt/ghettovcb/bin/ghettoVCB.sh \
-f /vmfs/volumes/datastore1/vms_to_backup \
-l /vmfs/volumes/datastore1/ghettoVCB.log > /dev/null 2>&1
# reload cron after editing
kill $(cat /var/run/crond.pid)
crond Under the hood
How ghettoVCB works
Every run follows the same predictable sequence for each VM in your list.
First the script reads the global ghettoVCB.conf and any per-VM policy file. It then creates a snapshot so the original VMDK stops changing, and uses vmkfstools to clone each disk into a timestamped folder on the backup volume. When cloning finishes, the snapshot is removed and the changes written in the meantime are merged back.
Finally, folders beyond VM_BACKUP_ROTATION_COUNT are deleted. Every run is a full copy — there is no change-block tracking or deduplication — which keeps restores simple but means each backup takes as long as copying the whole VM.
Compatibility
ghettoVCB compatibility at a glance
Version support below reflects the project documentation. Always read the README for the release you install.
| Platform | Supported? | Notes |
|---|---|---|
| ESX / ESXi 3.x – 4.x | Yes (legacy) | Copy the scripts manually; very old releases |
| ESXi 5.x – 6.x | Yes | Install the VIB with esxcli |
| ESXi 7.x | Yes | VIB or offline bundle |
| ESXi 8.x and later (incl. 9.x) | Yes | VIB or offline bundle |
| vCenter Server | Not needed | Runs per host; schedule each host separately |
| Windows PC / Linux desktop | No | Use them only to download and upload files |
| Hyper-V, Proxmox, VMware Workstation | No | ghettoVCB targets ESX/ESXi only |
Honest assessment
ghettoVCB pros and cons
ghettoVCB is excellent at one job. Knowing its limits helps you decide whether it fits your environment.
Pros
- Completely free and open source
- No appliance, agent or Windows server to maintain
- Backups are standard VMX + VMDK files you can register anywhere
- Works well with an NFS share on a NAS
- Easy to schedule with cron and script around
- Per-VM policies for mixed workloads
Cons
- Full copy every run — no incremental backups or deduplication
- Command line only, no web interface
- No file-level or application-aware restore
- VMs with existing snapshots are skipped by default
- Independent disks are not captured by snapshots
- Community support only; you own the testing
Who uses it
Common ghettoVCB use cases
Typical situations where a lightweight ghettoVCB backup is the right tool.
Home labs
Protect a single lab host's VMs on a schedule without paying for a backup suite.
Small offices
Copy a few business VMs nightly to a NAS share on one or two standalone hosts.
Before upgrades
Take a full, restorable copy of a VM before patching the guest OS or the host.
Moving VMs between hosts
Back up on one host and restore on another when there is no vMotion.
Offsite copies
Point backups at an NFS export that is replicated or synced to another site.
Test and dev clones
Restore a backup under a new name to build a disposable test copy of production.
Screenshots
ghettoVCB in action
Illustrative renders of real ghettoVCB commands and output formats. Your host names, paths and timings will differ.
Troubleshooting
Fixing common ghettoVCB problems
Most ghettoVCB backup failures come from a handful of predictable causes.
VM skipped: snapshots exist
Consolidate or delete existing snapshots first. ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP exists, but read the README's warnings before enabling it.
NFS share will not mount
Check that the export allows the host's IP with root access, the VMkernel port can reach the NAS, and the NFS client firewall rule is enabled.
Cron job gone after reboot
ESXi rebuilds crontab at boot. Add the line to /etc/rc.local.d/local.sh and run /sbin/auto-backup.sh.
Backup stopped half-way
Kill the leftover ghettoVCB, tail and vmkfstools processes, then remove the ghettoVCB snapshot in Snapshot Manager.
Log file disappeared
/tmp is wiped on reboot. Pass -l with a path on a datastore so logs survive.
Email reports not arriving
Confirm EMAIL_SERVER and port, and allow outbound SMTP in the ESXi firewall for that port.
Security & privacy
Keep your ghettoVCB backups safe
A VM backup contains everything inside that VM — databases, keys and user data. Treat the backup volume with the same care as production.
- Download only from the official GitHub repository
- Disable SSH on the host when you are not using it
- Restrict the NFS export to your ESXi hosts' IP addresses
- Encrypt or physically secure the backup storage
- Keep a copy off-site or offline to survive ransomware
- Test a restore regularly — an untested backup is a guess
About this website
ghettovcb.com is an independent guide. We do not collect data from your hosts, do not bundle or modify ghettoVCB, and do not run download mirrors. Links send you straight to the original GitHub project.
Read our Privacy Policy and Disclaimer for details.
Alternatives
ghettoVCB alternatives worth comparing
If you need incremental backups, a dashboard or vendor support, these are the tools people usually compare ghettoVCB with. Check each vendor’s site for current pricing.
| Tool | Approach | Cost | Good fit for |
|---|---|---|---|
| ghettoVCB | Shell script on the ESXi host | Free, open source | Home labs and standalone hosts |
| Vinchin Backup & Recovery | Agentless backup platform with web console | Commercial, free trial | Teams wanting incremental backups and a GUI |
| Veeam Backup & Replication | Full backup suite using vSphere APIs | Commercial; free Community Edition with limits | Licensed vSphere environments |
| NAKIVO Backup & Replication | Backup software / appliance | Commercial, free trial | SMBs and service providers |
| XSIBackup | Host-side ESXi backup tool | Commercial editions | Host-side backups with deduplication |
Looking for a Vinchin download? Get the trial only from the vendor’s official website. Note that tools built on the vSphere Storage APIs generally need a licensed ESXi edition, while ghettoVCB works locally on the host.
User reviews
What ghettoVCB users say
We publish only reviews we can verify. Used ghettoVCB in your lab or business? Tell us how it went.
★★★★★
[Placeholder — replace with a real, verified user review before publishing.]
Reviewer name
Role · ESXi version
★★★★★
[Placeholder — replace with a real, verified user review before publishing.]
Reviewer name
Role · ESXi version
★★★★★
[Placeholder — replace with a real, verified user review before publishing.]
Reviewer name
Role · ESXi version
FAQ
ghettoVCB frequently asked questions
Straight answers to the questions people ask most about ghettoVCB download, installation and backups.
Download, installation & licensing
Is ghettoVCB free to download and use?
Yes. ghettoVCB is free and open source, published by William Lam on GitHub. There is no paid edition, license key or trial period. The repository includes the license terms, so read them if you plan to redistribute or modify the script inside your own tooling or products.
Where is the official ghettoVCB download?
The official source is the lamw/ghettoVCB repository on GitHub. Its Releases page provides the VIB and offline bundle used with esxcli, and the main branch contains the plain scripts. Avoid third-party mirrors: you cannot easily confirm that a rehosted copy has not been modified.
Can I install ghettoVCB on Windows or Linux?
No. ghettoVCB runs on the VMware ESXi host itself. A Windows PC, Linux machine or Mac is only used to download the package and copy it to the host with scp or WinSCP. After that, you run every ghettoVCB command over SSH inside the ESXi Shell.
Which ESXi versions does ghettoVCB support?
The project documentation covers ESX and ESXi 3.x through 9.x. ESXi 5.x and 6.x use the VIB, while 7.x and later can use either the VIB or the offline bundle. Very old releases require copying the scripts manually. Check the README for notes specific to your build.
How do I install ghettoVCB with esxcli?
Copy the VIB to /tmp on the host, then run esxcli software vib install -v /tmp/vghetto-ghettoVCB.vib -f. For an offline bundle use -d with the .zip path instead. The scripts land in /opt/ghettovcb/bin and the configuration in /etc/ghettovcb. Use update rather than install to keep your existing settings.
Do I need vCenter Server to use ghettoVCB?
No. ghettoVCB works directly on each ESXi host using local tools such as vim-cmd and vmkfstools. That is a big part of its appeal for standalone hosts. The trade-off is that schedules and configuration are managed per host, so a multi-host cluster means repeating the setup on every host.
How do I upgrade or remove ghettoVCB?
To upgrade, copy the new package to the host and run esxcli software vib update with the same -v or -d option; this keeps your ghettoVCB.conf. To remove it completely, run esxcli software vib remove -n ghettoVCB. Your existing backup folders on the datastore are not touched either way.
Does ghettoVCB need a reboot after installation?
Normally no. The esxcli output shows a Reboot Required field, which is usually false for the ghettoVCB VIB. If your host reports otherwise, follow that instruction. Remember that cron entries still need the startup-script step to survive any future reboot of the host.
Is ghettovcb.com the official ghettoVCB website?
No. ghettovcb.com is an independent informational site that explains how to install, configure and use ghettoVCB. It is not affiliated with William Lam, VMware or Broadcom and does not host the files. Download buttons point to the original GitHub project so you always get the genuine release.
Features, security & troubleshooting
Can ghettoVCB back up running virtual machines?
Yes. ghettoVCB creates a temporary snapshot so the base VMDK stops changing, clones the disks with vmkfstools, then removes the snapshot. The VM stays online throughout. For databases, consider enabling quiescing with VMware Tools or stopping the service first so the backup is application-consistent rather than crash-consistent.
Does ghettoVCB support incremental backups?
No. Each run makes a full copy of every selected VM. That keeps restores very simple because each folder is complete, but it uses more storage and time than incremental tools. Rotation through VM_BACKUP_ROTATION_COUNT limits how many full copies are kept on the backup volume.
Where should I store ghettoVCB backups?
Any datastore visible to the host works: local VMFS, a SAN LUN or an NFS export on a NAS. NFS is popular because it keeps backups off the host’s own disks, and ghettoVCB can mount it just for the run. Ideally keep a further copy off-site or offline.
How do I restore a VM from a ghettoVCB backup?
Create a restore file with the backup folder, destination datastore, disk format number and, optionally, a new VM name, then run ghettoVCB-restore.sh -c with that file. The script copies the disks and registers the VM. You can also register the backed-up .vmx manually from the datastore browser.
Why was my VM skipped during the backup?
The most common reason is an existing snapshot on the VM; ghettoVCB skips those by default to avoid corrupting the snapshot chain. Independent disks and VMs whose names do not match the list file exactly are other causes. Run a dry run with -d dryrun to see the reason.
Can I schedule ghettoVCB to run automatically?
Yes. Add a line to /var/spool/cron/crontabs/root that calls ghettoVCB.sh with your VM list and log path, then restart crond. Because ESXi rebuilds crontab at boot, also place the line in /etc/rc.local.d/local.sh and run /sbin/auto-backup.sh so the schedule survives reboots.
Is ghettoVCB safe to use in production?
Many administrators run it in production, but it is community-supported software with no vendor SLA. Test it on non-critical VMs, watch the logs, monitor free space on the backup volume and restore a VM regularly. If you need guaranteed support, a commercial tool may be a better fit.
Does ghettoVCB encrypt or compress backups?
Compression is optional through the ENABLE_COMPRESSION setting, but test restores carefully if you use it, particularly with large VMs. ghettoVCB does not encrypt backups itself, so protect them at the storage level with an encrypted NAS volume, restricted NFS exports and physical security.
How do I troubleshoot a failed ghettoVCB backup?
Start with the log; write it to a datastore with -l because /tmp is cleared on reboot. Check free space, existing snapshots and NFS connectivity. If a run was interrupted, kill leftover ghettoVCB and vmkfstools processes and remove the ghettoVCB snapshot before trying again.
Blog
Latest ghettoVCB guides
Step-by-step tutorials on ghettoVCB backup, ghettoVCB configuration and ESXi housekeeping.
Need help with your ghettoVCB setup?
Spotted an error on this site, or have a question we have not covered? Send us a message and we will do our best to point you in the right direction.
An independent guide to ghettoVCB, the free VM backup script for VMware ESXi. Not affiliated with William Lam, VMware or Broadcom.
Quick links
© 2026 ghettovcb.com · ghettoVCB is developed by William Lam and distributed via GitHub. VMware and ESXi are trademarks of Broadcom Inc. and/or its subsidiaries.