Backup Disaster Recovery

aj-geddes/useful-ai-prompts/skills/backup-disaster-recovery

作者 aj-geddes3f5182cfd739無授權條款355 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 個月前更新

Implement backup strategies, disaster recovery plans, and data restoration procedures for protecting critical infrastructure and data.

AI 產生的概覽

為關鍵基礎設施設計備份策略、災難復原計畫與資料還原流程。

功能
此技能指導備份與災難復原策略的設計與實作,涵蓋資料庫備份設定、還原指令碼、跨區域容錯移轉,以及災難復原計畫範本。它會產出設定範例、復原流程與規劃文件,並附帶一個結構描述驗證指令碼與一個移轉 SQL 範本。
適用情境
適用於規劃資料保護、業務持續性或災難復原的情境,包括時間點還原、跨區域容錯移轉、資料移轉,以及合規或稽核需求。
執行需求
執行 shell 指令碼(scripts/validate-schema.sh),並包含參考文件與一個 SQL 移轉範本。資料庫備份範例涉及 PostgreSQL 連線設定與認證資訊,例如 POSTGRES_HOST、POSTGRES_USER 和 POSTGRES_PASSWORD。

Backup and Disaster Recovery

Table of Contents

Overview

Design and implement comprehensive backup and disaster recovery strategies to ensure data protection, business continuity, and rapid recovery from infrastructure failures.

When to Use

  • Data protection and compliance
  • Business continuity planning
  • Disaster recovery planning
  • Point-in-time recovery
  • Cross-region failover
  • Data migration
  • Compliance and audit requirements
  • Recovery time objective (RTO) optimization

Quick Start

Minimal working example:

yaml
# postgres-backup-cronjob.yamlapiVersion: v1kind: ConfigMapmetadata:  name: backup-script  namespace: databasesdata:  backup.sh: |    #!/bin/bash    set -euo pipefail
    BACKUP_DIR="/backups/postgresql"    RETENTION_DAYS=30    DB_HOST="${POSTGRES_HOST}"    DB_PORT="${POSTGRES_PORT:-5432}"    DB_USER="${POSTGRES_USER}"    DB_PASSWORD="${POSTGRES_PASSWORD}"
    export PGPASSWORD="$DB_PASSWORD"
    # Create backup directory    mkdir -p "$BACKUP_DIR"
    # Full backup    BACKUP_FILE="$BACKUP_DIR/full-$(date +%Y%m%d-%H%M%S).sql"// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Database Backup Configuration [blocked]Database Backup Configuration
Disaster Recovery Plan Template [blocked]Disaster Recovery Plan Template
Backup and Restore Script [blocked]Backup and Restore Script
Cross-Region Failover [blocked]Cross-Region Failover

Best Practices

✅ DO

  • Perform regular backup testing
  • Use multiple backup locations
  • Implement automated backups
  • Document recovery procedures
  • Test failover procedures regularly
  • Monitor backup completion
  • Use immutable backups
  • Encrypt backups at rest and in transit

❌ DON'T

  • Rely on a single backup location
  • Ignore backup failures
  • Store backups with production data
  • Skip testing recovery procedures
  • Over-compress backups beyond recovery speed needs
  • Forget to verify backup integrity
  • Store encryption keys with backups
  • Assume backups are automatically working

來源與署名

來源:aj-geddes/useful-ai-prompts位於skills/backup-disaster-recovery提交3f5182c

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架