Backup Automation
Set up reliable automated backup systems for critical data protection. Covers backup strategies, scheduling, retention, verification, and restoration procedures.
Usage
Describe what needs to be backed up, how frequently, and your recovery time objectives. The guide designs a complete backup system with automation, monitoring, and tested restoration procedures.
Parameters
- Data type: Database, Files/documents, Full system, or Application state
- Platform: Linux server, AWS, Docker volumes, or Kubernetes
- RTO/RPO: Recovery time and point objectives (how fast and how recent)
- Storage: Local, Cloud (S3/GCS), Offsite, or Multi-location
Examples
- PostgreSQL Automated Backup: Daily pg_dump to compressed files, 7-day local retention, weekly upload to S3 with 90-day lifecycle, and monthly restoration test with verification script.
- Full Server Backup: rsync-based incremental backup system with hardlink snapshots — daily incrementals, weekly fulls, bandwidth throttling, and exclude list for temp/cache files.
- Docker Volume Backup: Automate backup of Docker named volumes — stop-free backup using volume snapshots, compress and encrypt, upload to object storage, and label-based discovery.
- Multi-Tier Strategy: 3-2-1 backup system — 3 copies on 2 different media types with 1 offsite, automated daily/weekly/monthly schedule with different retention per tier.
Guidelines
- The 3-2-1 rule is the baseline: 3 copies, 2 different media types, 1 offsite location
- Backup scripts include verification steps (file size, checksums, test restore)
- Retention policies balance storage cost with recovery needs (daily/weekly/monthly tiers)
- Encryption protects backup data at rest and in transit (GPG or age for files, TLS for transfer)
- Monitoring alerts on backup failure, missed schedules, and unexpected size changes
- Restoration procedures are documented AND tested regularly (quarterly is minimum)
- Recovery Time Objective (RTO) determines backup format (hot standby vs. cold archive)
- Recovery Point Objective (RPO) determines backup frequency (continuous, hourly, daily)
- Incremental backups reduce storage and network usage while full backups ensure integrity
- Disaster recovery plans extend backups to include full environment reconstruction