New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to restore the PostgreSQL database of heroku to PostgreSQL in docker #2435
Comments
I am not sure how Heroku exports databases, if the backup only contains the tables and data (without creating the database itself) you first need to drop the current database in your docker container, recreate it with an empty one and then restore your backup:
|
@dsander I searched a lot and still couldn't find the data file on the docker container😖. I deployed huginn on CentOS 7 with this app and following this manual. I only installed the PostgreSQL rather than MySQL. The command I also find this reminder I also don't know how to choose CentOS and Ubuntu. I need it running more stably and less memory usage and more easy to solve the problem. Can you give me some advice? 😹 |
Which data file, didn't you download the database backup from heroku? I looked at the Heroku documentation and those commands should work (run them on the docker host machine):
That wiki page looks a bit dated, the recommendation is correct though (but only applies when not using docker) applications should not be under the postgres user but use their own.
In my experience PostgreSQL causes less headache than MySQL. |
@dsander Tried many times and finally solved this😹. Hope this could help others. First, get the data file from heroku.
Second, download the data file into host.
Third, drop database.
Then, I jumped over the step and did the next.
Done. |
Nice! |
I've been running huginn on heroku and the database is PostgreSQL. Now I've got a VPS with huginn and PostgreSQL installed on docker. I've already backed up and exported the database from heroku website. I want to know could this data be used on docker and how to restore it.
The text was updated successfully, but these errors were encountered: