Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been looking for a way to back up my app's database which is hosted by heroku. It uses an sqlite database. What I am looking for is a way to add a button on my site which will allow me to download the database as an sqlite file. I am sure there is some simple fix I am overlooking but it would be great if somebody could point me in the right direction.

share|improve this question

migrated from Oct 13 '12 at 6:23

This question came from our site for professional and enthusiast programmers.

Using SQlite on Heroku is really dangerous because as soon as the process completes, all your data will be lost. Is there a reason you are not using the free Postgres database that Heroku provides? – Max Dunn Oct 10 '12 at 19:50
It was my first heroku app and my first rails app at the time. The point of the backup is so that I can migrate to postgres. Also, the process has been restarted many times and I have not lost my data so I do not think you are right about that. – Danny Dyla Oct 10 '12 at 20:04
SQLite can be in-memory, or on disk. I'd say it's using the on-disk option. – Greg Oct 10 '12 at 21:31
Heroku apps usually cannot use sqlite3 databases. Sure about that fact? – Thomas Klemm Oct 11 '12 at 8:02
actually no. but my yaml file says it is configured that way. I suppose it would be easy for heroku to override that yaml file when i push to their servers. – Danny Dyla Oct 11 '12 at 14:51
up vote 1 down vote accepted

Ended up using heroku db:pull <local_filename>

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.