Scope: operators with Docker host authority. Treat the Docker volume, app master encryption key, audit key, customer certificates and backup artifacts as high-value secrets. Database-only backups are not complete disaster-recovery backups.
Pre-upgrade
- Book a maintenance window and have host-console access, rollback plan and an independent administrator.
- Record
bash ./wg.sh status preproductionand container/DB health. Take an inventory export that does not include secrets. - Run
bash ./wg.sh backup preproduction; locate/data/backups/<date>.wgbkinside the dedicated appliance volume. - Export an encrypted external copy with verified checksum. Back up
/data/secrets/appand/data/tlsusing the organization's approved secret-handling procedure. Never send them by email or attach them to support tickets. - Verify encrypted archive using
python -m wesergate.cli verify-backup --file /data/backups/...wgbkinside the container. This checks authentication and encryption, not functional DB restoration.
Restore drill
- Create a separate isolated lab instance. Never point a restore command to the production PostgreSQL database or reused production Docker volume.
- Work with a temporary decryption path on encrypted storage; use
python -m wesergate.cli restore-drill --file /data/backups/...wgbk --output /data/backups/isolated-restore.dumpin the appliance. Destination must not exist. - For PostgreSQL, copy the plaintext archive securely to the isolated recovery environment. Run
pg_restore --list isolated-restore.dumpthere. Create a fresh, separate PostgreSQL DB in the lab and usepg_restore --no-owner --no-acl --dbname=<isolated_lab_db> isolated-restore.dumpwith an appropriately restricted lab role. Do not use--cleanagainst the live DB. - Verify schema and table counts, device inventory, admin identities, license installation ID, audit chain, encrypted secrets with the corresponding app master key, and read-only UI login. Do not connect restored customer snapshots to physical switches or production identity systems.
- Record recovery point, recovery time, checksum, tested revision, operator, date, results, and all failures. Delete the temporary decrypted archive from encrypted storage after testing.
- Test restoring at least one pre-upgrade backup before approving a rollout. Without a verified restore, older binaries must not be pointed at newly migrated schemas.
Update
From a separately extracted, trusted v0.14 source tree:
python3 tools/verify_release.py .
bash tools/upgrade_from_previous.sh /absolute/path/to/wesergate-nac-v0.13.0 preproduction
bash ./wg.sh status preproduction
bash ./wg.sh smoke preproduction
bash ./wg.sh verify-audit preproduction
The upgrade script preserves the stable Compose project/volume, copies locally configured binding environment, produces/verifies an encrypted database backup, builds the new image, executes additive migrations and checks the audit chain. It cannot guarantee database migration rollback or a live switch acceptance. All grants signed by a retired vendor key require explicit public-key trust as described in docs/NEW_IN_v0.14.md.
Host rollback
Do not use bash ./wg.sh destroy as a recovery action. If an upgrade fails after database migration, isolate the host, preserve evidence, and restore the pre-upgrade database PLUS matching secrets onto the previous app version in a separate target. Only re-expose it after DNS/TLS, read-only switch discovery and login pass. Seek qualified incident response support if audit integrity is compromised.
en/docs/operations/backup-restore-and-updates.mdRead documentation Not a certified production NAC. Physical switch/RADIUS enforcement and 1,000-device traffic remain unverified.

