选项
首页首页 Skill 生产力和工作流程 fairdb-backup-manager

当您需要进行备份和恢复操作时,请使用此技能。该技能提供备份自动化和灾难恢复功能,并附有全面的指导和自动化支持。可通过“创建备份”、“自动化备份”或“实施灾难恢复”等短语触发该技能。

...展开全部
45
更新时间 2026-06-29

关于fairdb-backup-manager

fairdb-backup-manager 技能可为使用fairdb数据库的系统自动化并优化备份和灾难恢复流程。它提供了一套全面的解决方案,用于管理备份、自动化定期备份计划,并在发生故障或灾难时确保数据恢复。 该技能专为系统管理员和开发人员设计,旨在确保备份任务得到高效处理,从而减少人工操作,并将停机或意外事件期间的数据丢失风险降至最低。

常见问题

如何使用fairdb-backup-manager 技能?

要使用fairdb-backup-manager 技能,请使用“create backups”、“automate backups”或“implement disaster recovery”等命令进行触发。开始前请确保已具备必要的权限并完成相关配置。

fairdb-backup-manager 支持哪些工具?

fairdb-backup-manager 技能支持以下工具:Read、Write、Edit、Grep、Glob、Bash(支持tar、rsync和AWS S3)。这些工具可帮助您高效管理备份任务和数据恢复流程。

使用此技能是否有任何先决条件?

是的,您需要具备执行相关操作所需的凭证和权限。此外,了解系统架构、能够查阅相关文档以及拥有用于测试的预生产环境也是必不可少的先决条件。

该技能可以在生产环境中使用吗?

可以,该技能可在生产环境中使用,但建议先在非生产环境中进行测试。部署前应进行彻底的测试、监控和验证。

如果出现权限或访问问题该怎么办?

如果出现权限问题,请确保凭据正确且具备必要的访问权限。如有需要,请申请提升权限,并在自动化任务中贯彻最小权限原则。

在 GitHub 上查看

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

  • FairDB instance running and accessible with admin credentials
  • tar and rsync installed for file-level backups
  • AWS CLI configured with s3:PutObject and s3:GetObject permissions (if using S3 as backup target)
  • Sufficient storage at backup destination (2-3x database size for rotation)
  • Cron or systemd timer access for scheduling
  • Test environment available for restore verification

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

  • Backup shell script with logging, locking, compression, and S3 upload
  • Restore shell script with checksum verification and data validation
  • Cron schedule entries or systemd timer units
  • Retention cleanup script
  • S3 lifecycle policy configuration for long-term archive tiering

Error Handling

ErrorCauseSolution
Backup lock acquisition failedAnother backup or maintenance process is runningCheck for stale lock files; implement timeout-based lock with flock
tar: Cannot open: No space left on deviceLocal backup destination fullRun retention cleanup; check disk usage with df -h; increase volume size
aws s3 cp: upload failedNetwork issue or expired AWS credentialsRetry with --retry 3; refresh credentials; check S3 bucket permissions
Restore failed: checksum mismatchBackup file corrupted during transfer or storageRe-download from S3; verify S3 object integrity; use a different backup copy
Database inconsistent after restoreBackup taken during active write without lockEnsure backup script acquires a consistent snapshot lock before export

Examples

  • "Create an automated nightly backup for the FairDB production instance, compressed and uploaded to S3 with KMS encryption and 30-day retention."
  • "Generate a restore runbook that pulls the latest backup from S3, verifies integrity, and restores to a staging instance for validation."
  • "Set up backup monitoring that alerts via Slack if a backup job fails or if no successful backup exists within the last 25 hours."

Resources

  • AWS S3 CLI: https://docs.aws.amazon.com/cli/latest/reference/s3/
  • rsync documentation: https://rsync.samba.org/documentation.html
  • Backup automation patterns: https://www.veeam.com/blog/321-backup-rule.html
  • Linux cron scheduling: https://crontab.guru/

所有文件

1 个文件

安装 fairdb-backup-manager

下载技能文件并将其解压到 .claude/skills/ 目录中。

下载ZIP

克隆仓库并复制技能文件到您的项目中。

git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/devops/fairdb-operations-kit/skills/fairdb-backup-manager/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

复制 复制
快速设置: 将技能文件夹复制到 .claude/skills/ 目录下,Claude 会自动检测并使用该技能

相关技能

notion-automation
更新时间 2026-06-29
airtable-automation
更新时间 2026-06-29
seo-programmatic
更新时间 2026-06-29
revops
更新时间 2026-06-29
OR