Agent skill · data analytics · jeremylongshore

managing-database-recovery

Process use when you need to work with database operations.

Why this skill is useful

Adds specific commands and procedures for PostgreSQL and MySQL backup and recovery that the AI wouldn't reliably generate on its own.

What it needs

Requires aws, mysqldump, pg_basebackup, pg_dump, pg_restore, rsync, tar, xtrabackup installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Database Recovery Manager Overview Plan and execute database backup and recovery procedures for PostgreSQL and MySQL, including point-in-time recovery (PITR), logical and physical backups, WAL archiving, and disaster recovery testing. This skill covers the full backup lifecycle from configuration through automated verification, ensuring Recovery Point Objective (RPO) and Recovery Time Objective (RTO) targets are met. Prerequisites Database superuser or replication-role credentials Backup storage destination (local disk, NFS mount, S3, GCS, or Azure Blob) pgbasebackup, pgdump, pgrestore (PostgreSQL) or mysqldump, xtrabackup (MySQL) tar, rsync, or aws s3 CLI for backup transfer and storage WAL archiving configured for PITR (PostgreSQL: archivemode = on, archivecommand) Sufficient storage for backup retention (estimate 2-3x database size for full + incremental) Instructions 1. Assess the current backup situation by checking existing backup configurations. For PostgreSQL: verify archivemode, archivecommand, and wallevel in postgresql.conf. For MySQL: check if binary logging is enabled with SHOW VARIABLES LIKE 'logbin'. 2. Define RPO and RTO targets based on business requirements: RPO (acceptable data loss): determines backup frequency and WAL archiving interval RTO (acceptable downtime): determines backup type and recovery procedure complexity Typical targets: RPO < 1 hour (WAL archiving), RTO < 30 minutes (physical backup restore) 3. Configure WAL archiving for PostgreSQL PITR: Set wallevel = replica and archivemode = on Configure archivecommand = 'test ! -f /archive/%f && cp %p /archive/%f' (or use pgBackRest/WAL-G for S3) Verify archiving works: SELECT FROM pgstatarchiver For MySQL, enable binary logging: logbin = mysql-bin, binlogformat = ROW 4. Create a full physical backup using pgbasebackup -D /backups/base -Ft -z -P (PostgreSQL) or xtrabackup --backup --target-dir=/backups/full (MySQL). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/managing-database-recovery

View the source on GitHub

Browse the @skills marketplace