[Tile-serving] [openstreetmap/osm2pgsql] Add a script for simple updating of a database (#1411)
Sarah Hoffmann
notifications at github.com
Thu Feb 4 20:43:09 UTC 2021
As people have been asking for this, here is a simple python script for handling updates of an osm2pgsql database. It takes care of finding the initial state and then downloading updates and running osm2pgsql against them. The state is kept in a table in the same database as osm2pgsql.
Quick use:
1. Import your database: `osm2pgsql -d gis -s -S default.style liechtenstein.osm.pbf`
2. a) Initialise update from the import file: `osm2pgsql-replication init -d gis --osm-file iechtenstein.osm.pbf`
or b) Initialise updates from database (uses minutelies per default): `osm2pgsql-replication init -d gis`
3. Run updates: `osm2pgsql-replication update -d gis -- -S default.style`
The script does not check that it is already running, so be careful when using with cron.
Needs python3, pyosmium and psycopg2. On a Ubuntu/Debian install with: `sudo apt install python3-osmium python3-psycopg2`
Try it out and let me know if that would be useful or not.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1411
-- Commit Summary --
* add a script for simple updating of a database
-- File Changes --
A osm2pgsql-replication (338)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1411.patch
https://github.com/openstreetmap/osm2pgsql/pull/1411.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210204/1e71b91d/attachment.htm>
More information about the Tile-serving
mailing list