alphagov / govuk-docker

GOV.UK development environment using Docker 🐳
MIT License
82 stars 22 forks source link

Fix MongoDB replication for 'other' apps #697

Closed ollietreend closed 1 year ago

ollietreend commented 1 year ago

Some apps have special rules defined in the MongoDB replication script because their database dumps are stored in a special location.

For everything else, there's a bucket called "mongo-normal" in the S3 bucket "govuk-integration-database-backups". For example, the database backups for Travel Advice Publisher are stored under "s3://govuk-integration-database-backups/mongo-normal/".

It looks like the "mongo-normal" directory used to be called "mongo". But that seems to have changed and the MongoDB replication script in this repo has fallen out of date.

Following this change, I'm now able to successfully replicate the Mongo database for Travel Advice Publisher using the command:

gds aws govuk-integration-readonly bin/replicate-mongodb.sh travel-advice-publisher
ollietreend commented 1 year ago

This PR relates to #669. However I believe that PR is still required because Asset Manager seems to have a non-standard filename for its database dumps (i.e. govuk_assets_production rather than asset_manager_production, which is what the * wildcard rule would look for).