Backup and recovery
Back up Postgres, preserve encryption material, and verify restored workflow state.
Postgres is Tasuku's durable source of truth. A usable recovery set requires the database and its exact master key.
Back up
Include:
- all Tasuku Postgres databases and schemas;
- migration state;
- the exact active
TASUKU_MASTER_KEY,TASUKU_MASTER_KEY_VERSION, and every configuredTASUKU_PREVIOUS_MASTER_KEYSentry, stored separately from the database dump; - deployment environment needed to reconstruct
TASUKU_PUBLIC_URL, bootstrap policy, and worker access; - custom agent runtime image definitions and remote-provider configuration.
Git repositories remain in GitHub, but Tasuku's review history, workflow events, credentials, repository settings, feedback, and learnings do not.
Restore
- Stop the server and workers so no new leases or writes occur.
- Restore Postgres.
- Restore the matching active and previous master-key ring exactly.
- Run migrations for the deployed Tasuku version.
- Start the server and verify
/healthzand/readyz. - Start one worker and inspect queue recovery before adding more workers.
- Verify OAuth, GitHub App identity, repository synchronization, secret fingerprints, and one controlled workflow.
In-flight work
Queue leases are recoverable. After their lease expires, unfinished jobs can be reclaimed. Before manually replaying a command, inspect workflow events for external effects such as a GitHub comment, review, branch, or pull request that completed before the backup.
Key mismatch is not recoverable from ciphertext
If the restored database was encrypted under a different master key, Tasuku cannot reconstruct the plaintext credentials. Restore the correct key rather than replacing encrypted rows with guesses.