postgresql-backup-recovery

Manage PostgreSQL backups and recovery with pg_dump, pg_basebackup, and WAL archiving.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-backup-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-backup-recovery
Source: https://github.com/rudi-bruchez/dba-skills/tree/main/skills/postgresql-backup-recovery
Command: npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-backup-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and examples (resource) components.

What problem does it solve?

This Skill provides comprehensive strategies and tools for backing up and recovering PostgreSQL databases, ensuring data safety and business continuity against data loss or corruption.

Core Features & Use Cases

  • Backup Strategy Design: Choose between logical (pg_dump) and physical (pg_basebackup) backups based on RPO/RTO.
  • Automated Backups: Configure pg_dump for logical backups and WAL archiving for physical backups with PITR.
  • Point-in-Time Recovery (PITR): Restore your database to any specific moment in time using WAL archives.
  • Use Case: Recover your production PostgreSQL database to a state just before a critical data corruption incident occurred, minimizing data loss.

Quick Start

Execute a full logical backup of the 'mydatabase' database using the custom format.

Frequently Asked Questions about postgresql-backup-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up point-in-time recovery for PostgreSQL using WAL archiving?

Point-in-time recovery (PITR) in PostgreSQL uses WAL archiving to restore your database to a specific moment. You configure WAL archiving with pg_basebackup to capture physical changes, enabling recovery to any desired timestamp before a corruption incident occurred.

When should I use pg_dump versus pg_basebackup for PostgreSQL backups?

Use pg_dump for logical backups when you need flexibility and selective data restoration. Use pg_basebackup for physical backups when you require faster recovery times and point-in-time recovery capabilities, as it creates a complete binary copy of the database cluster.

Can I execute a full logical backup of a specific PostgreSQL database?

Yes, you can execute a full logical backup of a specific PostgreSQL database using pg_dump. The process supports custom formats, allowing you to create a comprehensive backup file of your chosen database for reliable data restoration.

Does this PostgreSQL backup and recovery approach support PostgreSQL 13?

Yes, this PostgreSQL backup and recovery approach supports PostgreSQL 13 and later versions. It manages backup strategies using pg_dump, pg_basebackup, WAL archiving, and PITR for environments running PostgreSQL 13+.

What is the best way to design a robust PostgreSQL backup strategy?

The best way to design a PostgreSQL backup strategy is to choose between logical and physical backups based on your Recovery Point Objective (RPO) and Recovery Time Objective (RTO), combining pg_dump for logical snapshots with WAL archiving for continuous physical protection.

How do I restore a PostgreSQL database to a state before data corruption?

You restore a PostgreSQL database to a pre-corruption state by utilizing point-in-time recovery (PITR) with WAL archives. This allows you to specify the exact moment before the critical incident occurred, minimizing data loss and ensuring business continuity.