Skip to content

Conversation

@itiligent
Copy link

@itiligent itiligent commented Aug 27, 2025

PR Overview

This PR introduces ghettoVCB-Express.sh, a fast and user-friendly wrapper for ghettoVCB.sh and ghettoVCB-restore.sh scripts.

This wrapper script provides single command VM backup and recovery on ESXi via ghettoVCB.

Single command usability is achieved though automating the manual configuration tasks required by ghettoVCB, plus adding new flexibility via features such as:

  • Backup and restore of a cusomizable grouping of VMs from a single command
  • Support for an exclusion list of VMs to skip
  • Optional VM renaming prompts for each VM restoration task
  • Support for VMs with spaces in their names
  • Support for cancel and re-run without errors (cleans up old tmp files and orphan processes on each run.)

How It Works

  1. Just place the following files in the same directory:

    • ghettoVCB.conf (configure with your backup settings. Local or temporary NFS datastores remain supported)
    • ghettoVCB.sh
    • ghettoVCB-restore.sh
  2. Run the script with arguments below:

# Backup
./ghettoVCB-Express.sh --name vmname | "vm name"  # Back up a specific VM
./ghettoVCB-Express.sh --all                      # Back up all VMs except $EXCLUDED

# Restore
./ghettoVCB-Express --restore --name vmname       # Restore a specific VM, prompts to optionally rename
./ghettoVCB-Express.sh --restore --all            # Before executing restore, prompts to optionally:
                                                     # 1. Rename each VM auto discovered in the backup location
                                                     # 2. Customize the auto generated restore list   
# Dry Run
./ghettoVCB-Express.sh --dry-run --all            # Previews discovered VMs to be backed up
./ghettoVCB-Express.sh --restore --dry-run --all  # Previews discovered VMs to be restored

# Help
./ghettoVCB-Express.sh --help                     # Shows these usage options
  1. The script automatically selects the backup datastore path from ghettoVCB.conf

  2. If a non-persisten NFS backup datastore is configured in ghettoVCB.conf, this will be auto-mounted, and dismounted on comepletion for both backup or restore jobs..


About Backup Tasks

When run with --all or --name :

  • Backups will be executed with all ghettoVCB.conf options whilst also respecting exclusions in the EXCLUDE_VMS section of ghettoVCB-Express.sh

About Restore Tasks

When run with --restore --all or --restore --name :

  • A vm restore list is generated automatically

  • Before restore execution:

    • User is prompted to optionally rename each VM in the restore job.
    • User is then given the extra option to manually edit the vm restore list with vi before continuing.

@itiligent itiligent changed the title ghettoVCB-Express.sh - full backup/restore flexibility in a single command ghettoVCB-Express.sh - flexible backup/restore wrapper for single command backup & restore Aug 27, 2025
added interactive recovery datastore selection and option to delete decompressed backups after restore (to save disk space during bulk migration/restore tasks) plus several small improvements
@itiligent
Copy link
Author

Added ability to infintely customize backup and recovery selections in a single command

eg ./ghettoVCB-Express.sh --restore --name VM1 --name VM2

This script searches the configured recovery or backup locations and automatcally builds the lists ghettoVCB reads from for both backup and restore tasks. Retores offer a prompt to rename each system on the fly.

Also added interactive choice of recovery store, and option to delete decompressed backups after each individual vm restore to save disk space during bulk recovery tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant