Test-restoring each Postgres dump into a scratch database
The Infisical, Gitea and Kaneo dumps restored with 752, 116 and 45 tables.
Each service on the management cluster has its own Postgres. I didn’t want to assume the dumps were good, so I restored each one.
The method was the same each time:
pg_dump -Fcfrom the service’s Postgres pod.- Create a scratch database with a throwaway name in the same Postgres.
pg_restore --no-owner --no-privilegesinto it.- Count the public tables and compare.
- Drop the scratch database.
Results today:
- Infisical: a 4.3 MiB dump, 752 public tables. That matches the table count from my older Infisical install.
- Gitea: 358 KiB, 116 tables, and my test repository was present.
- Kaneo: 121 KiB, 45 tables.
One small catch. I tried SELECT count(*) FROM knex_migrations; on the Infisical restore and got relation "knex_migrations" does not exist. Infisical renames that table to infisical_migrations.
A table count isn’t a full proof. It does catch an empty or truncated dump, and it’s cheap enough to run every time.
What else do you check after a test restore?
Recipes written later from this work: