Ask HN: How do you backup your production databases?
For me, backups of the database are probably the most crucial asset any web service can have. And there are like 1000 ways to make backups of that data. I would like to know how others handle database backups, especially in Docker-based environments.
- Which tools do you use? Which ones should be avoided?
- Where do you store the data and how do you handle the connection between your servers and that other location?
- What about the schedule, and do you use multiple backup locations?
- How does one make sure the backups are monitored and, most important, can be actually used to restore a production database?
- Are there any pitfalls everyone should know when doing backups for MySQL, PostgreSQL, SQLite,...?
5 comments
[ 2.9 ms ] story [ 21.3 ms ] threadAdditionally daily backups to a storage server hosted by a different cloud provider with a simple cronjob.
Normal production monitoring kept track that replication was working, but had to have an exception to allow more time between detection and alerting for the archiving.
These archives were used to start new production slaves, so the backups were tested from time to time. Older archives and careful use of binary logs could allow restoration to any particular point (although I never had to do that); at least within the retention of binary logs.
I did a rotation of backups to have the most recent X frequent backups, Y backups no more than 1 a day, Z weeklies, etc monthlys, etc, etc.
https://www.percona.com/software/database-tools/percona-moni...
(Percona Founder so kind of biased)