PostgreSQL backup and recovery - pg_dump, pg_basebackup, PITR
Executes PostgreSQL backups and restores using pg_dump, pg_basebackup, and pg_restore. Triggers when you need to backup, restore, or recover PostgreSQL databases to/from files.
/plugin marketplace add pluginagentmarketplace/custom-plugin-postgresql/plugin install ultrathink@pluginagentmarketplace-postgresqlThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/backup-script.shassets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyAtomic skill for backup and recovery
Production-ready patterns for logical backups, physical backups, and point-in-time recovery.
parameters:
backup_type:
type: string
required: true
enum: [logical, physical, pitr]
format:
type: string
enum: [custom, directory, plain]
default: custom
# Custom format (recommended)
pg_dump -Fc -f backup.dump dbname
# Parallel backup
pg_dump -Fd -j 4 -f backup_dir dbname
# Compressed
pg_dump -Fc dbname | gzip > backup.dump.gz
pg_basebackup -D /backup -Fp -Xs -P -R
pg_restore -d newdb -j 4 backup.dump
pg_restore --list backup.dump # Preview
archive_mode = on
archive_command = 'cp %p /archive/%f'
| Type | Use Case | Recovery Speed |
|---|---|---|
| pg_dump | Logical, portable | Slow |
| pg_basebackup | Full cluster | Fast |
| WAL + base | Point-in-time | Fast + precise |
| Problem | Cause | Solution |
|---|---|---|
| Backup failed | Disk full | Free space |
| Restore slow | Large DB | Use parallel |
| WAL missing | Archive failed | Check archive_command |
Skill("postgresql-backup")
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.