1

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.

Tom O'Connor
  • 27,440
  • 10
  • 72
  • 148
Danny Dyla
  • 153
  • 4
  • 1
    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? –  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? –  Oct 11 '12 at 08: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

1 Answers1

1

Ended up using heroku db:pull <local_filename>

Danny Dyla
  • 153
  • 4