The Lie of "Our Host Does Backups"
Relying solely on your VPS provider's local snapshots leaves you vulnerable if the entire datacenter catches fire, gets hit by ransomware, or suspends your account. You must maintain immutable off-site backups.
The Disaster Recovery Pipeline
- Nightly cron dumps MySQL databases using
mysqldump --single-transaction --quickto prevent table locking. - Compresses with
zstdand encrypts with private GPG keys before writing to disk. - Uploads to an isolated AWS S3 bucket with Object Lock (Write-Once-Read-Many) to prevent deletion by ransomware.
- Weekly automated test script spins up a throwaway Docker container, imports the dump, and verifies row-count integrity.