Mg Local DB Restore
modelguide/modelguide
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
PostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines)…
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install fmflurry/settings-opencode postgres-backup-restore --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postgres-backup-restore .claude/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .claude/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restoreType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install fmflurry/settings-opencode postgres-backup-restore --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/postgres-backup-restore .agents/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .agents/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install fmflurry/settings-opencode postgres-backup-restore --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/postgres-backup-restore .cursor/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .cursor/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/fmflurry/settings-opencode.git --path skills/postgres-backup-restore--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install fmflurry/settings-opencode postgres-backup-restore --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/postgres-backup-restore .gemini/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .gemini/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install fmflurry/settings-opencode postgres-backup-restoreInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/postgres-backup-restore .github/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .github/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install fmflurry/settings-opencode postgres-backup-restore --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fmflurry/settings-opencode.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/postgres-backup-restore .opencode/skills/postgres-backup-restore && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "postgres-backup-restore" agent skill from https://github.com/fmflurry/settings-opencode/tree/master/skills/postgres-backup-restore into .opencode/skills/postgres-backup-restore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgres-backup-restore", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
postgres-backup-restorePostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines)…
Postgres Backup Restore is an agent skill from fmflurry/settings-opencode. PostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines), restore drills, and the PG16 no-incremental-backup constraint. Use when asked about backup, restore, PITR, pgdump, pgbasebackup, WAL archiving, or disaster recovery. Target: postgres:16-alpine (container gc-platform-postgres). Read alongside the postgres-dba agent.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Backup and disaster recovery and Containers. It works with PostgreSQL and Docker. The repository describes itself as: Custom OpenCode settings. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0e6c33c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dockerpg_dumpFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
postgresql.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Postgres Backup Restore loads about 2.3k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 645 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from fmflurry/settings-opencode at commit 0e6c33c, republished under its MIT licence (© fmflurry). 645 words, ~2,288 tokens.
.claude/skills/postgres-backup-restore/SKILL.md (or your agent's skills folder).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>"| 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.
⚠️ 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).sqlInterpretation for audits: a dump in ./backups/ older than the agreed RPO (or no dumps at all) = HIGH. Custom-format dumps are verified with pg_restore -l <file> (lists TOC, does not restore).
⚠️ HUMAN CONFIRMATION REQUIRED
# Verify a dump is structurally readable WITHOUT restoring it:
pg_restore -l ./backups/gcplatform_YYYY-MM-DD.dump | headSource: https://www.postgresql.org/docs/16/continuous-archiving.html
SHOW wal_level; -- PG16 default 'replica' ✓ (sufficient for archiving)
SHOW archive_mode; -- 'off' in the stock compose → PITR currently impossible
SHOW archive_command; -- '(disabled)' when archive_mode=off
SHOW archive_timeout; -- 0 = WAL segments only archived when full (16MB)
SELECT archived_count, failed_count, last_archived_wal, last_archived_time,
last_failed_wal, last_failed_time
FROM pg_stat_archiver;Interpretation: failed_count > 0 with recent last_failed_time = CRITICAL (archives retry forever, pg_wal grows until PANIC shutdown). archive_mode = off + no dump cron = no recovery story = HIGH.
coder for compose edit + human restart)⚠️ HUMAN CONFIRMATION REQUIRED
# docker-compose.yml, postgres service — archive to a path on a dedicated volume:
command: ["postgres", "-c", "archive_mode=on", "-c", "archive_timeout=60",
"-c", "archive_command=test ! -f /var/lib/postgresql/archive/%f && cp %p /var/lib/postgresql/archive/%f"]
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres-archive:/var/lib/postgresql/archiveHard rules for archive_command (from the PG docs, non-negotiable):
test ! -f … && guard; overwriting corrupts the timeline.archive_timeout = 60 forces a segment switch at least per minute so low-write periods still bound data loss (each forced switch closes a 16MB segment — trade disk for RPO).wal_level stays at the PG16 default replica — no change needed.
⚠️ HUMAN CONFIRMATION REQUIRED
# Physical base backup of the running cluster (needs the superuser role):
docker exec gc-platform-postgres pg_basebackup -U gcplatform -D /tmp/base_$(date +%F) -Ft -z -Xs -P
docker cp gc-platform-postgres:/tmp/base_$(date +%F) ./backups/-Xs streams WAL during the backup so the base is self-consistent.
⚠️ HUMAN CONFIRMATION REQUIRED
# 1. Stop the container; preserve the current data dir (rename, never delete):
docker compose stop postgres
docker volume inspect postgres-data # note the Mountpoint
# 2. Replace the data directory contents with the base backup (as the postgres user).
# 3. Configure recovery in the data dir (postgresql.auto.conf or recovery settings):
restore_command = 'cp /var/lib/postgresql/archive/%f %p'
recovery_target_time = '2026-07-28 14:30:00 UTC' -- the instant BEFORE the incident
recovery_target_action = 'pause' -- inspect before promoting
# 4. Create the signal file that switches the server into recovery:
touch <datadir>/recovery.signal
# 5. Start; watch logs; when paused at the target and satisfied, promote:
docker compose start postgres
docker exec gc-platform-postgres psql -U gcplatform -d gcplatform -c "SELECT pg_wal_replay_resume();" -- if pausedTimelines: every recovery creates a new timeline (00000002.history etc.). Keep the history files and old WAL — they let you recover to a point on the PRE-recovery timeline if the recovery target was wrong. recovery_target_timeline = 'latest' is the default.
⚠️ HUMAN CONFIRMATION REQUIRED
# Restore into a FRESH database (never over the live one without a plan):
docker exec gc-platform-postgres psql -U gcplatform -d postgres -c "CREATE DATABASE gcplatform_restore OWNER gcplatform;"
docker cp ./backups/gcplatform_YYYY-MM-DD.dump gc-platform-postgres:/tmp/restore.dump
docker exec gc-platform-postgres pg_restore -U gcplatform -d gcplatform_restore -j 4 --no-owner /tmp/restore.dump
# -j 4 = parallel restore (custom format only); --no-owner because the restoring role differsRepo-specific: roles (gc_kourou_app_login, identity_*) are re-provisioned by EF migrations/IdentitySchemaMigrator on backend boot, so a logical restore of the database plus a backend restart re-creates runtime grants. If restoring globals too, apply globals_*.sql first.
Run quarterly; every step human-executed:
pg_restore -l lists its TOC without errorsgcplatform_restore) succeeds end-to-endpg_stat_archiver.failed_count has stayed 0 since the last drill; archive destination has free spaceSeverity for audits: no drill ever recorded = HIGH; drill older than 6 months = MEDIUM.
docker volume inspect postgres-data
docker inspect --format '{{range .Mounts}}{{.Type}} {{.Name}} -> {{.Destination}}{{println}}{{end}}' gc-platform-postgresInterpretation: data must sit on the named volume postgres-data at /var/lib/postgresql/data. Anonymous volume or bind-mount into the repo tree = CRITICAL (anonymous volumes vanish with docker compose down; repo-tree mounts corrupt on macOS Docker file-sharing). docker volume rm postgres-data is in the postgres-dba never-execute list — deletion is a human decision with a fresh backup in hand.
© fmflurry, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/postgres-backup-restore of fmflurry/settings-opencode.
Open the folder on GitHubat commit 0e6c33c
Postgres Backup Restore next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Postgres Backup Restore this skillfmflurry/settings-opencode | 171 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Mg Local DB Restoremodelguide/modelguide | 108 | — | ~645 | Automated safety check: Pass | MIT | |
| Supabasemagnus919/agent-skills | 113 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Cb Build TestBlkLeg/CircuitBreaker | 201 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Monstermq Broker Configvogler75/monster-mq | 143 | — | ~2.2k | Automated safety check: Pass | GPL-3.0 | |
| Unraiddinglebear-ai/unraid | 135 | — | ~2.8k | Automated safety check: Pass | MIT |
modelguide/modelguide
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
magnus919/agent-skills
A skill your agent uses when developing applications with Supabase, running the Supabase CLI, designing migrations and RLS policies, testing database behavior, generating client types, deploying the…
BlkLeg/CircuitBreaker
How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…
vogler75/monster-mq
Guide for configuring, deploying, and operating the MonsterMQ broker.
dinglebear-ai/unraid
Query and monitor an Unraid NAS/homelab server — array health, disk temperatures, Docker containers, virtual machines, system metrics, notifications, alerts, shares, UPS status, log files, network…
pavel-molyanov/molyanov-ai-dev
Provides project infrastructure conventions and review criteria for local setup, Docker, Git hooks, CI/CD, service delivery, release artifacts, monitoring, backups, and operations.
fmflurry/settings-opencode
Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result).
fmflurry/settings-opencode
Scaffold and extend Playwright E2E tests for the gc.platform suite (tests/playwright), wiring every artifact to the real frontend (localhost:4200) + real .NET backend — never mocks.
fmflurry/settings-opencode
A skill your agent uses for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
fmflurry/settings-opencode
Audit and fix common accessibility issues in Angular templates and Angular Material components.
fmflurry/settings-opencode
Scaffolds and extends Angular standalone feature MODULES under src/app/modules/{name} using Clean Architecture layering (presentation/application/core/infrastructure), a self-registering module…
fmflurry/settings-opencode
Pre-merge code review for Angular + TypeScript pull requests.
Works with
Categories
PostgreSQL backup & restore playbook for the docker instance: pgdump/pgdumpall recipes, WAL archiving + PITR setup (archivemode, archivecommand, recovery.signal, recoverytargettime, timelines)…. Postgres Backup Restore is an agent skill from fmflurry/settings-opencode.signal, recoverytargettime, timelines), restore drills, and the PG16 no-incremental-backup constraint.
Postgres Backup Restore fits situations like: asked about backup; disaster recovery.
Run `npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a claude-code`. Or copy the skill folder (skills/postgres-backup-restore in fmflurry/settings-opencode) into .claude/skills/postgres-backup-restore in your project. Claude Code loads it when a task matches its description.
Run `npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a codex`. Or copy the skill folder (skills/postgres-backup-restore in fmflurry/settings-opencode) into .agents/skills/postgres-backup-restore in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fmflurry/settings-opencode --skill postgres-backup-restore -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgres-backup-restore, .gemini/skills/postgres-backup-restore, .github/skills/postgres-backup-restore and .opencode/skills/postgres-backup-restore in your project.
Going by SKILL.md and its folder, Postgres Backup Restore needs the command-line tools its instructions call (docker and pg_dump). Our summary lists: Docker.
SKILL.md names 1 domain. As links in the text: postgresql.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Postgres Backup Restore is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Postgres Backup Restore: Mg Local DB Restore (modelguide/modelguide, 108 stars), Supabase (magnus919/agent-skills, 113 stars), Cb Build Test (BlkLeg/CircuitBreaker, 201 stars) and Monstermq Broker Config (vogler75/monster-mq, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
fmflurry (a GitHub user) maintains it in fmflurry/settings-opencode, which has 171 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 7, 2026.
Source: fmflurry/settings-opencode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.