Backup Strategy
Backup Tools
| Tool | Purpose |
|---|---|
| restic | Encrypted, versioned backups |
| rclone | Cloud storage sync |
| rsync | File synchronization |
| WP-CLI | WordPress database export |
Backup Schedule
| Data | Frequency | Retention | Destination |
|---|---|---|---|
| WordPress files | Daily | 30 days | Cloud storage (encrypted) |
| Database | Daily | 30 days | Cloud storage (encrypted) |
| Full server | Weekly | 3 months | Cloud storage (encrypted) |
| Configuration | Per change | Indefinite | Git repository |
Backup Flow
restic backup /var/www/opshell
→ Encrypt with restic key
→ Upload to cloud storage (rclone)
→ Prune old snapshots (30-day retention)
→ Verify latest snapshot
→ Notification on success/failure
Recovery Testing
- Monthly recovery drill for database restoration
- Quarterly full server restore test
- Documented recovery runbook
- Backup integrity verified automatically after each backup
Critical Data
| Path | Content | Backup Priority |
|---|---|---|
/home/wp_opshell_dev/sites/ | WordPress installation | Critical |
/etc/nginx/ | Nginx/OpenLiteSpeed configs | High |
/etc/cloudflared/ | Tunnel configuration | High |
/etc/systemd/ | Custom service definitions | Medium |
/root/.ssh/ | SSH keys and config | Critical |