I had and app on heroku
then I decided to create another app (on cedar stack which does not support stack:migrate).
How can I migrate databases PG and MongoHq?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can migrate MongoHQ by logging into heroku and clicking on addons => mongohq. From the application, create a new user under Database Users named “backup” with a simple password. Below, my password was “temppw”. Then click the Database Info tab for your connection information (host:port [flame.mongohq.com:27049] and dbname [appXXXXXX]). Then just call mongodump to get a backup.
This will make a local directory called “dump” containing your data. Verify it is there by loading it into a local db (just run mongorestore and look in your local mongo install) – because when you destroy your old app, it destroys the MongoDB (heroku also destroys your postgres db – so you should do this for that as well).
Anyway, do the same as above to your new application database, except use mongorestore.
DO NOT JUST POINT THE ENVIRONMENT URLS. This is dangerous, because deleting your initial app will destroy all of your data.