daviftorres commented on PR #12900:
URL: https://github.com/apache/cloudstack/pull/12900#issuecomment-4556146596
Dear @jmsperu, this is an excellent idea. Many ACS deployments lack thorough
backups for real disaster recovery situations.
Here is our current approach for anyone looking for alternative methods:
- We run backups from a read-only database replica to avoid impacting
performance.
- A script runs continuously (as a service) in a loop with a 15-minute sleep
(instead of a cronjob) to prevent overlapping execution.
- Script:
- Dumps each database sequentially (never written to disk).
- Pipes the dump directly into gpg for PGP encryption.
- Uploads the file using a write-only API key for security.
- Credentials and keys are loaded as environment variables on service
startup.
- Uploads alternate between three different S3 buckets across North America
(West, North, and East) in a round-robin fashion. Each bucket has versioning
and lifecycle policies enabled.
Example of the line that dumps, encrypts, and uploads backups:
```bash
mysqldump --no-tablespaces --lock-tables=false -R cloud | gpg -r
"<PUB_KEY_ID>" --yes --encrypt - | mc pipe --quiet <BUCKET>/acs/cloud.sql.pgp
|| success=false
```
I hope it helps someone!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]