3-2-1 Backup Rule

  • 3: Keep 3 copies of backups
  • 2: Store on 2 different media (local + remote)
  • 1: At least 1 off-site copy

Features

  • ✅ Automated file backup with exclusion patterns
  • ✅ MySQL database dump with compression
  • ✅ Automatic cleanup of old backups (>30 days)
  • ✅ Remote sync to S3/compatible storage via rclone
  • ✅ Backup integrity verification
  • ✅ Cron-ready for daily automation

See zh-cn version for the complete bash script, recovery steps, and backup strategy table.