Repository navigation
Backups Updates and Maintenance
Vitrine RMM includes a built-in encrypted backup engine (backend/src/services/backup/index.ts) and release channel self-updater (backend/src/services/updater/index.ts) managed under Settings -> Backups & Updates.
Every manual, scheduled, or pre-update backup (POST /api/backups) produces a self-contained, authenticated .vrmm-backup.gz archive:
-
Hot Atomic SQLite Snapshot: Uses
better-sqlite3's native online SQLite Backup API (db.backup(...)) so WAL transactions are captured atomically without locking or corrupting live fleet telemetry. -
Complete Recovery Bundle: Packages
vitrine.db(Schemav16),.vault-key.json(so AES-256-GCM LAPS, BitLocker, andsecretCustom Field values remain decryptable on a brand-new server), custom white-labelbranding/assets, and a JSON manifest (appVersion,schemaVersion,sha256,createdAt). -
Authenticated
VRMMENC1Envelope: Compresses the bundle withgzipand encrypts it with AES-256-GCM using the 8-byte magic headerVRMMENC1, random salt/IV, and 16-byte GCM authentication tag. -
Reboot-Resilient Scheduled Backups & Pruning: The background scheduler triggers daily/weekly snapshots whenever
now >= todayTargetandelapsedMs >= minIntervalMs(catching up cleanly even if the server was rebooted or offline during the exact scheduled minute) and prunes expired archives beyondbackup_retention_count.
To guarantee you can always decrypt .vrmm-backup.gz archives during bare-metal disaster recovery when the original server is lost:
-
Step-Up MFA Reveal &
.txtExport (POST /api/backups/recovery-key): Super Admins can reveal, copy to clipboard, or download a timestamped.txtrecovery kit of the active backup encryption passphrase (or fallback master vault key hex) at any time under Settings -> Backups -> Reveal / Export Backup Recovery Key. -
Onboarding & Persistent Settings Reminder (
POST /api/backups/acknowledge-key): Both the First-Run Setup Wizard (Step 6) and Settings -> Backups display a prominent Backup Key Escrow reminder banner until a Super Admin confirms the recovery key has been stored in an external password manager.
Without requiring external CLI binaries, Vitrine RMM includes a pure Node crypto AWS Signature V4 (AWS4-HMAC-SHA256) client (protected by validateOutboundHostSafety) supporting Amazon S3, Cloudflare R2, Backblaze B2 (S3 API), and MinIO.
Administrators can restore from a local snapshot (POST /api/backups/:id/restore) or upload an external .vrmm-backup.gz bundle (POST /api/backups/upload-restore):
- Verifies the
VRMMENC1header and GCM authentication tag before touching disk. - Validates SQLite header magic and checks
schemaVersion:-
Older Schema Backups (
backupSchema < 16): Restores atomically and automatically runs forward idempotent schema migrations (ensureSchemaUpgrades()) up tov2.5.1(Schemav16). -
Newer Schema Backups (
backupSchema > 16): Safely blocks restore with instructions to update Vitrine RMM first.
-
Older Schema Backups (
- Atomically swaps the live SQLite connection, restores
.vault-key.jsonandbranding/, and immediately invokesreloadVaultMasterKey()so secrets encrypted on a different source machine decrypt seamlessly without requiring a process restart.
Under Settings -> System Updates (GET /api/updater/status, POST /api/updater/check, POST /api/updater/apply):
-
Release Channels: Choose
stable(tagged production GitHub Releases only, recommended) oralpha(pre-release / preview tags). -
Full Bare-Metal Update Pipeline (enabled automatically by
install.shviaVITRINE_ENABLE_GIT_SELF_PULL=true):- Creates a pre-update
VRMMENC1encrypted backup and recordspreHeadSha. - Executes
git fetch --tags --force originand checks out/fast-forwards to the target release tag. - Runs
npm install+npm run buildin bothfrontendandbackend, followed by forward SQLite schema upgrades. -
Full Automatic Rollback: If any fetch, dependency, build, or migration step fails,
updater/index.tsautomatically executesgit reset --hard <preHeadSha>, rebuilds the known-good commit, and restores the pre-updateVRMMENC1database snapshot so the server is never stranded.
- Creates a pre-update
-
Docker Container Detection: When
VITRINE_DOCKER=true(or/.dockerenvis present), Vitrine cleanly disables in-placegitmutation and presents exact multi-archdocker compose pull && docker compose up -dcommands.