postgres-backup-restore

postgres-backup-restore is a skill for Claude Code from fmflurry/harness-manifesto. It costs 138 tokens per session (2,372 once invoked), scanned A, original, MIT.

A PostgreSQL backup and restore playbook for Docker, covering database dumps, full-cluster settings, WAL archiving, point-in-time recovery, and restore drills. Point-in-time recovery means restoring a database to a chosen moment using archived changes.

In plain words
What is it for?
Use it to choose a backup method, configure or review WAL archiving, practise restores, and plan recovery for the PostgreSQL 16 Docker instance.
Why use it?
It helps prepare for data loss and test whether backups can actually be restored. It also makes clear which operations can overwrite data and require a human to run them.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is docker cp gc-platform-postgres:/tmp/gcplatform_$(date +%F).dump ./backups/.

Good fit Use it to choose a backup method, configure or review WAL archiving, practise restores, and plan recovery for the PostgreSQL 16 Docker instance.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/fmflurry/harness-manifesto
agentmods
npx agentmods add skills/fmflurry/harness-manifesto/postgres-backup-restore

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for postgres-backup-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmflurry/harness-manifesto/postgres-backup-restore/github.svg)](https://agentmods.dev/skills/fmflurry/harness-manifesto/postgres-backup-restore)
Your own site
<a href="https://agentmods.dev/skills/fmflurry/harness-manifesto/postgres-backup-restore"><img src="https://agentmods.dev/badge/skills/fmflurry/harness-manifesto/postgres-backup-restore/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for postgres-backup-restore

Your own site · 80×15
<a href="https://agentmods.dev/skills/fmflurry/harness-manifesto/postgres-backup-restore"><img src="https://agentmods.dev/badge/skills/fmflurry/harness-manifesto/postgres-backup-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00138 $0.02372
Opus 5.5 $0.00055 $0.00949
Sonnet 5.5 $0.00028 $0.00474
Haiku 4.5 $0.00014 $0.00237

Measured 15d ago against content hash e42bc458124a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

postgres-backup-restore scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/postgres-backup-restore/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostgreSQL Backup & Restore

Target version: postgres:16-alpine — this repository's gc-platform-postgres container (db gcplatform, owner role gcplatform, data on named volume postgres-data).

Contract: auditing is read-only (SHOW, pg_stat_archiver, docker volume inspect). Every backup/restore/ config command below is emitted ONLY as a ⚠️ HUMAN CONFIRMATION REQUIRED block — if postgres-dba is installed, that agent never executes backups, restores, or server-config changes; otherwise database-reviewer or the main agent does not either. Restores are ALWAYS human-executed: a restore overwrites data and is irreversible in the wrong hands.

Connection:

docker exec gc-platform-postgres psql -U gcplatform -d gcplatform -c "<query>"

1. Backup strategy map (pick per need)

Method Captures PITR? Notes for this repo
pg_dump -Fc One database, logical (SQL-level) NO Restores into any PG version ≥ source; slow on huge DBs; does NOT capture roles/tablespaces
pg_dumpall --globals-only Cluster globals: roles, tablespaces NO Needed separately — gc_kourou_app_login, gc_kourou_identity_app, gc_kourou_identity_migrator are global objects (though this repo re-provisions them via migrations on boot)
pg_basebackup Physical whole-cluster copy Base for PITR Must stop/quiet writes for a consistent snapshot unless using WAL archiving; docker volume makes this awkward
WAL archiving + base backup Continuous, point-in-time YES Requires archive_mode=on + working archive_command (see §3)
PG16 native incremental backup — — NOT AVAILABLE: pg_basebackup --incremental is PostgreSQL 17+ only. On PG16, "incremental" = WAL archiving layered on periodic base backups.

pg_dump can never do PITR — it is a logical snapshot at dump time.


2. Logical backup recipes (docker instance)

⚠️ HUMAN CONFIRMATION REQUIRED

# Database dump, custom format (compressed, parallel-restoreable, selective):
docker exec gc-platform-postgres pg_dump -U gcplatform -d gcplatform -Fc -f /tmp/gcplatform_$(date +%F).dump
docker cp gc-platform-postgres:/tmp/gcplatform_$(date +%F).dump ./backups/

# Plain-SQL alternative (readable in git/diff, no parallel restore):
docker exec gc-platform-postgres pg_dump -U gcplatform -d gcplatform -f - > ./backups/gcplatform_$(date +%F).sql

# Cluster globals (roles!) — not included in pg_dump:
docker exec gc-platform-postgres pg_dumpall -U gcplatform --globals-only -f - > ./backups/globals_$(date +%F).sql

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 178 lines · 138 tokens per session scan A e42bc458124a

Subscribe to this mod's changes

postgres-backup-restore is a skill published in the GitHub repository fmflurry/harness-manifesto (173 stars, last pushed 11d ago), licensed MIT. It adds 138 tokens to every session and 2,372 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

postgres-backup-restore compared with skills from other repositories

postgres-backup-restore next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
postgres-backup-restorefmflurry/harness-manifestoSkill17311d agoMITA138Claude Code
polar-local-environmentfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A22Claude Code
postgres-health-checkfmflurry/settings-opencodeSkill17025d agoMITA143Claude Code
cnpgvanducng/skillsSkill7todayMITA155Claude Code
postgres-operator-cloudnative-pg-migrationair-gapped/skillsSkill85d agoMITA224Claude Code
alloydb-omni-containergemini-cli-extensions/alloydb-omniSkill420d agoApache-2.0A51Claude Code
express-prisma-coolify-imageKhaledSaeed18/dotclaudeSkill72d agoMITC53Claude Code