https://github.com/tcdoverlord/hyperv-backup-bootstrap
Release-safe Hyper-V backup automation framework with VM selection, drive selection, safe export, and backup verification.
https://github.com/tcdoverlord/hyperv-backup-bootstrap
automation backup bootloader devops-tool hyper-v powershell system-automation vm-management
Last synced: 1 day ago
JSON representation
Release-safe Hyper-V backup automation framework with VM selection, drive selection, safe export, and backup verification.
- Host: GitHub
- URL: https://github.com/tcdoverlord/hyperv-backup-bootstrap
- Owner: tcdoverlord
- License: mit
- Created: 2026-06-16T23:34:36.000Z (12 days ago)
- Default Branch: main
- Last Pushed: 2026-06-18T23:56:01.000Z (10 days ago)
- Last Synced: 2026-06-19T01:21:35.797Z (10 days ago)
- Topics: automation, backup, bootloader, devops-tool, hyper-v, powershell, system-automation, vm-management
- Language: PowerShell
- Homepage:
- Size: 8.29 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HV-LazyBackup (Bootstrap System)
---
# Important Concept
HV-LazyBackup is a bootstrap / unpacker engine. You run one setup script, and it generates the complete Hyper-V backup runtime system.
The bootstrap is for installation. The generated runtime scripts are for daily use.
---
# Only Entry File
```powershell
.\HV_LazyBackup_Bootstrap_Setup.ps1
```
The bootstrap:
- Detects Hyper-V and lists available VMs.
- Lets you choose the target VM.
- Lets you choose a safe backup drive.
- Excludes `C:\` and any drive that hosts the selected VM's virtual disks from backup drive choices.
- Generates config, folders, scripts, helper module, logs, reports, and runtime docs.
- Validates every generated PowerShell file before finishing.
- Fails clearly if generation fails.
---
# Generated System
Default install path:
```text
C:\HV-LazyBackup\
|-- config.json
|-- README.md
|-- logs\
| `-- log.txt
|-- reports\
|-- modules\
| `-- VM-Helpers.psm1
`-- scripts\
|-- Backup-VM.ps1
|-- Verify-Backup.ps1
|-- Check-VMState.ps1
|-- Export-VMState.ps1
`-- Helpers.ps1
```
---
# Installation
Open PowerShell as Administrator on a Hyper-V host:
```powershell
cd
.\HV_LazyBackup_Bootstrap_Setup.ps1
```
Follow the prompts for install path, VM selection, and backup drive.
---
# Daily Operation
Open PowerShell as Administrator:
```powershell
cd C:\HV-LazyBackup
.\scripts\Backup-VM.ps1
```
That opens the daily operation menu:
```text
1. Run Backup Now
2. Verify Last Backup
3. View Backup History
4. Check VM State
5. Export VM State Report
6. Open Logs
7. Change Backup Drive
8. Settings / Configuration
9. Exit
```
---
# Direct Commands
Run backup without the menu:
```powershell
.\scripts\Backup-VM.ps1 -RunBackup
```
Verify backups:
```powershell
.\scripts\Verify-Backup.ps1
```
Check VM state:
```powershell
.\scripts\Check-VMState.ps1
```
Export a VM state report:
```powershell
.\scripts\Export-VMState.ps1
```
---
# Backup Drive Override
The configured backup root comes from `config.json`.
The bootstrap and runtime menu only allow safe backup drives. `C:\` and the drive or drives where the selected VM stores its virtual disks are blocked.
To change the saved default backup drive, use option `7. Change Backup Drive` in the generated menu:
```powershell
.\scripts\Backup-VM.ps1
```
To temporarily use another safe selected drive:
```powershell
.\scripts\Backup-VM.ps1 -RunBackup -BackupDrive X
.\scripts\Verify-Backup.ps1 -BackupDrive X
```
That uses:
```text
X:\VM_MASTER_BACKUP
```
---
# Backup Output
```text
:\VM_MASTER_BACKUP\VM-NAME-MASTER-TIMESTAMP\
```
Example:
```text
X:\VM_MASTER_BACKUP\GrizTechW-MASTER-2026-06-16_12-03\
.vhdx
.vmcx
.vmrs
```
---
# Safety Layer
- Admin expected.
- Hyper-V discovery and VM validation.
- `C:\` backup drive blocked.
- VM storage drive blocked as a backup target.
- Unsafe drives are hidden from backup drive selection.
- Safe VM stop before export.
- Generated file validation.
- Runtime logging.
- Backup verification checks for `.vhdx`.
- VM state reports.
---
# Status
Release-Safe Bootstrap System v1.3
---
# Author
TCDOverLord