Show HN: Regular MySQL Backup to Email (github.com)
Hi, everyone. I got big flood last week. Weather was crazy and water got to my company warehouse. Luckily company local server was not in that room. Of course I was to lazy to set up any automatic off site db backup. But now I got it working. I wanna hear you thought? Is it smart to use email for db backup or should I just upload it to remote server?
For those lazy like me, try to setup this app and give it a go.
3 comments
[ 4.2 ms ] story [ 26.5 ms ] threadI'd advise against using email for sending the actual backups as there's quite a few security risks and a lot of technical things that could catch you out over time (e.g. hitting size limits as your database grows).
As an alternative you could use a secure upload to a remote location for transferring the backup file and then email yourself on any failures.
Then another db in another region pulls down that backup, decompresses it and loads it and a script does a query for a known set of data. If the test fails I get an email. This is a very simplistic test. Proper DBA's would implement far more advanced validations than what I am doing.
It isn't as fast as real time replication but has the advantage of testing my backups and giving me a few ways to get out of a tangle. This method gets slower with much bigger databases. One could still do real time replication in addition to this.