Import on a different machine to my docker container #306
-
Hi, I have run the import on a stand alone machine and now want to move the necessary files to the docker container. I assume I need to move the PROJECT_DIR but I can't see how to tell docker where it is!! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
I think I don't understand what you're trying to do. If you have completed the import then the files are already in the container, namely in the postgres database. |
Beta Was this translation helpful? Give feedback.
-
Argh, Sorry I was unclear. The machine that I use for docker is not well specced enough to undertake the import, so I ran it on completely different hardware. I now want to have nominatim running on my docker machine in a docker container but using the import I created on the different hardware |
Beta Was this translation helpful? Give feedback.
-
For that I would use the docker import/export functionality: https://bobcares.com/blog/docker-export-and-import-containers/ |
Beta Was this translation helpful? Give feedback.
-
Well, the pgdump way would still work. You need to open the postgres port and point pgdump to use the postgres instance inside the container. I have never tried it with nominatim though. |
Beta Was this translation helpful? Give feedback.
-
Ok...So I finally achieved what I wanted. In case it helps anyone else. (I am sure this is not optimum but hey ho it worked at least for me) Created the docker container using the smallest (Andorra) map (2mb). This took a minute or so. I set the container with the persistence config as per standard instructions. |
Beta Was this translation helpful? Give feedback.
Ok...So I finally achieved what I wanted. In case it helps anyone else. (I am sure this is not optimum but hey ho it worked at least for me)
My Objective was to create Nominatim on a non-docker pc and then move the database to a docker container running on a separate pc.
(I did not want my docker PC to undertake the load of the first import).
Created the docker container using the smallest (Andorra) map (2mb). This took a minute or so. I set the container with the persistence config as per standard instructions.
Ran the install and import (of Great Britain) on my separate non-docker pc (took about 6 hours).
Copied /var/lib/postgresql/12/main from the non-docker pc to a location that I cou…