linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Restore data to database instance running in Docker container #90

Closed SPlanzer closed 4 years ago

SPlanzer commented 4 years ago

@strk perhaps this is something you can help with.

The DB docker container requires a method for restoring data into the gazetteer database

I have done a custom (~300mb) and plain (~800mb) data only dump of the prd gazetteer DB. I will send you a presigned links to these in the projects slack channel

* Note some data is installed into the DB via /src/sql/gazetteer_sysdata.sql

For testing we may use a subset or just manually create test data. However for UAT a full dataset installed into the docker DB container will be useful.

strk commented 4 years ago

Do you also need a way to create such dump ? Because install_web.sh does create a gaz_web_config_dump_local.202004091337.psql file (with appropriate timestamp) whenever it is called with the drop argument against a database which already has a configuration. Do we need something similar for other data ? Or how do we define what is the data we want to restore ?

Restoring the data would require creating a user with login capability under the gazadmin role. Do you want the data loaded in the docker image or a script to load them in a volatile container ?

SPlanzer commented 4 years ago

Do you also need a way to create such dump ? Because install_web.sh does create a gaz_web_config_dump_local.202004091337.psql file (with appropriate timestamp) whenever it is called with the drop argument against a database which already has a configuration. Do we need something similar for other data ? Or how do we define what is the data we want to restore ?

Restoring the data would require creating a user with login capability under the gazadmin role. Do you want the data loaded in the docker image or a script to load them in a volatile container ?

@strk thanks for the response. This seems like a fair bit of work(?) I wonder if this should be on hold until we fully understand the priorities. To me this is heavily tied to how UAT will be undertaken and in what environment. Though in saying that, for me, data in the DB is definitely a "nice to have"

There are three reasons for having data restored into the docker container

strk commented 4 years ago

For the moment, in this branch, there's a user gazadmin with password gazadmin that can be used to load data.

strk commented 4 years ago

I filed PR #91 to document how data can be loaded, at least as a stub. It's based on the 2to3 branch

SPlanzer commented 4 years ago

tests specific issue now managing this (#105)