Few Servers

Keyword RESTORE · from our Short

The 1-minute Postgres restore drill

On 9 Oct 2026, on our 1 GB test server, restoring a restic snapshot took 7.1 seconds and loading Coolify's database dump into a fresh Postgres container took 6.9 seconds, with 0 errors and identical row counts in all 65 tables. The whole drill took under a minute.

The checklist

  1. Restore to a folder, not over the live data. restic restore latest --target /root/restore-test.
  2. Start an empty Postgres of the same major version, with a memory cap so it cannot hurt the box: docker run -d --name restore-pg --memory 256m -e POSTGRES_PASSWORD=test postgres:16-alpine. Wait until docker exec restore-pg psql -U postgres -c 'select 1' works (9 to 19 s on our busy server).
  3. Load the dump. gzip -dc /root/restore-test/<path>/db.sql.gz | docker exec -i restore-pg psql -U postgres -q -f -, then grep -c ERROR on the output: it should be 0.
  4. Compare row counts, table by table, live against restored. Matching counts in every table is the proof; "restored 3387 files" is not.
  5. Delete the test container and folder. docker rm -f restore-pg && rm -rf /root/restore-test.
  6. Do it again after every Postgres major upgrade and at least once a quarter.

The full test

The starter kit has the backup side: fewservers-backup restore <folder> puts a snapshot back, and restore-volume puts one Docker volume back in place. Pay what you want.