Installing ghettoVCB is refreshingly short compared with most backup software. There is no backup server to build, no database to install, and no agent to deploy into your virtual machines. You get a script onto your ESXi host, make it executable, and run it. The whole job can take under half an hour, and most of that time is reading and double checking paths. This guide walks you through each step, including the three ways to install the script, so you can pick the one that fits how you manage your host.
Before you start, you need two things: access to the ESXi host as root, and a backup destination in mind. The destination can be a second datastore, a SAN volume, or an NFS share, and it must have enough free space for full copies of the VMs you plan to protect. You also need the ESXi Shell and SSH enabled, because that is where the script runs. Everything in this guide assumes you are comfortable typing commands in a shell. If that is new to you, go slowly, type each command exactly, and read the output before you move on.
Step 1: Enable the ESXi Shell and SSH
ghettoVCB runs on the host itself, so the host must let you in. In the vSphere Client, select the host, open Actions, then Services, and enable the ESXi Shell and SSH services. You can also enable them from the direct console on the host. Leave SSH running while you set the script up, and think about whether you want it left on afterwards. Many administrators enable SSH only while they work on the host and disable it when they finish, as a small security habit. Either way, the script itself needs shell access when it runs, including when cron runs it, so plan your service settings around your backup schedule.
Connect with an SSH client and log in as root. Confirm you can see your datastores under /vmfs/volumes/ before you go further. If you cannot see the datastore that holds your VMs, stop and sort out access first, because every later step assumes you can reach those paths. Note the exact datastore names, including their capitalization, because the script and its configuration use full paths and ESXi paths are case sensitive in practice.
Step 2: Choose an Install Method
There are three ways to get ghettoVCB onto a host, and all three end up with the same scripts. The first is the VIB package. A VIB is the standard ESXi software package format, and installing it puts the script in a known location with a known configuration file. The second is the offline bundle, which is a zip containing the VIB and installed the same way through the ESXi software tools. The third is the plain script archive: you download it, extract it onto a datastore, and run the scripts directly. Pick the VIB or bundle if you like managed installs, and pick the archive if you prefer to see exactly what files you are running.
Download only from the official project source, the lamw/ghettoVCB repository on GitHub. Your backups depend on this script running as root, so the source matters more than convenience. Do not download ghettoVCB from random file mirrors or forum attachments. The project page is the front door, and it also holds the README you should read before you change any setting.
Step 3: Install the VIB or Offline Bundle
To install the VIB, copy the VIB file to the host, for example to a datastore, and run the ESXi software install command with the full path to the file, using the force flag shown in the project docs: esxcli software vib install -v /path/vghetto-ghettoVCB.vib -f. Replace the path with the real location of your VIB file. To install the offline bundle instead, use the bundle form of the same command: esxcli software vib install -d /path/vghetto-ghettoVCB-offline-bundle.zip -f. Both commands should report success, and a reboot is not normally required for the script itself, though you should follow any message the installer prints.
After a VIB install, the script lives at /opt/ghettovcb/bin/ghettoVCB.sh and its configuration file lives at /opt/ghettovcb/ghettoVCB.conf. Those paths are worth memorizing, because every example in the docs and in the guides on this site uses them. If you installed from the archive instead, the scripts live wherever you extracted them, and you must use those paths consistently in every command and cron job. Mixing paths between installs is a common source of confusion, so pick one install and stick with it.
Step 4: Install From the Script Archive Instead
If you chose the archive route, copy the archive to a datastore, extract it, and look inside. You will find ghettoVCB.sh, the restore helper ghettoVCB-restore.sh, and the sample configuration file ghettoVCB.conf. Make the scripts executable with chmod +x on each script file, using the full path to where you extracted them. Without the executable bit, the shell will refuse to run them, and the error message will say so plainly. Test that the script runs at all with a help or dry run invocation before you point it at a real VM.
Put the scripts somewhere stable. A datastore path that survives reboots is right, and a temporary upload folder is wrong. The script must still be there when cron runs it at midnight weeks from now. If you later upgrade by replacing the scripts, keep your configuration file safe, because your destination, rotation, and format settings live in it. With a VIB upgrade, use update instead of install if you want the installer to preserve your ghettoVCB.conf settings.
Step 5: Verify the Install
Verification is short and worth doing. Run the script with a dry run against a single VM name you know exists, and watch the output. A dry run reports what it would back up without copying files, and on success it reports “Final status: OK, only a dryrun”. If you see that line, the script found the VM, read the configuration, and reached the destination logic. If you see an error instead, read it literally. Most install failures are a wrong path, a missing executable bit, or a configuration file the script cannot find, and the message usually names the problem.
Also confirm the configuration file exists where you expect it and open it once to see the defaults. You do not need to change anything yet. The point is to know where the settings live and what the defaults say, before a backup run depends on them. The configuration guide on this site explains each setting, but a first look now will make that guide much easier to follow. Pay attention to the backup volume setting in particular, because the default destination may not be where you want full VM copies to land.
Common Install Problems
- SSH or Shell disabled: enable both services on the host before you connect
- Command not found: you are in the wrong directory, or you used a relative path instead of the full script path
- Permission denied: the script is not executable, so run chmod +x on it with the full path
- Wrong VIB path: the esxcli command needs the full path to the VIB or bundle file, not just the filename
- Settings lost on upgrade: use update instead of install for a VIB upgrade, so ghettoVCB.conf is preserved
- Script in a temporary folder: move it to a stable datastore path that survives reboots
Most install problems are path problems. ESXi shell work rewards full paths and careful typing, and punishes guesses. When something fails, re-read the exact command you typed, check the exact path, and try again. Copy the exact error message into your notes before you search for help, because an exact message gets an exact answer.
Conclusion
Downloading and installing ghettoVCB takes minutes: enable the Shell and SSH, install the VIB or offline bundle with esxcli, or extract the script archive and make the scripts executable. Verify with a dry run, confirm the configuration file location, and read the README before you change settings. Once the dry run reports success, you are ready to back up a real VM, and the next guide walks through that first backup step by step.
Read next: What Is ghettoVCB? The Free ESXi VM Backup Script Explained, How to Back Up a VM with ghettoVCB: Your First Backup, ghettoVCB Not Working? Common Errors and Fixes
Pingback: Back Up a VM with ghettoVCB: First Backup Guide
Pingback: Restore a VM from a ghettoVCB Backup: Step by Step
Pingback: ghettoVCB Not Working? Common Errors and Fixes