aj-geddes avatar

Database Backup Restore

Covers the essentials of database backup and restore workflows, from pg_dump and mysqldump commands to point-in-time recovery and cross-region replication. You'll use this when setting up automated backup jobs, defining retention policies, or testing disaster recovery procedures. The reference guides walk through full backups, incremental strategies, and binary log handling for both PostgreSQL and MySQL. The quick start examples are straightforward, showing text and compressed formats plus table exclusions. It's practical for compliance requirements and RTO/RPO planning, though you'll want to adapt the patterns to your specific infrastructure and recovery objectives.

skills.sh installs
588
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill database-backup-restore --agent claude-code

Installs into .claude/skills of the current project.

Files

Database Backup & Restore

Table of Contents

Overview

Implement comprehensive backup and disaster recovery strategies. Covers backup types, retention policies, restore testing, and recovery time objectives (RTO/RPO).

When to Use

  • Backup automation setup
  • Disaster recovery planning
  • Recovery testing procedures
  • Backup retention policies
  • Point-in-time recovery (PITR)
  • Cross-region backup replication
  • Compliance and audit requirements

Quick Start

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

Reference Guides

Detailed implementations in the references/ directory:

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, Testing & QA, AI & Agent Building, Automation & Workflows, Databases
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1alinaqi avatarsupabasealinaqi/claude-bootstrapsupabase587skills.sh installs
2sickn33 avatarapi-fuzzing-bug-bountysickn33/antigravity-awesome-skillsapi fuzzing bug bounty570skills.sh installs
3auth0 avatarauth0-fastify-apiauth0/agent-skillsUse when protecting Fastify API endpoints with JWT Bearer token validation or scope checks. Integrates @auth0/auth0-fastify-api for stateless APIs receiving acc562skills.sh installs
4aj-geddes avatargrpc-service-developmentaj-geddes/useful-ai-promptsBuild high-performance gRPC services with Protocol Buffers, bidirectional streaming, and microservice communication. Use when building gRPC servers, defining se532skills.sh installs
5yoanbernabeu avatarsupabase-helpyoanbernabeu/supabase-pentest-skillsQuick reference for all Supabase security audit skills with usage examples and command overview.525skills.sh installs
6firebase avatarfirebase-ai-logic-basicsfirebase/skillsfirebase ai logic basics511skills.sh installs