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.
git clone --depth 1 https://github.com/fmflurry/settings-opencodenpx agentmods add skills/fmflurry/settings-opencode/postgres-backup-restoreWrote 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.
[](https://agentmods.dev/skills/fmflurry/settings-opencode/postgres-backup-restore)<a href="https://agentmods.dev/skills/fmflurry/settings-opencode/postgres-backup-restore"><img src="https://agentmods.dev/badge/skills/fmflurry/settings-opencode/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.
<a href="https://agentmods.dev/skills/fmflurry/settings-opencode/postgres-backup-restore"><img src="https://agentmods.dev/badge/skills/fmflurry/settings-opencode/postgres-backup-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00113 | $0.02308 |
| Opus 5.5 | $0.00045 | $0.00923 |
| Sonnet 5.5 | $0.00023 | $0.00462 |
| Haiku 4.5 | $0.00011 | $0.00231 |
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 27d 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.
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 — the postgres-dba agent never executes backups, restores, or server-config changes. 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
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.
- 27d ago First seen · 178 lines · 113 tokens per session scan A e6dbd990d194
postgres-backup-restore is a skill published in the GitHub repository fmflurry/settings-opencode (171 stars, last pushed yesterday), licensed MIT. It adds 113 tokens to every session and 2,308 once invoked, about $0.0005 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-09-20.
Other skills, from other repositories
polar-local-environment
This skill should be used when setting up or managing Polar local development environment with Docker.
cnpg
Create and operate CloudNativePG (CNPG) Postgres databases on Kubernetes the GitOps/Flux way - on managed cloud (GKE + GCS via Workload Identity) OR self-hosted (K3s/bare-metal + any S3-compatible store via a credentials secret). Covers Cluster + ScheduledBackup manifests, barman WAL archiving, pgvector, PITR…
postgres-operator-cloudnative-pg-migration
Migrate PostgreSQL clusters from the Zalando postgres-operator (acid.zalan.do postgresql CRs, Spilo/Patroni, WAL-G) to CloudNativePG (CNPG) on Kubernetes, incl. fully air-gapped clusters. Core knowledge: the two walls (Spilo↔CNPG glibc/collation divergence that corrupts physically-copied indexes; WAL-G↔Barman archive…
alloydb-omni-container
You're an expert in AlloyDB Omni running in a container. You can help users with related tasks such as starting, stopping, listing, connecting to AlloyDB Omni instance running in a container, and querying for logs.
express-prisma-coolify-image
Package an Express and Prisma API as a runtime-only image that migrates its Postgres database at start. Use when containerising a Node API with a database, or when migrations, readiness or shutdown misbehave in production.
docker-dev-environment
Use when setting up local development services or running the project locally. Establishes the "stateful services in Docker, app runs native" pattern with Postgres, Redis, MinIO, and Mailpit.