Database Backups
sickn33/agentic-awesome-skills
Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.
PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…
$ npx skills add EliasOulkadi/shokunin --skill db-admin -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install EliasOulkadi/shokunin db-admin --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/EliasOulkadi/shokunin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pack/skills/db-admin .claude/skills/db-admin && 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 "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .claude/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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/EliasOulkadi/shokunin/tree/master/.pack/skills/db-adminType 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 EliasOulkadi/shokunin --skill db-admin -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install EliasOulkadi/shokunin db-admin --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.pack/skills/db-admin .agents/skills/db-admin && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .agents/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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 EliasOulkadi/shokunin --skill db-admin -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install EliasOulkadi/shokunin db-admin --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.pack/skills/db-admin .cursor/skills/db-admin && 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 "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .cursor/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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/EliasOulkadi/shokunin.git --path .pack/skills/db-admin--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 EliasOulkadi/shokunin --skill db-admin -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install EliasOulkadi/shokunin db-admin --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.pack/skills/db-admin .gemini/skills/db-admin && 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 "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .gemini/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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 EliasOulkadi/shokunin db-adminInstalls 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 EliasOulkadi/shokunin --skill db-admin -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .github/skills && cp -r skills-src/.pack/skills/db-admin .github/skills/db-admin && 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 "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .github/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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 EliasOulkadi/shokunin --skill db-admin -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install EliasOulkadi/shokunin db-admin --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.pack/skills/db-admin .opencode/skills/db-admin && 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 "db-admin" agent skill from https://github.com/EliasOulkadi/shokunin/tree/master/.pack/skills/db-admin into .opencode/skills/db-admin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-admin", 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.
db-adminPostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…
DB Admin is an agent skill from EliasOulkadi/shokunin. PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication (streaming, logical), vacuum/autovacuum tuning, and scheduled backups with retention. Use when user asks to backup a database, restore from backup, monitor database health, set up replication, or perform DBA tasks. Do NOT use for schema design (use db-sculptor), query optimization (use db-sculptor), or migration…
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `references/postgres-admin.md`). Compatibility notes: opencode
It sits in Databases, covering Database administration and Backup and disaster recovery. It works with PostgreSQL. The repository describes itself as: 職人 Shokunin 62 AI agent skills for OpenCode, Claude Code, Cursor, Windsurf. ChromaDB memory, MCP servers, declarative self-updates. Multi-model, open source, zero cost. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4c68e5b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadBashWriteFrom allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (PowerShell), which the agent can run.
Shell commands in SKILL.md call:
psqlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From 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.
opencode
From compatibility in the SKILL.md frontmatter.
DB Admin loads about 2k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 137 tokens; SKILL.md has 439 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 noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Bash, WriteAutomated 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); the scripts in this folder are not scanned.
The full file from EliasOulkadi/shokunin at commit 4c68e5b, republished under its MIT licence (© EliasOulkadi). 439 words, ~2,008 tokens.
.claude/skills/db-admin/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.PostgreSQL production operations: backup, restore, monitoring, replication, and maintenance.
scripts/monitor-db.ps1 -Database myappChecks 7 metrics:
| Metric | Warning | Fail |
|---|---|---|
| Connection count | > 80% of max | > 95% of max |
| Active queries | > 10 | > 20 |
| Long-running (>5m) | Any | > 3 |
| Cache hit ratio | < 99% | < 95% |
| Dead tuple ratio | > 20% | > 40% |
| Index usage (unused) | > 5 | > 10 |
If any metric is FAIL: investigate immediately. See references/postgres-admin.md for diagnosis and fix procedures.
# Full backup
scripts/backup-db.ps1 -Database myapp
# Custom output directory
scripts/backup-db.ps1 -Database myapp -OutputDir D:\backups
# Exclude large log tables
scripts/backup-db.ps1 -Database myapp -ExcludeTables @("audit_logs", "analytics_events")The script creates: myapp_2026-05-13_143022.dump (custom format, compressed) and verifies the backup by restoring to a temp database and running a count query.
See assets/backup-schedule-template.ps1 for the schedule template.
# Schedule daily backup at 2 AM
schtasks /Create /SC DAILY /TN "DBBackup-myapp" /TR "powershell.exe -File C:\scripts\backup-schedule.ps1" /ST 02:00Retention policy:
# pgbouncer.ini for PostgreSQL pooling
[databases]
myapp = host=localhost port=5432 dbname=myapp
[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = scram-sha-256
pool_mode = transaction
default_pool_size = 25
max_client_conn = 100
max_db_connections = 50See references/postgres-admin.md for streaming and logical replication setup.
Decision:
| Need | Replication type |
|---|---|
| Read scaling + HA | Streaming replication |
| Selective table sync | Logical replication |
| Upgrade with minimal downtime | Logical replication |
| Cross-version replication | Logical replication |
| Scenario | Cause | Fix |
|---|---|---|
| Backup fails with "out of memory" | Work_mem too high for dump | Reduce work_mem, increase maintenance_work_mem |
| PgBouncer rejects connections | pool_size exhausted | Increase default_pool_size, add more connections |
| Replication lag growing | WAL generation > apply rate | Add replicas, increase max_wal_size, tune apply workers |
| Long-running query blocking vacuum | snapshot held too long | Kill with pg_terminate_backend, tune idle_in_transaction_session_timeout |
| WAL directory filling disk | archive_command failing or wal_keep_size too high | Fix archiving, reduce wal_keep_size, increase max_wal_size |
| Anti-pattern | Fix |
|---|---|
| No automated backups | Schedule pg_dump with retention |
| No backup verification | Always restore-test backups |
| Default autovacuum settings | Tune for your workload |
| Direct connections in production | Always use PgBouncer |
| No replication monitoring | Check lag, WAL generation rate |
| Running out of disk for WAL | Monitor WAL directory, tune archiving |
wal_level = replica
max_wal_senders = 5
wal_keep_size = 1024 # MB of WAL to retain
hot_standby = on # Allow read-only queries on replicahost replication replicator 192.168.0.0/24 md5# 1. Create base backup
pg_basebackup -h primary_host -D /var/lib/postgresql/data -U replicator -P -R
# 2. Start replica
pg_ctl start -D /var/lib/postgresql/data
# 3. Verify replication
psql -c "SELECT client_addr, state, sync_state FROM pg_stat_replication;"# On primary: configure WAL archiving
archive_mode = on
archive_command = 'cp %p /archive/%f'
# Take base backup
pg_basebackup -h localhost -D /backup/base -Ft -z -P
# Restore to point in time
# 1. Stop PostgreSQL
# 2. Restore base backup to data directory
# 3. Create recovery.signal file
# 4. Set recovery_target_time in postgresql.conf:
# recovery_target_time = '2026-05-18 14:30:00'
# 5. Start PostgreSQL-- Check table bloat
SELECT schemaname, relname, n_live_tup, n_dead_tup,
round(n_dead_tup * 100.0 / NULLIF(n_live_tup + n_dead_tup, 0), 2) AS dead_ratio
FROM pg_stat_user_tables
ORDER BY n_dead_tup DESC LIMIT 10;
-- Aggressive autovacuum for high-write tables
ALTER TABLE events SET (autovacuum_vacuum_scale_factor = 0.01, autovacuum_vacuum_cost_limit = 2000);
-- Manual VACUUM (non-blocking)
VACUUM (VERBOSE, ANALYZE) events;
-- VACUUM FULL (blocking, recovers disk space)
VACUUM FULL events; -- Requires table lock. Only use during maintenance windows.-- Active connections
SELECT state, count(*) FROM pg_stat_activity GROUP BY state;
-- Long-running queries (>5 min)
SELECT pid, now() - query_start AS duration, query
FROM pg_stat_activity WHERE state != 'idle' AND now() - query_start > INTERVAL '5 minutes';
-- Cache hit ratio (should be >95%)
SELECT sum(blks_hit) * 100.0 / NULLIF(sum(blks_hit) + sum(blks_read), 0) AS cache_hit_ratio
FROM pg_stat_database WHERE datname = current_database();
-- Dead tuples accumulating
SELECT relname, n_dead_tup, last_autovacuum
FROM pg_stat_user_tables WHERE n_dead_tup > 10000 ORDER BY n_dead_tup DESC;© EliasOulkadi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references, assets) in .pack/skills/db-admin of EliasOulkadi/shokunin.
Open the folder on GitHubat commit 4c68e5b
DB Admin 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 |
|---|---|---|---|---|---|---|
| DB Admin this skillEliasOulkadi/shokunin | 114 | — | ~2k | Automated safety check: Notes | MIT | |
| Database Backupssickn33/agentic-awesome-skills | 47k | 2 repos | ~3.1k | Automated safety check: Notes | MIT | |
| Alloydb Basicsgoogle/skills | 21k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Alloydb Basicsdavila7/claude-code-templates | 33k | — | ~611 | Automated safety check: Pass | MIT | |
| Postgresql Devsecsickn33/agentic-awesome-skills | 47k | 2 repos | ~2.5k | Automated safety check: Notes | MIT | |
| Automating Database Backupsjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.5k | Automated safety check: Pass | MIT |
sickn33/agentic-awesome-skills
Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.
google/skills
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations.
davila7/claude-code-templates
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB MCP tools for automated database operations including AI-powered search and vector capabilities.
sickn33/agentic-awesome-skills
Administer PostgreSQL databases. An agent skill from sickn33/agentic-awesome-skills.
jeremylongshore/tons-of-skills-marketplace
Automate database backup processes with scheduling, compression, and encryption.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database operations. An agent skill from jeremylongshore/tons-of-skills-marketplace.
EliasOulkadi/shokunin
Design CI/CD pipelines for GitHub Actions, GitLab CI, and CircleCI with matrix builds, test sharding, caching, Docker layer caching, OIDC auth, deployment strategies (rolling, blue-green, canary)…
EliasOulkadi/shokunin
Build production-grade components for React, Vue 3, and Svelte 5 with all states (loading, empty, error, success, idle), TypeScript strict, WCAG 2.2 accessibility, server components (RSC), and…
EliasOulkadi/shokunin
Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…
EliasOulkadi/shokunin
Optimize Docker images with multi-stage builds, distroless bases, BuildKit cache mounts, multi-arch builds, compose watch, security hardening (non-root, seccomp, capabilities drop), and…
EliasOulkadi/shokunin
Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead…
EliasOulkadi/shokunin
Deploy, manage, and debug Kubernetes in production — Deployments, Services, Gateway API, Service Mesh (Istio/Linkerd/Cilium), eBPF observability (Cilium Hubble), security hardening (Pod Security…
Works with
Categories
PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…. DB Admin is an agent skill from EliasOulkadi/shokunin. PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication (streaming, logical), vacuum/autovacuum tuning, and scheduled backups with retention.
DB Admin fits situations like: user asks to backup a database; restore from backup; monitor database health; set up replication.
Run `npx skills add EliasOulkadi/shokunin --skill db-admin -a claude-code`. Or copy the skill folder (.pack/skills/db-admin in EliasOulkadi/shokunin) into .claude/skills/db-admin in your project. Claude Code loads it when a task matches its description.
Run `npx skills add EliasOulkadi/shokunin --skill db-admin -a codex`. Or copy the skill folder (.pack/skills/db-admin in EliasOulkadi/shokunin) into .agents/skills/db-admin 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 EliasOulkadi/shokunin --skill db-admin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-admin, .gemini/skills/db-admin, .github/skills/db-admin and .opencode/skills/db-admin in your project.
Going by SKILL.md and its folder, DB Admin needs PowerShell for the scripts in its folder and the command-line tools its instructions call (psql). Our summary lists: PowerShell. Its frontmatter pre-approves these tools: Read, Bash, Write. Compatibility (from SKILL.md): opencode.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
DB Admin is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with DB Admin: Database Backups (sickn33/agentic-awesome-skills, 47k stars), Alloydb Basics (google/skills, 21k stars), Alloydb Basics (davila7/claude-code-templates, 33k stars) and Postgresql Devsec (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
EliasOulkadi (a GitHub user) maintains it in EliasOulkadi/shokunin, which has 114 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 5, 2026.
Source: EliasOulkadi/shokunin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.