Implementing backup strategies

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

Implementing backup strategies is an AI agent skill from the GitHub repository jeremylongshore/claude-code-plugins-plus-skills. Execute 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

Implementing Backup Strategies

Overview

Design and implement backup strategies for databases, file systems, and cloud resources using tools like tar, rsync, pg_dump, mysqldump, AWS S3, and cloud-native snapshot APIs. Covers full, incremental, and differential backup schemes with retention policies, encryption, and automated verification.

Prerequisites

Instructions

  1. Inventory all data sources requiring backup: databases, application data directories, configuration files, secrets/certificates
  2. Classify data by RPO (Recovery Point Objective) and RTO (Recovery Time Objective) requirements
  3. Select backup strategy per data class: full daily + incremental hourly for databases, snapshot-based for block storage, rsync for file systems
  4. Generate backup scripts using appropriate tools (pg_dump --format=custom, tar czf, rsync -avz --delete)
  5. Configure retention policy: daily backups kept 7 days, weekly kept 4 weeks, monthly kept 12 months
  6. Add encryption for backups containing sensitive data (gpg --encrypt or S3 server-side encryption with KMS)
  7. Set up automated scheduling via cron jobs or systemd timers with proper logging
  8. Implement backup verification: restore to a test environment on a weekly schedule and validate data integrity
  9. Configure alerting for backup failures via email, Slack, or PagerDuty

Output

Error Handling

| Error | Cause | Solution |

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

| No space left on device | Backup destination full | Verify retention cleanup is running; increase storage or reduce retention window |

| pg_dump: connection refused | Database not accepting connections or wrong credentials | Check pg_hba.conf, verify connection string, and test with psql first |

| rsync: connection unexpectedly closed | Network interruption or SSH timeout | Add --timeout=300 and --partial flags; use persistent SSH tunnel |

| S3 upload failed: Access Denied | IAM policy missing s3:PutObject permission | Attach proper IAM policy; verify bucket policy allows writes from the backup source |

| Backup file corrupted on restore | Incomplete write or disk error during backup | Add checksum verification (sha256sum) after backup; test restores regularly |

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.