Applying weekly changesets-latest to database

Hi all,

I am sorry to ask this probably no-brainer question, but I am really struggling to understand how I can apply the weekly changeset to my database.
I have imported the full planet-latest.osm.pbf from last week with osm2pgsql following instructions from here: https://switch2osm.org/serving-tiles/using-an-all-in-one-solution/

My map server works absolutely fine.

Now I have downloaded today’s changesets-latest.osm and I am trying to apply that as well. This is the command I try:

osm2pgsql  -d gis --slim -G --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua  -C 32000 --number-processes 15 -S ~/src/openstreetmap-carto/openstreetmap-carto.style -e 1-17 -o expire.list --append /data/source_map_data/changesets-latest.osm

(I have unzipped the changeset file).

This starts, says “parse time 403s” and then decides there are zero changes to be applied. I get a lengthy printout like:

Using XML parser.
  parse time: 403s
Node stats: total(0), max(0) in 0s
Way stats: total(0), max(0) in 0s
Relation stats: total(0), max(0) in 0s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

etc. and finally a successful completion, but nothing was changed.

I have tried googling around and in some pages there is talk about using osmosis to process the data. I tried running Osmosis as well, but it does not seem to recognise my diff file as “OSM Change XML file” and crashes there. I do not plan to set up any “minute” updates, as the server will be off the public internet as soon as it is ready, and I was planning on importing only weekly changes.

Am I completely on the wrong track here? What is the process of applying the changeset? Can I apply it directly to my database with osm2pgsql or do I need to first apply it to my planet-latest.osm.pbf and then importing that again with --update option? Or something else?

H

You might find https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1604_tileserver_load#Updating_your_database_as_people_edit_OpenStreetMap helpful. That uses mod_tile’s “openstreetmap-tiles-update-expire” script; in there you can see the options that it passes to osm2pgsql.

Update_expire seems to rely on stuff downloaded from the internet (minute diffs), instead of the weekly change file from http://planet.openstreetmap.org/

I tried running osmosis on the changeset file but it rejected it as not being “OSM change xml file”. As I wrote, this will be an offline server and the weekly maintenance would include importing the changeset using removable media, and then processing it. This is what I try to do, but I have not gotten anywhere with it. My osm2pgsql parameters do not look too bad, but my source file is not osmosis create diff set but the one downloaded from openstreetmap.org.