Backup fixtures
Use a clean development host with Restic, PostgreSQL client/server tools, MySQL client tools, OpenSSL, OpenSSH, Docker, AWS CLI, Node.js and Python 3.9+. The SSH fixture uses a temporary loopback sshd and generated keys. Some Linux hosts require the distro's SSH privilege separation directory to exist before a non-root fixture can start.
rtk proxy npm --prefix web run build
rtk cargo build --workspace
rtk cargo test --workspace
rtk cargo test -p tessera-store -- --ignored
rtk proxy python3 tests/fixtures/restic-orbits.py
rtk proxy python3 tests/fixtures/capture-postgres.py
rtk proxy python3 tests/fixtures/capture-mysql.py
rtk proxy python3 tests/fixtures/restore-postgres.py
rtk proxy python3 tests/fixtures/offsite.py
rtk proxy python3 tests/fixtures/browser.py
rtk proxy python3 tests/fixtures/legacy-import.py
rtk proxy python3 tests/fixtures/matrix.py
-
Restic orbits requires
rest-serverandhtpasswdon PATH. It checks the four source/access combinations with a TLS Rest Server, re-runs after small changes, and verifies filesystem and PostgreSQL restores. Add--mysqlto include MySQL capture and restore through both access modes. -
PostgreSQL covers direct TLS, verified PostgreSQL TLS through a pinned bastion, a mismatched hostname, a wrong host key, partial upload, a competing outpost, retry after a dropped reply, and a real restore to a second database.
-
MySQL starts
mysql:9.2by default. Use the matchingmysqldumpon PATH. SetTESSERA_FIXTURE_MYSQL_IMAGEto test a different server with a compatible client. The fixture covers direct and SSH capture, host-key failure, an engine error, and restore of data with a view, routine, and event. -
S3 starts
motoserver/moto:5.1.12on loopback. It checks failed copy, retry, and export with the primary Restic repository offline. -
The browser test uses Playwright from Node's resolution path or
TESSERA_PLAYWRIGHT_MODULEand its bundled Chromium orTESSERA_FIXTURE_CHROME. The fixture submits backup and restore jobs as an operator, exercises a capture-only profile, and verifies recovery status, the safety ID, and filesystem export. A fixture outpost handles the scoped job protocol. -
PostgreSQL restore verifies target identity, scoped payload access, checksum rejection, safety pinning, schema and recreate modes, a PostgreSQL 17 dump restored to PostgreSQL 14, restricted psql commands, and restart after reset. The fixture uses the PostgreSQL 14 host tools and the postgres:17 container for the newer source.
-
The legacy import fixture reads compressed SQL archives from S3, restores synthetic samples, and verifies history access and idempotency after local GC.
-
The matrix pairs three outposts, runs ten application profiles against isolated databases, exercises a scheduler tick for 02.00 WIB, and checks manual capture, scheduled capture, registered restore targets, and S3 copies. Its JSON output records durations, freshness, size and restore results.
Fixture mapping
| Case | Fixture | Placement to validate |
|---|---|---|
| Direct PostgreSQL | TLS to a loopback server, mismatched hostname case | Run the agent where it can reach the database with the same TLS policy. |
| PostgreSQL behind a bastion | TLS through a loopback SSH bastion, wrong host key case | Run near the database if there is direct access. Otherwise use a pinned SSH forward to the database and validate the PostgreSQL server hostname. |
| MySQL behind SSH | Pinned SSH login, wrong host key and engine-error cases | Use the matched MySQL client on the SSH host and a private client options file. |
| Capture-only application | Profile without a restore target | Backups work; a restore request is refused until a target is registered. |
Verify deployed client and server versions, routes and privileges on the real hosts before relying on a placement.