Implement backup and restore strategies for disaster recovery. Use when creating backup plans, testing restore procedures, or setting up automated backups.
Implement comprehensive backup and disaster recovery strategies. Covers backup types, retention policies, restore testing, and recovery time objectives (RTO/RPO).
pg_dump - Text Format:
# Simple full backup
pg_dump -h localhost -U postgres -F p database_name > backup.sql
# With compression
pg_dump -h localhost -U postgres -F p database_name | gzip > backup.sql.gz
# Backup with verbose output
pg_dump -h localhost -U postgres -F p -v database_name > backup.sql 2>&1
# Exclude specific tables
pg_dump -h localhost -U postgres database_name \
--exclude-table=temp_* --exclude-table=logs > backup.sql
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Full Database Backup | Full Database Backup | | Incremental & Differential Backups | Incremental & Differential Backups | | Full Database Backup | Full Database Backup | | Binary Log Backups | Binary Log Backups | | PostgreSQL Restore | PostgreSQL Restore | | MySQL Restore | MySQL Restore |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/database-backup-restore · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/database-backup-restore"
cp -r "skills/database-backup-restore" ".claude/skills/database-backup-restore"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.