← Back to all products

Backup & DR Toolkit

$39

Automated backup scripts for databases, file systems, and cloud resources with DR runbooks and testing procedures.

📁 19 files🏷 v1.0.0
DockerYAMLShellJSONMarkdownAWSPostgreSQL

📁 File Structure 19 files

backup-disaster-recovery/ ├── LICENSE ├── README.md ├── configs/ │ ├── backup-schedule.yaml │ ├── notification.yaml │ └── retention-policy.yaml ├── docker/ │ ├── backup-agent/ │ │ ├── Dockerfile │ │ └── entrypoint.sh │ └── docker-compose.yml ├── guides/ │ └── backup-strategy.md ├── runbooks/ │ ├── backup-verification-checklist.md │ └── disaster-recovery-plan.md └── scripts/ ├── backup-docker-volumes.sh ├── backup-filesystem.sh ├── backup-mysql.sh ├── backup-postgres.sh ├── restore-filesystem.sh ├── restore-postgres.sh └── verify-backups.sh

📖 Documentation Preview README excerpt

Backup & Disaster Recovery Kit

Battle-tested backup scripts and disaster recovery runbooks for production infrastructure.

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

[![Shell](https://img.shields.io/badge/Shell-Bash%205.x-green.svg)]()

[![Docker](https://img.shields.io/badge/Docker-24.x-blue.svg)]()

Automate your backups, verify their integrity, and recover in minutes -- not hours.

---

What You Get

  • 6 production backup & restore scripts covering PostgreSQL, MySQL, filesystems, and Docker volumes
  • Backup verification with integrity checks, checksum validation, and test restores
  • Configurable schedules & retention via YAML (daily, weekly, monthly, yearly)
  • Multi-channel notifications (Slack, email, PagerDuty) on success or failure
  • Docker-based backup agent for containerized environments
  • Disaster recovery runbooks with RPO/RTO analysis and step-by-step procedures
  • Strategic guide covering the 3-2-1 rule, encryption, compliance, and cross-region replication

File Tree


backup-disaster-recovery/
├── README.md
├── manifest.json
├── LICENSE
├── scripts/
│   ├── backup-postgres.sh        # pg_dump + compression + S3 upload
│   ├── backup-mysql.sh           # mysqldump + compression + S3 upload
│   ├── backup-filesystem.sh      # rsync/rclone incremental + encryption
│   ├── backup-docker-volumes.sh  # Stop, tar, upload, restart
│   ├── restore-postgres.sh       # Download from S3 + pg_restore + verify
│   ├── restore-filesystem.sh     # Download, decrypt, restore
│   └── verify-backups.sh         # Integrity check + test restore
├── configs/
│   ├── backup-schedule.yaml      # Cron schedules for all backup types
│   ├── retention-policy.yaml     # Retention rules by tier
│   └── notification.yaml         # Slack, email, PagerDuty config
├── docker/
│   ├── backup-agent/
│   │   ├── Dockerfile            # Lightweight backup agent
│   │   └── entrypoint.sh         # Agent entrypoint
│   └── docker-compose.yml        # Agent + MinIO for testing
├── runbooks/
│   ├── disaster-recovery-plan.md # RPO/RTO + step-by-step recovery
│   └── backup-verification-checklist.md
└── guides/
    └── backup-strategy.md        # 3-2-1 rule, encryption, compliance

Getting Started

1. Configure your environment


# Copy and edit the config files
cp configs/backup-schedule.yaml configs/backup-schedule.local.yaml

*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .yml preview

docker/docker-compose.yml # ============================================================================ # Docker Compose - Backup Agent + MinIO (Local Testing) # Part of: Backup & Disaster Recovery Kit by Datanest Digital # ============================================================================ # Spins up MinIO (S3-compatible) and the backup agent for local testing. # # Usage: # docker compose up -d # docker compose exec backup-agent /opt/backup-agent/scripts/backup-postgres.sh \ # --host postgres --database testdb --bucket s3://test-backups/postgres # ============================================================================ services: # --------------------------------------------------------------------------- # MinIO - S3-compatible object storage for local testing # --------------------------------------------------------------------------- minio: image: minio/minio:RELEASE.2024-01-18T22-51-28Z container_name: backup-minio command: server /data --console-address ":9001" ports: - "9000:9000" # S3 API - "9001:9001" # Web console environment: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin volumes: - minio-data:/data healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 10s timeout: 5s retries: 5 # --------------------------------------------------------------------------- # MinIO bucket initialization # --------------------------------------------------------------------------- minio-init: image: minio/mc:RELEASE.2024-01-18T07-03-39Z container_name: backup-minio-init depends_on: minio: condition: service_healthy entrypoint: > /bin/sh -c " mc alias set local http://minio:9000 minioadmin minioadmin && mc mb --ignore-existing local/test-backups && mc policy set download local/test-backups && echo 'Bucket created successfully' " # ... 67 more lines ...