Verbose Logging

software development with some really amazing hair

T + S G I F R

Heroku Backup With Single Bundle

· · Posted in Software
Tagged with

In case you missed it, the Coding Horror, Stack Overflow and Haacked blogs died in almost a literal fire. Well I don't think there was an actual fire, but basically they all hosted their blogs in virtual machines on the same physical server, and the backup process never backed up the virtual machine files since they were always in use. The backup process was managed by the hosting company and silently failed on these files. Oops.

While I'm fairly confident this blog isn't going anywhere (it's hosted by Heroku, and they back stuff up), it still gave me that little twitch in the back of my head that I should do something.

Voila

Hacked that up pretty quick. It assumes you have a single bundle enabled for your app, which is free. I destroy any bundle there, create a new one, download it, and push it up to Amazon's S3 service (which I'm confident in).

Quick and dirty, but much better than nothing. It's a full dump, including source code for that branch (with Heroku you just git push).

There's no error checking so if something breaks, I'll see it in my cron email. I'll get an email regardless, since it does output stuff to the console.

I encourage you to use it yourself, or write your own script.


Sharing is Caring