Skip to content
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

Clone overpass docker container with data to another VM issue #105

Open
koldova opened this issue Jul 1, 2023 · 1 comment
Open

Clone overpass docker container with data to another VM issue #105

koldova opened this issue Jul 1, 2023 · 1 comment

Comments

@koldova
Copy link

koldova commented Jul 1, 2023

Hello. I need to have running instance of Overpass with asia continent. I get the bz2 file from https://download.geofabrik.de/asia-latest.osm.bz2 and run overpass-api docker with -v to this file. The instance begins to generate files unter /db folder and it takes more than 20 hours by aws to get the service up and running. Thats why if I want to have the instance updated without huge downtime I want to run the overpass-api docker container on another vm and then after all the generation stuff is ready I want just copy the /db folder into the prod VM (dropping the existing one) and restart the docker container on prod. But it is not possible to copy the sockets "osm3s_v0.7.58_areas" and "osm3s_v0.7.58_osm_base". Thats why if i run the overpass-api docker on the prod again it fails saying the socket files are not found. Is there any solution for this?

@wiktorn
Copy link
Owner

wiktorn commented Jul 3, 2023

Hi,

Sockets are objects that are used by runtime so it is not necessary to copy them. What you can do:

  • once the new instance finishes initialization, shut it down, and just use this folder by your current instance
  • copy the files while instance is shutdown (sockets should not be there)
  • ignore the error about sockets

The other thing here is, that this is very expensive way to handle updates. You can set up to download Geofabrik daily updates and you can apply them without shutting down prod instance.

If you need to control, when updated database is released, you can clone the files you have and update the files in separate process / container. As long as you don't have updates running, the database is only read, so no issues with inconsistency. Then once this dataset is ready, you can deploy that on prod as described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants