State-aware backup and restore tool for UTM virtual machines.
UTM TimeVault requests a graceful guest shutdown before backup, waits until the VM is really stopped, falls back to force stop only on timeout, runs backup/rotation, and starts the VM again if it was running before.
- Interactive menu for beginners
- Scriptable CLI for cron and automation
- Snapshot backups with
rsynchard-link deduplication (requires hard-link support on backup target) - Archive backups (
.tar.zstor.tar.gz) fallback - Global retention per VM
- VM state restore after backup (if previously running)
- Official: macOS + UTM
- Experimental: Linux
curl -fsSL https://raw.githubusercontent.com/meintechblog/utm-timevault/main/scripts/install.sh | bashThen run:
utm-timevault doctorgit clone https://github.com/meintechblog/utm-timevault.git
cd utm-timevault
chmod +x scripts/utm-timevault.sh
sudo cp scripts/utm-timevault.sh /usr/local/bin/utm-timevaultutm-timevault backup --vm "MyVM" --keep 14utm-timevault list-backups --vm "MyVM"
utm-timevault restore --vm "MyVM" --source "/path/to/MyVM.utm_2026-03-04_02-00-00.snapshot" --yesutm-timevault menu
utm-timevault backup --vm <name> [--keep <n>] [--mode auto|snapshot|archive] [--checksum 0|1] [--backup-dir <path>] [--utm-docs-dir <path>] [--timeout <sec>] [--poll <sec>]
utm-timevault restore --vm <name> --source <path> [--yes] [--backup-dir <path>] [--utm-docs-dir <path>] [--timeout <sec>] [--poll <sec>]
utm-timevault list-vms [--utm-docs-dir <path>]
utm-timevault list-backups --vm <name> [--backup-dir <path>]
utm-timevault doctor
utm-timevault version- Snapshot deduplication via
rsync --link-destonly works when the backup target supports hard links. - Default behavior: if snapshot mode is selected but hard links are unavailable, UTM TimeVault auto-falls back to archive mode.
- Control this via
HARDLINK_AUTO_FALLBACK(1default,0to only warn).
- Graceful VM shutdown is requested before backup/restore (
request). - Status polling blocks until VM is really
stopped. - If graceful shutdown times out, force stop is used as fallback.
- On backup completion, VM is started again if it was running before.
- Start polling confirms
started. - Exit trap attempts VM state restoration even if backup fails.
MIT. See LICENSE.