Automate Your Database Backups Using GitHub Actions
Today we are releasing version 1.0 of our Platform.sh Database Backup and S3 Sync GitHub Action that will allow you to take a database dump from a site hosted on platform.sh and sync that database dump to an AWS S3 bucket that you specify. We are utilizing this action with a scheduled workflow on a number of sites to automate database backups without running on any of our own infrastructure. We hope you find this tool useful, and let us know if you encounter any issues!
It's important to keep databases (and other non-version-controlled content) regularly backed up to a remote location. By combining a little bash, Amazon's aws-cli library, and Jenkins (or cron!), we can set up fully automated daily database backups in only five lines of code!
In a previous post, Dave talked about marginal gains and how, in aggregate, they can really add up. We recently made some infrastructure improvements that I first thought would be marginal, but quickly proved to be rather significant.