Backing Up Your Rails Apps' Databases
I’m sure you already back up your production databases so this post will be of academic interest only.
For the rest of us who have been living life on the edge, here’s a Ruby script that backs up all of your applications' production databases.
It’s designed to work on a ‘standard’ (i.e. fabulous) Rails Machine so, if that’s you, just drop it on the file system somewhere and run it from
cron. It should Just Work.
If you’re not on Rails Machine, you should be able to adapt it to your server’s setup without much fuss. Unless you’re running a database cluster, in which case you probably have somebody to do this for you anyway.
Disclaimer: please at least read through the script before running it on your own production databases. And back them up manually before running it, just in case. If it all goes pear-shaped then you can be sure that I’ll be in hiding on an inaccessible tropical beach somewhere.