This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Real-Time Download whole OSM database

0

Hi! I am interested in downloading the whole database at real-time, both for backup and rendering. How can I do so? Thanks!

Download PostgreSQL backend database shown in image: Component Overview

asked 07 Dec '16, 05:25

Wetitpig0's gravatar image

Wetitpig0
307161928
accept rate: 10%

edited 07 Dec '16, 06:35


One Answer:

3

You will have to download the planet file from planet.openstreetmap.org and import it into a database on your side. Once you have done this, you can download daily, hourly, or even minutely updates from OpenStreetMap and apply them to your database to remain current. Most people choose osm2pgsql for importing the data into a PostGIS database which is very good for rendering, but it is a lossy process that does not capture all information from the source data. If you would like to capture all information from OSM then you would be looking at producing an "APIDB" style database with the osmosis utility but that, in turn, is less suitable for rendering.

answered 07 Dec '16, 08:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

So it cannot be directly downloaded. We must rely on planet.osm?

(07 Dec '16, 09:01) Wetitpig0
2

Can you explain what you mean by "So it cannot be directly downloaded"? Downloading from planet.osm (or a mirror) is a download of the OpenStreetMap data. What happens to it next depends on what you want to do with it - some data is almost always lost as it is moved into a database designed to support whatever the user wants to do with it (rendering, searching, something else).

(07 Dec '16, 10:36) SomeoneElse ♦
3

No, you cannot directly download the OSM database that is being used on the live system, for a number of reasons - not only technical (too much impact on running system, requirement of exact same PostGIS version on receiving side etc.), but also administrative (not everything in the OSM database is public).

(07 Dec '16, 12:14) Frederik Ramm ♦

Source code available on GitHub .