pbsgui's logic is unit-tested in CI, but its core value (SQL Server backup over VDI, the PBS protocol against a live server, point-in-time restore) only runs on Windows against real SQL Server and PBS. This page makes that integration layer a repeatable, objective pass instead of ad-hoc clicking.
- Unit tests -
cargo test --workspace, run in CI on every push. Cross-platform logic: restore-chain selection, data-blob/index wire formats, repository and namespace parsing, scheduling, theBACKUP/RESTOREstatement builders. - Windows cross-compile check - compiles the
cfg(windows)code from Linux:cargo clippy -p pbsgui-engine --target x86_64-pc-windows-gnu --all-targets -- -D warnings cargo check -p pbsgui --target x86_64-pc-windows-gnu - Manual integration pass (this page) - on Windows + SQL Server + PBS. Run it before tagging a release, and record the result (the GUI shows the build version + commit in the top bar).
- Future: self-hosted Windows CI - a runner with SQL Server Developer (free)
and a PBS test instance, running
#[ignore]integration tests automatically.
- The engine service installed and running; a SQL Server with TCP/IP enabled and
NT AUTHORITY\SYSTEM(or your connection's login) in thesysadminrole; a PBS server with an API token and a datastore (see DEVELOPERS.md). - In the GUI: a saved SQL connection and a saved PBS server.
- A test database in FULL recovery for the point-in-time scenarios.
- The point-in-time verifier:
scripts/sql-pitr-probe.ps1.
Record build + date, and pass/fail per row.
- Files job to PBS: run, then Browse -> snapshot -> Restore all to a folder; files match.
- Restore selected files only.
- Change detection: re-run with nothing changed -> "no changes; skipped".
- Wizard guidance: a SIMPLE-recovery DB shows no warning; a FULL-recovery DB warns the log will grow.
- Run -> a full lands; Browse shows a full restore point with a size.
- Restore over the original name; data matches.
- Restore to a new name (
..._restored); files relocate, data matches.
- Wizard guidance: a SIMPLE-recovery DB is blocked with the
ALTER DATABASE ... SET RECOVERY FULLhint. - Run once manually -> the full anchors the chain; logs then appear on the log interval.
- The restore view shows full points (with sizes) and a point-in-time window with a log count + total.
- Point-in-time correctness (objective, see below): restore to a chosen moment and verify the data matches that moment.
- Edge: restore to "latest"; restore to just after the full (before the first log).
- Log truncation: the DB's log file stops growing once log backups run (
DBCC SQLPERF(LOGSPACE)).
- Encrypted job: generate a key (shown once), back up, then restore -> decrypts transparently.
- Restore with the key cleared from the credential store -> fails with a clear "encrypted but no key" message.
- Configure email and a webhook; the per-channel Test buttons succeed.
- Run a job -> a success notification arrives with the metrics; a forced failure -> a failure notification.
"It restored without error" is not enough - verify it restored to the right
moment. scripts/sql-pitr-probe.ps1 writes a timestamped marker row every few
seconds so you have a ground-truth timeline.
- Start the generator against the live DB while a point-in-time job runs:
It prints each marker's UTC time. Let a full and a few logs run. Note a UTC time
.\scripts\sql-pitr-probe.ps1 -Server <srv> -Database PbsTestDb -IntervalSeconds 15Tbetween two markers. - In the GUI, restore the database to
Tinto a new name (e.g.PbsTestDb_pit). - Verify against the restored copy:
A correct restore shows the last marker at or just before
.\scripts\sql-pitr-probe.ps1 -Server <srv> -Database PbsTestDb_pit -Verify -AtUtc "<T>"Tandafter_target = 0(no rows newer thanT). Any rows afterTmean the chain over- or under-applied logs.