omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
719 stars 157 forks source link

Imposm3 -deployproduction issue #125

Closed ArmyGuy62 closed 7 years ago

ArmyGuy62 commented 7 years ago

When I run the -deployproduction command I am expecting the db to populate the public and backup tables. See syntax below Imposm can deploy all imported tables by updating the schema of the tables. To move all tables form import to the default schema public: imposm3 import -config on.json -connection postgis://osm:osm@localhost/on -deployproduction This will also remove all existing Imposm tables from backup and it will moves tables from the public to the backup schema. Is this the way it should work? I am trying to create a workflow using the -diff but running the diff to update the db will not work because when you do a deployproduction the tables move from import to public and the diff requires the tables to be in import in order to do an update. Tried to do a revert but that does not work since there are no tables in the backup. Can anyone shed some light on a procedure that will work through these issues. Thanks

olt commented 7 years ago

diff directly operates on -dbschema-production. So, you only call import and -deployproduction once.

ArmyGuy62 commented 7 years ago

Thanks olt How can I position the db to accept a diff call after I have done a -deployproduction command? Since the deploy action moves the tables from import to public....is there a way to copy the data as opposed to moving it out of import?

olt commented 7 years ago

I'm not sure what you mean. You basically do:

See: https://imposm.org/docs/imposm3/3.0.0/tutorial.html

ArmyGuy62 commented 7 years ago

So these are my steps:

  1. imposm3 import -config on.json -read ontario-latest.osm.pbf -write -connection postgis://osm:osm@localhost/on -diff
  2. imposm3 import -config on.json –deployproduction At this point the tables are moved from Import to Public In order to do step 3 there must be tables in the Import schema which are actually moved in the second step.
  3. imposm3 diff -config on.json on_diff.gz My question is.....instead of moving the tables during the -deployproduction command is there a way to just copy them into the Public schema leaving the tables in the Import schema ready to do step 3?
olt commented 7 years ago

diff directly operates on the public schema (or whatever your -dbschema-production is). So, It should just work™.

I'm closing this issue since it seems that this is a configuration/usage issue and we use GitHub only for bugs. Please write to the mailing list for support. Make sure to include your configs, command lines and any error output.