[<< BACK TO PROJECTS]
Backup & Recovery + Windows Systems2026 · Deployed Product

# SqlVault

A Windows client-side backup agent that backs up SQL Server databases into a single vendor-owned Google Drive account, organized per customer. Customers never touch Google credentials; storage belongs to the vendor.

SQL ServerBackupAES-256-GCMGoogle DriveBlazor Server.NET 10Windows ServiceQuartz.NET

System Diagram

Host servicePipeline stageLocal stateSecurityExternaldrag / scroll to zoom

Overview

SqlVault is a Windows client-side backup agent that backs up SQL Server databases into a single vendor-owned Google Drive account, organized per customer. Customers never touch Google credentials; storage belongs to the vendor. A single Windows Service hosts a Quartz scheduler, backup orchestrator, localhost API, and Blazor Server dashboard. The validation pipeline gates every run: preflight checks (ACL, disk, DB allowlist, SQL connection), BACKUP DATABASE, RESTORE VERIFYONLY, a deep restore to a scratch database with a health probe, AES-256-GCM encryption, ZIP v3 packaging, Google Drive resumable upload, and cleanup. DPAPI secures SQL and Google credentials; RSA-signed time-limited support tokens unlock on-site technician setup bound to an Installation ID. GFS retention, scheduled revalidation, missed-backup recovery, and dual-audience email notifications round out the operational model. The product targets SQL Server Express users who lack SQL Server Agent, and ships as an MSI installer with a Setup.exe bootstrapper, gated by E2E tests against a real SQL Server 2022 instance.

Problem

Small businesses running SQL Server Express have no SQL Server Agent for scheduled backups, and managed backup services add a cloud intermediary that owns customer data. Vendors need a way to run scheduled, verified, encrypted backups into their own storage without exposing customer credentials.

Approach

Single Windows Service hosts a Quartz scheduler, backup orchestrator, localhost API, and Blazor Server dashboard. The validation pipeline gates every run: preflight (ACL, disk, DB allowlist, SQL connection) -> BACKUP DATABASE -> RESTORE VERIFYONLY -> deep restore to a temp DB -> AES-256-GCM encryption -> ZIP v3 packaging -> Google Drive resumable upload -> cleanup. DPAPI secures credentials; RSA-signed time-limited support tokens unlock on-site setup. GFS retention, scheduled revalidation, and point-in-time restore chains round out the operational model.

Impact

  • * Ships as an MSI installer with a Setup.exe bootstrapper; release-gate E2E tests run against a real SQL Server 2022 instance before tagging.
  • * Validation pipeline proves restorability end-to-end: VERIFYONLY plus a deep restore to a scratch database with a health probe before upload.
  • * Vendor-owned storage model keeps customer data in one Google Drive account, organized by auto-created customer folders, with no customer Google credentials involved.
  • * Background intelligence handles GFS retention, 7/30-day revalidation, missed-backup recovery, and dual-audience email notifications (admin detail vs. customer summary).

Architecture

SqlVault is a single-process Windows Service that fuses a backup engine, scheduler, localhost API, and Blazor Server UI. The pipeline is a sequence of gates, each of which can fail the run, with background services handling retention, revalidation, and missed-run recovery.

Layer
Implementation
Purpose
Host
SqlVault.Host (Windows Service + Blazor Server + localhost API)
Single deployable unit binds 127.0.0.1:27842. Quartz scheduler runs jobs; /api/* routes require X-LocalToken; Blazor Server renders customer and technician views.
Orchestration
BackupOrchestrator + validation pipeline
Preflight, BACKUP DATABASE, RESTORE VERIFYONLY, deep restore to SqlVaultRestoreTest_*, AES-256-GCM encryption, ZIP v3 packaging, Google Drive resumable upload, cleanup. Differential and log backups chain via ParentBackupRunId with NORECOVERY/RECOVERY semantics.
Security
DPAPI + RSA support tokens + key escrow
DPAPI stores SQL credentials and Google OAuth tokens. RSA-signed 15-minute support tokens bind setup to an Installation ID. Key escrow bundles the AES key into Drive for hardened-mode recovery.
Storage
Google Drive provider (IStorageProvider)
Vendor-owned Drive account with per-customer folders (SqlVault/{Customer}/{Database}/{YYYY-MM}/backup.zip). Resumable uploads with retry, folder caching, and remote digest verification.
Persistence
SQLite via EF Core
Local catalog of server connections, jobs, runs, chunks, licenses, and notification history. Secrets stored as references only; values live in DPAPI.

Guardrails

  • * License expiry hard-suspends backup workers; the dashboard stays visible with remaining days.
  • * Temp .bak path is ACL-locked to the service account and Administrators; world-readable temp fails the preflight gate.
  • * Background intelligence runs GFS retention, 7-day VERIFYONLY revalidation, and 30-day deep-restore revalidation on uploaded backups.