Fairdb backup manager

From jeremylongshore/claude-code-plugins-plus-skills · View interactive version

Fairdb backup manager is an AI agent skill from the GitHub repository jeremylongshore/claude-code-plugins-plus-skills. Manage use when you need to work with backup and recovery. This skill provides backup automation and disaster recovery with comprehensive guidance and automation. Trigger with phrases like "create backups", "automate backups", or "implement disaster recovery".

How to use this skill

Skill file

FairDB Backup Manager

Overview

Automate backup and recovery operations for FairDB database instances. Generate backup scripts, configure retention policies, schedule automated backups to local storage or S3, and produce tested restore procedures with integrity verification.

Prerequisites

Instructions

  1. Assess the FairDB instance: identify data directory location, database size, and write throughput
  2. Select backup method: logical dump for portability, filesystem snapshot for speed, or continuous archiving for minimal RPO
  3. Generate backup script with lock acquisition, data export, compression (tar czf), and checksum generation
  4. Configure S3 upload with server-side encryption (aws s3 cp --sse aws:kms) for off-site copies
  5. Set up retention policy: keep hourly backups for 24 hours, daily for 7 days, weekly for 4 weeks, monthly for 12 months
  6. Create cleanup script to purge expired backups according to retention schedule
  7. Schedule backups via cron with proper logging to /var/log/fairdb-backup.log
  8. Generate restore procedure: download from S3, verify checksum, decompress, and import with validation query
  9. Test restore procedure in a staging environment and document the time-to-recovery

Output

Error Handling

| Error | Cause | Solution |

|-------|-------|---------|

| Backup lock acquisition failed | Another backup or maintenance process is running | Check for stale lock files; implement timeout-based lock with flock |

| tar: Cannot open: No space left on device | Local backup destination full | Run retention cleanup; check disk usage with df -h; increase volume size |

| aws s3 cp: upload failed | Network issue or expired AWS credentials | Retry with --retry 3; refresh credentials; check S3 bucket permissions |

| Restore failed: checksum mismatch | Backup file corrupted during transfer or storage | Re-download from S3; verify S3 object integrity; use a different backup copy |

| Database inconsistent after restore | Backup taken during active write without lock | Ensure backup script acquires a consistent snapshot lock before export |

Examples

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.