[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78KW4ETD2YVMD7K96E0GET0":3,"skill-same:01M78KW4ETD2YVMD7K96E0GET0":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M78KW4ETD2YVMD7K96E0GET0","managing-database-recovery",null,"Process use when you need to work with database operations.\nThis skill provides database management and optimization with comprehensive guidance and automation.\nTrigger with phrases like \"manage database\", \"optimize database\",\nor \"configure database\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase--database-recovery-manager--managing-database-recovery\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: managing-database-recovery\ndescription: |\n  Process use when you need to work with database operations.\n  This skill provides database management and optimization with comprehensive guidance and automation.\n  Trigger with phrases like \"manage database\", \"optimize database\",\n  or \"configure database\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(tar:*), Bash(rsync:*), Bash(aws:s3:*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [database, database-recovery]\n---\n# Database Recovery Manager\n\n## Overview\n\nPlan 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.\n\n## Prerequisites\n\n- Database superuser or replication-role credentials\n- Backup storage destination (local disk, NFS mount, S3, GCS, or Azure Blob)\n- `pg_basebackup`, `pg_dump`, `pg_restore` (PostgreSQL) or `mysqldump`, `xtrabackup` (MySQL)\n- `tar`, `rsync`, or `aws s3` CLI for backup transfer and storage\n- WAL archiving configured for PITR (PostgreSQL: `archive_mode = on`, `archive_command`)\n- Sufficient storage for backup retention (estimate 2-3x database size for full + incremental)\n\n## Instructions\n\n1. Assess the current backup situation by checking existing backup configurations. For PostgreSQL: verify `archive_mode`, `archive_command`, and `wal_level` in `postgresql.conf`. For MySQL: check if binary logging is enabled with `SHOW VARIABLES LIKE 'log_bin'`.\n\n2. Define RPO and RTO targets based on business requirements:\n   - RPO (acceptable data loss): determines backup frequency and WAL archiving interval\n   - RTO (acceptable downtime): determines backup type and recovery procedure complexity\n   - Typical targets: RPO \u003C 1 hour (WAL archiving), RTO \u003C 30 minutes (physical backup restore)\n\n3. Configure WAL archiving for PostgreSQL PITR:\n   - Set `wal_level = replica` and `archive_mode = on`\n   - Configure `archive_command = 'test ! -f \u002Farchive\u002F%f && cp %p \u002Farchive\u002F%f'` (or use pgBackRest\u002FWAL-G for S3)\n   - Verify archiving works: `SELECT * FROM pg_stat_archiver`\n   - For MySQL, enable binary logging: `log_bin = mysql-bin`, `binlog_format = ROW`\n\n4. Create a full physical backup using `pg_basebackup -D \u002Fbackups\u002Fbase -Ft -z -P` (PostgreSQL) or `xtrabackup --backup --target-dir=\u002Fbackups\u002Ffull` (MySQL). Physical backups are faster to restore than logical backups for databases larger than 10GB.\n\n5. Create logical backups for portability and selective restoration: `pg_dump -Fc -f database.dump dbname` (PostgreSQL) or `mysqldump --single-transaction --routines --triggers dbname > database.sql` (MySQL).\n\n6. Upload backups to remote storage for disaster recovery: `aws s3 cp \u002Fbackups\u002Fbase.tar.gz s3:\u002F\u002Fbackup-bucket\u002Fpostgres\u002F$(date +%Y%m%d)\u002F` with server-side encryption enabled. Implement a retention policy (e.g., daily backups for 30 days, weekly for 90 days, monthly for 1 year).\n\n7. Test recovery by restoring to a separate server or container:\n   - Restore physical backup: `pg_restore -d testdb database.dump` or untar base backup and start PostgreSQL\n   - For PITR: restore base backup, copy WAL files to `pg_wal`, create `recovery.signal` with `recovery_target_time = '2024-01-15 14:30:00'`\n   - Verify data integrity by running application test suite against restored database\n   - Measure actual recovery time to validate RTO target\n\n8. Automate backup verification with a daily cron job that: takes backup, restores to a test instance, runs integrity checks (`pg_catalog.pg_class` row counts, checksum verification), and sends a success\u002Ffailure notification.\n\n9. Document the recovery runbook with exact commands for each recovery scenario: full database restore, PITR to a specific timestamp, single table restore, and cross-region failover.\n\n10. Schedule monthly disaster recovery drills to verify the runbook works and the team can execute recovery within RTO targets.\n\n## Output\n\n- **Backup configuration files** for PostgreSQL (postgresql.conf changes, archive_command) or MySQL (my.cnf changes)\n- **Backup scripts** (shell) for automated full and incremental backups with S3\u002FGCS upload\n- **Recovery runbook** with step-by-step commands for each recovery scenario\n- **Backup verification scripts** that automate restore-and-check procedures\n- **Retention policy configuration** with automated cleanup of old backups\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| WAL segment not found during PITR | Gap in WAL archiving due to archive_command failure | Check `pg_stat_archiver` for `last_failed_wal`; fix archive_command; consider WAL-G or pgBackRest for reliable archiving |\n| `pg_basebackup` fails with \"replication connection\" error | Missing replication permissions or `max_wal_senders` exhausted | Grant REPLICATION role; increase `max_wal_senders`; add entry to `pg_hba.conf` for replication connections |\n| Backup storage full | Retention policy not enforced or backup size grew unexpectedly | Implement automated cleanup script; compress backups with `gzip` or `zstd`; monitor storage usage with alerts at 80% |\n| Recovery takes longer than RTO target | Database grew since RTO was last validated, or restore is I\u002FO-bound | Use physical backups instead of logical; restore to SSD storage; parallelize restore with `pg_restore -j 4`; consider standby replica for faster failover |\n| Restored database has corruption | Backup taken during crash or disk error | Enable `data_checksums` in PostgreSQL; verify backups with `pg_verifybackup`; run `ANALYZE` and `REINDEX` after restore |\n\n## Examples\n\n**Point-in-time recovery after accidental table drop**: At 14:30 a developer runs `DROP TABLE orders` on production. Recovery: restore the most recent physical backup (taken at 02:00), replay WAL files up to 14:29:59 using `recovery_target_time`, verify orders table is intact, then swap the recovered database into production. Total recovery time: 25 minutes for a 200GB database.\n\n**Automated daily backup to S3 with verification**: A cron job runs at 02:00 UTC: takes `pg_basebackup`, compresses with `zstd`, uploads to S3 with server-side encryption, restores to a Docker container, runs row count checks against production, and sends a Slack notification with backup size and verification status.\n\n**Cross-region disaster recovery drill**: Monthly exercise: restore the latest S3 backup to a different AWS region, replay WAL files to catch up, run the application test suite, measure total failover time, and document results. Target: full recovery in a different region within 1 hour.\n\n## Resources\n\n- PostgreSQL backup and recovery: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fbackup.html\n- pgBackRest (production backup tool): https:\u002F\u002Fpgbackrest.org\u002F\n- WAL-G (WAL archiving to cloud storage): https:\u002F\u002Fgithub.com\u002Fwal-g\u002Fwal-g\n- Percona XtraBackup: https:\u002F\u002Fdocs.percona.com\u002Fpercona-xtrabackup\u002F\n- MySQL point-in-time recovery: https:\u002F\u002Fdev.mysql.com\u002Fdoc\u002Frefman\u002F8.0\u002Fen\u002Fpoint-in-time-recovery.html","# Database Recovery Manager\n\n## Overview\n\nPlan 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.\n\n## Prerequisites\n\n- Database superuser or replication-role credentials\n- Backup storage destination (local disk, NFS mount, S3, GCS, or Azure Blob)\n- `pg_basebackup`, `pg_dump`, `pg_restore` (PostgreSQL) or `mysqldump`, `xtrabackup` (MySQL)\n- `tar`, `rsync`, or `aws s3` CLI for backup transfer and storage\n- WAL archiving configured for PITR (PostgreSQL: `archive_mode = on`, `archive_command`)\n- Sufficient storage for backup retention (estimate 2-3x database size for full + incremental)\n\n## Instructions\n\n1. Assess the current backup situation by checking existing backup configurations. For PostgreSQL: verify `archive_mode`, `archive_command`, and `wal_level` in `postgresql.conf`. For MySQL: check if binary logging is enabled with `SHOW VARIABLES LIKE 'log_bin'`.\n\n2. Define RPO and RTO targets based on business requirements:\n   - RPO (acceptable data loss): determines backup frequency and WAL archiving interval\n   - RTO (acceptable downtime): determines backup type and recovery procedure complexity\n   - Typical targets: RPO \u003C 1 hour (WAL archiving), RTO \u003C 30 minutes (physical backup restore)\n\n3. Configure WAL archiving for PostgreSQL PITR:\n   - Set `wal_level = replica` and `archive_mode = on`\n   - Configure `archive_command = 'test ! -f \u002Farchive\u002F%f && cp %p \u002Farchive\u002F%f'` (or use pgBackRest\u002FWAL-G for S3)\n   - Verify archiving works: `SELECT * FROM pg_stat_archiver`\n   - For MySQL, enable binary logging: `log_bin = mysql-bin`, `binlog_format = ROW`\n\n4. Create a full physical backup using `pg_basebackup -D \u002Fbackups\u002Fbase -Ft -z -P` (PostgreSQL) or `xtrabackup --backup --target-dir=\u002Fbackups\u002Ffull` (MySQL). Physical backups are faster to restore than logical backups for databases larger than 10GB.\n\n5. Create logical backups for portability and selective restoration: `pg_dump -Fc -f database.dump dbname` (PostgreSQL) or `mysqldump --single-transaction --routines --triggers dbname > database.sql` (MySQL).\n\n6. Upload backups to remote storage for disaster recovery: `aws s3 cp \u002Fbackups\u002Fbase.tar.gz s3:\u002F\u002Fbackup-bucket\u002Fpostgres\u002F$(date +%Y%m%d)\u002F` with server-side encryption enabled. Implement a retention policy (e.g., daily backups for 30 days, weekly for 90 days, monthly for 1 year).\n\n7. Test recovery by restoring to a separate server or container:\n   - Restore physical backup: `pg_restore -d testdb database.dump` or untar base backup and start PostgreSQL\n   - For PITR: restore base backup, copy WAL files to `pg_wal`, create `recovery.signal` with `recovery_target_time = '2024-01-15 14:30:00'`\n   - Verify data integrity by running application test suite against restored database\n   - Measure actual recovery time to validate RTO target\n\n8. Automate backup verification with a daily cron job that: takes backup, restores to a test instance, runs integrity checks (`pg_catalog.pg_class` row counts, checksum verification), and sends a success\u002Ffailure notification.\n\n9. Document the recovery runbook with exact commands for each recovery scenario: full database restore, PITR to a specific timestamp, single table restore, and cross-region failover.\n\n10. Schedule monthly disaster recovery drills to verify the runbook works and the team can execute recovery within RTO targets.\n\n## Output\n\n- **Backup configuration files** for PostgreSQL (postgresql.conf changes, archive_command) or MySQL (my.cnf changes)\n- **Backup scripts** (shell) for automated full and incremental backups with S3\u002FGCS upload\n- **Recovery runbook** with step-by-step commands for each recovery scenario\n- **Backup verification scripts** that automate restore-and-check procedures\n- **Retention policy configuration** with automated cleanup of old backups\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| WAL segment not found during PITR | Gap in WAL archiving due to archive_command failure | Check `pg_stat_archiver` for `last_failed_wal`; fix archive_command; consider WAL-G or pgBackRest for reliable archiving |\n| `pg_basebackup` fails with \"replication connection\" error | Missing replication permissions or `max_wal_senders` exhausted | Grant REPLICATION role; increase `max_wal_senders`; add entry to `pg_hba.conf` for replication connections |\n| Backup storage full | Retention policy not enforced or backup size grew unexpectedly | Implement automated cleanup script; compress backups with `gzip` or `zstd`; monitor storage usage with alerts at 80% |\n| Recovery takes longer than RTO target | Database grew since RTO was last validated, or restore is I\u002FO-bound | Use physical backups instead of logical; restore to SSD storage; parallelize restore with `pg_restore -j 4`; consider standby replica for faster failover |\n| Restored database has corruption | Backup taken during crash or disk error | Enable `data_checksums` in PostgreSQL; verify backups with `pg_verifybackup`; run `ANALYZE` and `REINDEX` after restore |\n\n## Examples\n\n**Point-in-time recovery after accidental table drop**: At 14:30 a developer runs `DROP TABLE orders` on production. Recovery: restore the most recent physical backup (taken at 02:00), replay WAL files up to 14:29:59 using `recovery_target_time`, verify orders table is intact, then swap the recovered database into production. Total recovery time: 25 minutes for a 200GB database.\n\n**Automated daily backup to S3 with verification**: A cron job runs at 02:00 UTC: takes `pg_basebackup`, compresses with `zstd`, uploads to S3 with server-side encryption, restores to a Docker container, runs row count checks against production, and sends a Slack notification with backup size and verification status.\n\n**Cross-region disaster recovery drill**: Monthly exercise: restore the latest S3 backup to a different AWS region, replay WAL files to catch up, run the application test suite, measure total failover time, and document results. Target: full recovery in a different region within 1 hour.\n\n## Resources\n\n- PostgreSQL backup and recovery: https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002Fcurrent\u002Fbackup.html\n- pgBackRest (production backup tool): https:\u002F\u002Fpgbackrest.org\u002F\n- WAL-G (WAL archiving to cloud storage): https:\u002F\u002Fgithub.com\u002Fwal-g\u002Fwal-g\n- Percona XtraBackup: https:\u002F\u002Fdocs.percona.com\u002Fpercona-xtrabackup\u002F\n- MySQL point-in-time recovery: https:\u002F\u002Fdev.mysql.com\u002Fdoc\u002Frefman\u002F8.0\u002Fen\u002Fpoint-in-time-recovery.html",{"name":5,"tags":24,"author":27,"license":15,"version":28,"description":29,"allowed-tools":30,"compatible-with":31},[25,26],"database","database-recovery","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Process use when you need to work with database operations.\nThis skill provides database management and optimization with comprehensive guidance and automation.\nTrigger with phrases like \"manage database\", \"optimize database\",\nor \"configure database\".\n","Read, Write, Edit, Grep, Glob, Bash(tar:*), Bash(rsync:*), Bash(aws:s3:*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fdatabase--database-recovery-manager--managing-database-recovery",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-recovery",{"tool":47,"command":48},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-recovery",{"tool":50,"command":51},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill managing-database-recovery","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase--database-recovery-manager--managing-database-recovery\u002FSKILL.md",true,[],[56,63,70,77,84,92],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]