Update graphhopper's pbf data

Hi All,

If I’m running graphhopper in a container on k8s, with a volume mapped to persistent storage, what is the best way to update the pbf / mapping data? I can tolerate downtime while this happens, but I’m unsure if I should try to delete the pbf image or if there is a flag I can pass to graphhopper to tell it to ask for new data from the OSM server.

GraphHopper only reads the pbf file during the initial import. It then stores its data in the graph.location/graph-cache folder. It won’t matter if you delete the pbf file afterwards. To update your server you need to restart GraphHopper with an updated graph folder.

Since importing a graph can be quite time consuming for large maps, we use a seperate batch job to prepare the graph-cache folder on object store and switch over to new graphhopper instances by copying the graph-cache back from object-store with no downtime.

1 Like

You still need to restart GraphHopper, don’t you?

We starting new instances … this is what I was trying to write with “switching over” . So yes, sorry for being imprecise.

1 Like