jimdawdy-hub

Postgres Backup Restore Skill — Data skill for Claude Code

Data community

Claude Code skill for PostgreSQL backup, verification, restore, and cutover — database-agnostic.

How to install Postgres Backup Restore Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jimdawdy-hub/postgres-backup-restore-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Postgres Backup Restore Skill does

Claude Code skill for PostgreSQL backup, verification, restore, and cutover — database-agnostic.

Alternatives in Data

  • Notion Sync — /notion-sync - Push Ranked Jobs and Applications to a Notion Database 36.6k ★
  • OpenViking — Self-evolving Context Database for AI Agents 33.3k ★
  • n8n Workflow Patterns — Workflow patterns for webhook, HTTP, database, and AI tasks 3.6k ★

README

postgres-backup-restore - "How to take a really good dump"

A skill for Claude Code and OpenAI Codex that covers PostgreSQL backup, verification, restore, and cutover work — producing a dump you can actually trust, restoring it safely, and swapping a restored database into production. Database-agnostic: nothing in here assumes any particular schema, product, or hosting setup.

Why this exists

Backup and restore work has an unusual risk profile: the commands are short, they look like they worked, and the failure modes are silent. A dump can name the wrong database. A checksum file can exist without ever having been checked. An exit code can belong to a different command than the one you care about. None of these announce themselves — you discover them when you need the backup and it isn't there.

This skill's organizing idea is **prove each claim separately, from outside the thing making the claim.** A tool reporting its own success is not evidence. It walks the coding agent through the checks that actually matter, in the order they matter, and gives it two small scripts so it isn't reinventing fiddly verification logic each time.

What's covered

  • Backup — choosing a dump format, targeting the right database explicitly (the sudo strips your environment trap), the full verification chain, and retention.
  • Restore & cutovertemplate0 vs template1 on a collation-mismatched cluster, rebuilding planner statistics after restore (PG18's pg_dump ships none by default), post-restore verification, the rename-based swap, and the write-freeze arithmetic (writes after the dump starts are lost, not delayed).
  • Long-running jobs — detaching a job so it outlives its launcher, a watchdog that distinguishes "still running" from "died silently" from "finished", and reading real progress from pg_stat_progress_copy / pg_stat_progress_create_index instead of guessing from elapsed time.
  • Server-level config changes — the differenc