GeoPrism Registry Documentation
  • Versions
    • Version 1.0.0
      • 1. Introduction
      • 2. Authors
      • 3. Deployment and setup
        • 3.1. License
        • 3.2. Creating a new installation
          • 3.2.1 System Architecture
          • 3.2.2. Hardware requirements
          • 3.2.3. SSL
          • 3.2.4. Installation, configuration and update
        • 3.3. Organization management
          • 3.3.1. Create an organization
          • 3.3.2. Invite a user to serve as the Registry Administrator for an organization
        • 3.4. Localization
          • 3.4.1. Install a new locale
          • 3.4.2. Export the default localization spreadsheet
          • 3.4.3. Add or edit a locale in the exported localization spreadsheet
          • 3.4.4. Import a new locale from the localization spreadsheet
          • 3.4.5. Switch locale
          • 3.4.6. Uninstall a locale
        • 3.5. System email management
        • 3.6. Branding (Logo)
        • 3.7. FHIR custom implementation
          • 3.7.1. Maven project setup
          • 3.7.2. Create a custom implementation for exporting data to FHIR
          • 3.7.3. Create a custom implementation for importing data from FHIR to GeoPrism Registry
          • 3.7.4. Register the implementations with the Java Services architecture
          • 3.7.5. Deploy implementation to server
        • 3.8. Configuration-based type setup
          • 3.8.1. Import type definitions
          • 3.8.2. Configuration-based type setup
          • 3.8.3. Hierarchy type definitions
          • 3.8.4. Directed acyclic graph type definitions
          • 3.8.5. Undirect graph type definitions
        • 3.9. DHIS2 OAuth integration
          • 3.9.1. Configuring DHIS2
        • 3.10. Database Migrations
      • 4. External system integration
        • 4.1. Available APIs
        • 4.2. Register and synchronize an external system
          • 4.2.1. DHIS2
          • 4.2.2. Reveal
          • 4.2.3. FHIR
      • 5. GeoPrism Registry key components
        • 5.1. Content
          • 5.1.1. Geographic features and geographic objects
          • 5.1.2. Geographic object types and groups
          • 5.1.3. Data elements and classification tables
          • 5.1.4. Hierarchies
          • 5.1.5. Lists
          • 5.1.6. Geospatial data
          • 5.1.7. Data quality
        • 5.2. Content-related capacities of GeoPrism Registry
          • 5.2.1. Changes over time
          • 5.2.2. Unique identifier
          • 5.2.3. Master vs. non-master
          • 5.2.4. Accessibility
          • 5.2.5. Documentation (metadata)
          • 5.2.6. Languages and character encoding
        • 5.3. User roles and rights
          • 5.3.1. Roles
          • 5.3.2. Rights by role
        • 5.4. User interface
          • 5.4.1. Home page
          • 5.4.2. Modules
          • 5.4.3. Settings
      • 6. GeoPrism Registry tutorial
        • 6.1. GeoPrism Registry sandbox
          • 6.1.1. Purpose
          • 6.1.2. Organizations and roles
          • 6.1.3. Content
          • 6.1.4. Access
        • 6.2. Logging in
          • 6.2.1. Local GeoPrism Registry credentials
          • 6.2.2. DHIS2 credentials
        • 6.3. User management
          • 6.3.1. Adding users
          • 6.3.2. Inviting users
          • 6.3.3. Resetting a forgotten password (local GeoPrism Registry credentials)
          • 6.3.4. Changing a password
          • 6.3.5. Enabling OAuth integration
        • 6.4. Content setup
          • 6.4.1. Groups
            • 6.4.1.1. Adding a group
            • 6.4.1.2. Adding a Geo-Object Type to a group
            • 6.4.1.3. Managing the attributes for a Geo-Object Type in a group
            • 6.4.1.4. Editing the metadata of a group
            • 6.4.1.5. Delete a group
          • 6.4.2. Geo-Object Types (outside a group)
            • 6.4.2.1. Adding a Geo-Object Type
            • 6.4.2.2. Managing the attributes of a Geo-Object Type
            • 6.4.2.3. Editing the metadata of a Geo-Object Type
            • 6.4.2.4. Deleting a Geo-Object Type
          • 6.4.3. Hierarchies
            • 6.4.3.1. Adding a hierarchy
            • 6.4.3.2. Managing the content of the hierarchy
            • 6.4.3.3. Editing the metadata of a hierarchy
            • 6.4.3.4. Deleting a hierarchy
        • 6.5. Content management
          • 6.5.1. Lists and spatial data
            • 6.5.1.1. Importing data
            • 6.5.1.2. Creating a set
            • 6.5.1.3. Managing versions of a set
            • 6.5.1.4. Exploring lists and spatial data
            • 6.5.1.5. Editing lists and spatial data
            • 6.5.1.6. Curating lists and spatial data
            • 6.5.1.7. Exporting lists and spatial data
          • 6.5.2. Change requests
            • 6.5.2.1. Submitting a change request
            • 6.5.2.2. Reviewing a change request
          • 6.5.3. Historical events
            • 6.5.3.1. Creating a historical event
            • 6.5.3.2. Exploring historical events
            • 6.5.3.3. Editing a historical event
            • 6.5.3.4. Exporting historical events
    • Version 1.4.x
      • 1. Introduction
      • 2. Authors
      • 3. Deployment and setup
        • 3.1. License
        • 3.2. Creating a new installation
          • 3.2.1 System Architecture
          • 3.2.2. Hardware requirements
          • 3.2.3. SSL
          • 3.2.4. Installation, configuration and update
        • 3.3. Organization management
          • 3.3.1. Create an organization
          • 3.3.2. Invite a user to serve as the Registry Administrator for an organization
        • 3.4. Localization
          • 3.4.1. Install a new locale
          • 3.4.2. Export the default localization spreadsheet
          • 3.4.3. Add or edit a locale in the exported localization spreadsheet
          • 3.4.4. Import a new locale from the localization spreadsheet
          • 3.4.5. Switch locale
          • 3.4.6. Uninstall a locale
        • 3.5. System email management
        • 3.6. Branding (Logo)
        • 3.7. FHIR custom implementation
          • 3.7.1. Maven project setup
          • 3.7.2. Create a custom implementation for exporting data to FHIR
          • 3.7.3. Create a custom implementation for importing data from FHIR to GeoPrism Registry
          • 3.7.4. Register the implementations with the Java Services architecture
          • 3.7.5. Deploy implementation to server
        • 3.8. Configuration-based type setup
          • 3.8.1. Import type definitions
          • 3.8.2. Configuration-based type setup
          • 3.8.3. Hierarchy type definitions
          • 3.8.4. Directed acyclic graph type definitions
          • 3.8.5. Undirect graph type definitions
        • 3.9. DHIS2 OAuth integration
          • 3.9.1. Configuring DHIS2
        • 3.10. Database Migrations
      • 4. External system integration
        • 4.1. Available APIs
        • 4.2. Register and synchronize an external system
          • 4.2.1. DHIS2
          • 4.2.2. Reveal
          • 4.2.3. FHIR
      • 5. GeoPrism Registry key components
        • 5.1. Content
          • 5.1.1. Geographic features and geographic objects
          • 5.1.2. Geographic object types and groups
          • 5.1.3. Data elements and classification tables
          • 5.1.4. Hierarchies
          • 5.1.5. Lists
          • 5.1.6. Geospatial data
          • 5.1.7. Data quality
        • 5.2. Content-related capacities of GeoPrism Registry
          • 5.2.1. Changes over time
          • 5.2.2. Unique identifier
          • 5.2.3. Master vs. non-master
          • 5.2.4. Accessibility
          • 5.2.5. Documentation (metadata)
          • 5.2.6. Languages and character encoding
        • 5.3. User roles and rights
          • 5.3.1. Roles
          • 5.3.2. Rights by role
        • 5.4. User interface
          • 5.4.1. Home page
          • 5.4.2. Modules
          • 5.4.3. Settings
      • 6. GeoPrism Registry tutorial
        • 6.1. GeoPrism Registry sandbox
          • 6.1.1. Purpose
          • 6.1.2. Organizations and roles
          • 6.1.3. Content
          • 6.1.4. Access
        • 6.2. Logging in
          • 6.2.1. Local GeoPrism Registry credentials
          • 6.2.2. DHIS2 credentials
        • 6.3. User management
          • 6.3.1. Adding users
          • 6.3.2. Inviting users
          • 6.3.3. Resetting a forgotten password (local GeoPrism Registry credentials)
          • 6.3.4. Changing a password
          • 6.3.5. Enabling OAuth integration
        • 6.4. Content setup
          • 6.4.1. Groups
            • 6.4.1.1. Adding a group
            • 6.4.1.2. Adding a Geo-Object Type to a group
            • 6.4.1.3. Managing the attributes for a Geo-Object Type in a group
            • 6.4.1.4. Editing the metadata of a group
            • 6.4.1.5. Delete a group
          • 6.4.2. Geo-Object Types (outside a group)
            • 6.4.2.1. Adding a Geo-Object Type
            • 6.4.2.2. Managing the attributes of a Geo-Object Type
            • 6.4.2.3. Editing the metadata of a Geo-Object Type
            • 6.4.2.4. Deleting a Geo-Object Type
          • 6.4.3. Hierarchies
            • 6.4.3.1. Adding a hierarchy
            • 6.4.3.2. Managing the content of the hierarchy
            • 6.4.3.3. Editing the metadata of a hierarchy
            • 6.4.3.4. Deleting a hierarchy
        • 6.5. Content management
          • 6.5.1. Lists and spatial data
            • 6.5.1.1. Importing data
            • 6.5.1.2. Creating a set
            • 6.5.1.3. Managing versions of a set
            • 6.5.1.4. Exploring lists and spatial data
            • 6.5.1.5. Editing lists and spatial data
            • 6.5.1.6. Curating lists and spatial data
            • 6.5.1.7. Exporting lists and spatial data
          • 6.5.2. Change requests
            • 6.5.2.1. Submitting a change request
            • 6.5.2.2. Reviewing a change request
          • 6.5.3. Historical events
            • 6.5.3.1. Creating a historical event
            • 6.5.3.2. Exploring historical events
            • 6.5.3.3. Editing a historical event
            • 6.5.3.4. Exporting historical events
    • ສະບັບ 1.4.x (ພາສາລາວ)
      • 1. ບົດນຳ
      • 2. ຜູ້ຂຽນ
      • 3. ການນໍາໃຊ້ ແລະ ການຕັ້ງຄ່າ
        • 3.1. ໃບອະນຸຍາດ
        • 3.2. ການສ້າງການຕິດຕັ້ງໃໝ່
          • 3.2.1. ລະບົບສະຖາປັດຕະຍະກໍາ
          • 3.2.2. ຂໍ້ກຳນົດດ້ານຮາດແວ
          • 3.2.3. SSL
          • 3.2.4. ການຕິດຕັ້ງ, ການກຳນົດຄ່າ ແລະ ການປັບປຸງ
        • 3.3. ການຈັດການອົງກອນ
          • 3.3.1. ການສ້າງອົງກອນ
          • 3.3.2. ເຊີນຜູ້ໃຊ້ໃຫ້ເຮັດໜ້າທີ່ເປັນຜູ້ບໍລິຫານການລົງທະບຽນ (Registry Administrator) ສຳລັບອົງກອນ
        • 3.4. ການກຳນົດທ້ອງຖິ່ນ
          • 3.4.1. ຕິດຕັ້ງພາສາທ້ອງຖິ່ນໃໝ່
          • 3.4.2. ການສົ່ງອອກຕາຕະລາງພາສາທ້ອງຖິ່ນເລີ່ມຕົ້ນ
          • 3.4.3. ການເພີ່ມ ຫຼື ການແກ້ໄຂພາສາໃນຕາຕະລາງພາສາທ້ອງຖິ່ນທີ່ສົ່ງອອກ
          • 3.4.4. ການນໍາເຂົ້າພາສາໃໝ່ຈາກຕາຕະລາງພາສາທ້ອງຖິ່ນ
          • 3.4.5. ການສະຫຼັບພາສາ
          • 3.4.6. ຖອນການຕິດຕັ້ງພາສາ
        • 3.5. ການຈັດການອີເມວຂອງລະບົບ
        • 3.6. ຍີ່ຫໍ້ (ໂລໂກ້)
        • 3.7. ການຕິດຕັ້ງ FHIR ແບບກຳນົດເອງ
          • 3.7.1. ການຕິດຕັ້ງໂຄງການ Maven
          • 3.7.2. ສ້າງການຕິດຕັ້ງແບບກຳນົດເອງສຳລັບການສົ່ງອອກຂໍ້ມູນໄປຍັງ FHIR
          • 3.7.3. ສ້າງການຕິດຕັ້ງແບບກໍານົດເອງສໍາລັບການນໍາເຂົ້າຂໍ້ມູນຈາກ FHIR ໄປຫາ GeoPrism Registry
          • 3.7.4. ການລົງທະບຽນການຕິດຕັ້ງສ້າງສະຖາປັດຕະຍະກໍາລະບົບ Java Services
          • 3.7.5. ການນຳໃຊ້ຕິດຕັ້ງເທິງລະບົບ
        • 3.8. ການຕັ້ງຄ່າ ຄ່າກຳນົດ (configuration-based type setup)
          • 3.8.1. ຄຳນິຍາມຂອງປະເພດການນຳເຂົ້າ
          • 3.8.2. ການກຳນົດຄ່າປະເພດໂດຍອີງໃສ່ການຕັ້ງຄ່າ (configuration-based type setup)
          • 3.8.3. ຄຳນິຍາມຂອງປະເພດ hierarchy
          • 3.8.4. ຄຳນິຍາມຂອງປະເພດກຣາຟ acyclic ທີ່ມີໂຕຊີ້ບອກ (directed acyclic graph)
          • 3.8.5. ຄຳນິຍາມຂອງປະເພດກຣາຟທີ່ບໍ່ມີທິດທາງ (undirected graph)
        • 3.9. ການເຊື່ອມກັນຂອງ DHIS2 OAuth (DHIS2 OAuth integration)
          • 3.9.1. ການກຳນົດຄ່າ DHIS2
        • 3.10. ການໂອນຍ້າຍຖານຂໍ້ມູນ (database migrations)
      • 4. ການເຊື່ອມໂຍງລະບົບພາຍນອກ
        • 4.1. APIs ທີ່ມີຢູ່
        • 4.2. ການລົງທະບຽນ ແລະ ການເຊື່ອມຕໍ່ລະບົບພາຍນອກ
          • 4.2.1. DHIS2
          • 4.2.2. Reveal
          • 4.2.3. FHIR
      • 5. ອົງປະກອບທີ່ສໍາຄັນ GeoPrism Registry
        • 5.1. ເນື້ອໃນ
          • 5.1.1. ລັກສະນະທາງພູມິສາດ ແລະ ວັດຖຸທາງພູມິສາດ
          • 5.1.2. ປະເພດວັດຖຸ ແລະ ກຸ່ມພູມິສາດ
          • 5.1.3. ອົງປະກອບຂໍ້ມູນ ແລະ ຕາຕະລາງການຈັດປະເພດ
          • 5.1.4. ລໍາດັບຊັ້ນ ຫຼື ໂຄງຮ່າງການຈັດຕັ້ງ
          • 5.1.5. ບັນຊີລາຍການ
          • 5.1.6. ຂໍ້ມູນທາງພູມິສາດ
          • 5.1.7. ຄຸນນະພາບຂໍ້ມູນ
        • 5.2. ຄວາມສາມາດທີ່ກ່ຽວຂ້ອງກັບເນື້ອຫາຂອງ GeoPrism Registry
          • 5.2.1. ການປ່ຽນແປງຕາມເວລາ
          • 5.2.2. ຕົວລະບຸຕົວຕົນທີ່ເປັນເອກະລັກ
          • 5.2.3. ຕົ້ນສະບັບ ແລະ ບໍ່ແມ່ນຕົ້ນສະບັບ
          • 5.2.4. ການເຂົ້າເຖິງ
          • 5.2.5. ເອກະສານປະກອບ (metadata)
          • 5.2.6. ພາສາ ແລະ ການເຂົ້າລະຫັດຕົວອັກສອນ
        • 5.3. ບົດບາດ ແລະ ສິດຂອງຜູ້ໃຊ້
          • 5.3.1. ບົດບາດ
          • 5.3.2. ສິດທິຕາມພາລະບົດບາດ
        • 5.4. ການໂຕ້ຕອບຜູ້ໃຊ້
          • 5.4.1. ໜ້າຫຼັກ
          • 5.4.2. ໂມດູນ
          • 5.4.3. ການຕັ້ງຄ່າ
      • 6. ການສອນ GeoPrism Registry
        • 6.1. GeoPrism Registry sandbox
          • 6.1.1. ຈຸດປະສົງ
          • 6.1.2. ອົງກອນ ແລະ ພາລະບົດບາດ
          • 6.1.3. ເນື້ອໃນ
          • 6.1.4. ການເຂົ້າເຖິງ
        • 6.2. ການເຂົ້າສູ່ລະບົບ
          • 6.2.1. ຂໍ້ມູນຮັບຮອງ local GeoPrism Registry
          • 6.2.2. ຂໍ້ມູນຮັບຮອງ DHIS2
        • 6.3. ການຈັດການຜູ້ໃຊ້
          • 6.3.1. ການເພີ່ມຜູ້ໃຊ້
          • 6.3.2. ການເຊີນຜູ້ໃຊ້
          • 6.3.3. ການຕັ້ງຄ່າລະຫັດຜ່ານໃໝ່ຈາກການລືມລະຫັດ (ຂໍ້ມູນຮັບຮອງ local GeoPrism Registry)
          • 6.3.4. ການປ່ຽນລະຫັດຜ່ານ
          • 6.3.5. ເປີດໃຊ້ການເຊື່ອມໂຍງ OAuth
        • 6.4. ການຕັ້ງຄ່າເນື້ອຫາ
          • 6.4.1. ກຸ່ມ
            • 6.4.1.1. ການເພີ່ມກຸ່ມ
            • 6.4.1.2. ການເພີ່ມ Geo-Object Type ໃສ່ກຸ່ມ
            • 6.4.1.3. ການຈັດການຄຸນລັກສະນະສໍາລັບ Geo-Object Type ໃນກຸ່ມ
            • 6.4.1.4. ການແກ້ໄຂ metadata ຂອງກຸ່ມ
            • 6.4.1.5. ການລຶບກຸ່ມ
          • 6.4.2. Geo-Object Type (ນອກກຸ່ມ)
            • 6.4.2.1. ການເພີ່ມ Geo-Object Type
            • 6.4.2.2. ການຈັດການຄຸນລັກສະນະຂອງ Geo-Object Type
            • 6.4.2.3. ການແກ້ໄຂ metadata ຂອງ Geo-Object Type
            • 6.4.2.4. ການລຶບ Geo-Object Type
          • 6.4.3. Hierarchies
            • 6.4.3.1. ການເພີ່ມລຳດັບຊັ້ນ
            • 6.4.3.2. ການຈັດການເນື້ອໃນຂອງລໍາດັບຊັ້ນ
            • 6.4.3.3. ການແກ້ໄຂ metadata ຂອງລໍາດັບຊັ້ນ
            • 6.4.3.4. ການລຶບລຳດັບຊັ້ນ
        • 6.5. ການຈັດການເນື້ອຫາ
          • 6.5.1. ລາຍການ ແລະ ຂໍ້ມູນພື້ນທີ່
            • 6.5.1.1. ການນຳເຂົ້າຂໍ້ມູນ
            • 6.5.1.2. ການສ້າງຊຸດ
            • 6.5.1.3. ການຈັດການລຸ້ນຂອງຊຸດ
            • 6.5.1.4. ການຄົ້ນຫາລາຍການ ແລະ ຂໍ້ມູນພື້ນທີ່
            • 6.5.1.5. ແກ້ໄຂລາຍການ ແລະ ຂໍ້ມູນພື້ນທີ່
            • 6.5.1.6. ຈັດການລາຍການ ແລະ ຂໍ້ມູນພື້ນທີ່
            • 6.5.1.7. ການສົ່ງອອກລາຍການ ແລະ ຂໍ້ມູນພື້ນທີ່
          • 6.5.2. ການປ່ຽນແປງຄຳຮ້ອງຂໍ
            • 6.5.2.1. ການສົ່ງຄໍາຮ້ອງຂໍການປ່ຽນແປງ
            • 6.5.2.2. ການກວດສອບຄຳຮ້ອງຂໍການປ່ຽນແປງ
          • 6.5.3. ເຫດການທີ່ເກີດຂຶ້ນມາກ່ອນ (Historical events)
            • 6.5.3.1. ການສ້າງ historical event
            • 6.5.3.2. ການສຳຫຼວດ historical events
            • 6.5.3.3. ການແກ້ໄຂ historical events
            • 6.5.3.4. ການສົ່ງອອກ historical events
  • Fundamentals
    • Glossary of terms
  • API Documentation
  • Install from Docker Hub
Powered by GitBook
On this page
  • Orient DB Migration
  • PostgreSQL Migration
Edit on GitHub
Export as PDF
  1. Versions
  2. Version 1.0.0
  3. 3. Deployment and setup

3.10. Database Migrations

Previous3.9.1. Configuring DHIS2Next4. External system integration

Last updated 2 years ago

Although we try our best to automatically migrate your server when upgrading versions, there are times when this is simply not possible. In this section we will attempt to cover some of the most common migrations you might encounter when running our software yourself via a Docker container.

Do not attempt to upgrade beyond more than two major GeoPrism Registry versions at a time.

The general steps for performing any sort of migration can be broken down as follows:

  1. Create a clone environment of your production server where we will test these steps

  2. Perform all required steps as outlined in the "Orient DB Migration" and/or "PostgreSQL Migration" sections below on the cloned environment, keeping track of the exact commands relevant for your environment and making note of any issues or cavaets.

  3. Set your docker-compose.yml file (in the test environment) to the new GeoPrism Registry / Postgres / OrientDB versions and run docker compose down then docker compose pull. Then do a docker compose up. When the GeoPrism Registry boots, it will automatically run any additional patches or migration scripts as necessary. Be patient as this step can take time.

  4. Check the logs for any errors and make sure the test server is operational and responding.

  5. Allocate a "downtime window" for your server so as to disturb users as little as possible

  6. Perform a snapshot / backup of your production server

  7. Stop the webserver with docker stop georegistry

  8. Perform the steps exactly as they were performed on the test environment, except this time on the live production environment

Orient DB Migration

If a newer version of the GeoPrism Registry requires a major upgrade of your Orient DB software, a manual data migration must be performed.

The official OrientDB migration documentation can be found here:

Since the official OrientDB migration documentation can be either confusing, lacking in detail, or simply not targeted towards the way we use their software, we will walk you through the detailed steps here.

  1. Stop the webserver with docker stop georegistry

  2. Create a database dump of the Orient DB server. This command includes variables (starting with $) which must be replaced before running. docker exec georegistry-orientdb bash -c 'bin/console.sh "connect remote:localhost/georegistry $ORIENTDB_ROOT_USER $ORIENTDB_ROOT_PASS; export database /orientdb/backup/$ORIENTDB_MAJOR_VERSION.json"'

    1. The default orientdb root username is 'root'

    2. The default orientdb root password is 'root'

    3. The OrientDB major version should not include the fix version. For example, '3.2'.

  3. Kill the Orient DB server docker rm -f georegistry-orientdb

  4. Remove all data inside the mounted volume rm -rf data/orientdb/databases/*

  5. Run Orient DB of the new version. This command includes variables (starting with $) which must be replaced before running. docker run --name georegistry-orientdb2 -e ORIENTDB_ROOT_PASSWORD="$ORIENTDB_ROOT_PASS" -e ORIENTDB_OPTS_MEMORY="-Xms512M -Xmx2G" -d -v /data/orientdb/databases:/orientdb/databases -v /data/orientdb/backup:/orientdb/backup orientdb:$ORIENTDB_MAJOR_VERSION

  6. Import the backup into the new Orient DB. This command includes variables (starting with $) which must be replaced before running. docker exec georegistry-orientdb2 bash -c 'bin/console.sh "CREATE DATABASE remote:localhost/georegistry $ORIENTDB_ROOT_USER $ORIENTDB_ROOT_PASS; connect remote:localhost/georegistry $ORIENTDB_ROOT_USER $ORIENTDB_ROOT_PASS; import database /orientdb/backup/$ORIENTDB_MAJOR_VERSION.json.gz"'

  7. Kill the temporary Orient DB server docker rm -f georegistry-orientdb2

PostgreSQL Migration

Upgrading PostgreSQL is fairly straightforward and reliable.

The official PostgreSQL migration documenation can be found here:

The basic steps for performing an upgrade on our default docker compose environment are as follows:

  1. Stop the webserver with docker stop georegistry

  2. Run a new Postgres of the new version. This command includes variables (starting with $) which must be replaced before running. docker run --name georegistry-postgres2 -d -p 5482:5432 --network $CGR_DOCKER_NETWORK --link georegistry-postgres -v /data/postgres-migrate:/var/lib/postgresql/data -e POSTGRES_PASSWORD=$POSTGRES_ROOT_PASSWORD postgis/postgis:$NEW_POSTGRES_VERSION

    1. The default postgres root username is postgres.

    2. The default postgres root password is georegistry.

    3. The NEW_POSTGRES_VERSION variable is a Docker image tag and should also include a PostGIS version. For example, '14-3.2'.

    4. The value for the CGR_DOCKER_NETWORK variable can be found by running docker inspect georegistry-postgres. The georegistry network name is autogenerated and will be listed in the "Networks" section of the inspect output.

  3. Restore old Postgres into new Postgres. This command includes variables (starting with $) which must be replaced before running. docker exec -t georegistry-postgres2 bash -c "(PGPASSWORD=$POSTGRES_ROOT_PASSWORD pg_dumpall --host georegistry-postgres --port 5432 --username postgres --no-password && echo -e \"\n\nALTER ROLE postgres PASSWORD '$POSTGRES_ROOT_PASSWORD';\" && echo -e \"\n\nALTER ROLE georegistry PASSWORD '$POSTGRES_APP_PASSWORD';\") | psql -d postgres --host 127.0.0.1 --port 5432 --username postgres --no-password"

    1. The default Postgres app password is georegistry.

  4. Delete temporary Postgres containers docker rm -f georegistry-postgres && docker rm -f georegistry-postgres2

  5. Delete the old Postgres data directory rm -rf /data/postgres

  6. Copy the postgres data from the new version to the standard directory mv /data/postgres-migrate /data/postgres

http://www.orientdb.com/docs/last/release/Upgrade.html
https://www.postgresql.org/docs/current/upgrading.html#UPGRADING-VIA-PGDUMPALL