Skip to content

jeremylongshore/tons-of-skills-marketplace / plugins/database/database-recovery-manager/skills/managing-database-recovery

managing-database-recovery

Verified

Process use when you need to work with database operations. This skill provides database management and optimization with comprehensive guidance and automation. Trigger with phrases like "manage database", "optimize database", or "configure database".

FileKindSize
SKILL.mdskill md7.1 KB
assets/README.mdmarkdown155 B
references/README.mdmarkdown68 B
scripts/README.mdmarkdown1.9 KB
scripts/failover.shexecutablescript19.7 KB
scripts/pitr_restore.shexecutablescript13.7 KB
scripts/test_recovery.shexecutablescript18.9 KB
scripts/validate_backup.shexecutablescript10.8 KB

scripts/README.md

View on GitHub
# Scripts

Bundled resources for database-recovery-manager skill

- [x] validate_backup.sh: Script to validate database backups by checking integrity and recoverability.
- [x] pitr_restore.sh: Script to perform point-in-time recovery to a specified timestamp.
- [x] failover.sh: Script to initiate a failover to a secondary database instance.
- [x] test_recovery.sh: Script to automate recovery testing by restoring backups to a test environment.

## Script Descriptions

### validate_backup.sh

Validates database backups by checking file integrity and recoverability. Supports PostgreSQL, MySQL, and MongoDB backup formats. Performs format-specific validation and optional connectivity tests.

**Usage:**

```bash
./validate_backup.sh -p /path/to/backup -t postgresql
./validate_backup.sh -p /backups/dump.sql.gz -t mysql -c "mysql://user@localhost"
```

### pitr_restore.sh

Performs point-in-time recovery (PITR) to a specified timestamp. Manages base backups and WAL/transaction logs for recovery to any specific point in time.

**Usage:**

```bash
./pitr_restore.sh -t postgresql --target-time "2025-12-10T14:30:00Z" -b /backups/base.sql.gz -w /backups/wal
./pitr_restore.sh -t mysql --target-time "2025-12-10 14:30:00" --verify
```

### failover.sh

Initiates automatic or manual failover to a secondary database instance. Supports monitoring, health checks, DNS updates, and reverse replication setup.

**Usage:**

```bash
./failover.sh -t postgresql --primary-host db1.example.com --secondary-host db2.example.com
./failover.sh -t mysql --mode automatic --check-interval 10 --dns-record db.example.com
```

### test_recovery.sh

Automates recovery testing by restoring backups to a test environment. Validates backup recoverability without affecting production. Includes data verification and automatic cleanup.

**Usage:**

```bash
./test_recovery.sh -t postgresql -b /backups/db.sql.gz --test-db-port 5433
./test_recovery.sh -t mysql -b /backups/dump.sql --verify-data --cleanup
```
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall