Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I responsibly backup my heroku/s3/github based application?

I have a rails app that runs on Heroku using their standard postgres database with images hosted on s3.

How should I responsibly do backups?

So far I download my application code, s3 files, and database snapshot monthly and store it on an external drive. Downloading my files from s3 is extremely slow and I expect it will get much much worse as time goes on.

like image 759
Nathan Manousos Avatar asked Nov 04 '22 00:11

Nathan Manousos


1 Answers

I've been using the PG Backups Heroku add-on:

https://devcenter.heroku.com/articles/pgbackups

It backs up your postgres database and can be configured to store the backups daily (or more often if need be). I'd recommend it in general for basic backups of the database.

The code I'd simply keep a copy of in a repository in github (or some other git repository). Github is great and I can't think of a reason to do anything else.

S3 itself is pretty safe and reliable. Here's an excerpt from their product information:

Amazon S3 provides a highly durable storage infrastructure designed for mission-critical and primary data storage. Objects are redundantly stored on multiple devices across multiple facilities in an Amazon S3 Region. To help ensure durability, Amazon S3 PUT and COPY operations synchronously store your data across multiple facilities before returning SUCCESS.

If it were important that you have a secure copy of all your files from S3, I'd likely set up some sort of a regularly scheduled batch job to copy them to a server I could then backup separately. I've used the S3 Tools to do this in the past:

http://s3tools.org/s3cmd

like image 181
Kevin Bedell Avatar answered Nov 09 '22 10:11

Kevin Bedell