Switch Repository from Installed PostgreSQL to External PostgreSQL

Switch Repository from Installed PostgreSQL to External PostgreSQL

✅ Enterprise: AWS, Azure, GCP, and On-Premises

✅ Marketplace: AWS, Azure, and GCP

✅ SaaS: AWS, Azure, and GCP

✅ Single Node Installation (SNI)


Prerequisites

  • Stop all Kyvos services.

  • Stop Kyvos Manager.

  • Ensure you have access to both installed and external PostgreSQL servers.

  • Use pg_dump version 16.9 or lower. (Do not use version 16.10 or higher — remove \restrict and \unrestrict entries if already used.)

  • Ensure the KM and Kyvos repository passwords in installed PostgreSQL are the same as those configured in the external PostgreSQL.

Step 1: Switch Kyvos Manager Repository

  1. Export KM Repository Dump

    pg_dump -U postgres -h <installed_host> -p <port> -d <kyvos_database> -f <kyvos_dump_path> -or- ./pg_dump -c -C --host=localhost --port=45421 --dbname=delverepo --user=postgres > kyvosdbdump.sql
  2. Import Dump to External PostgreSQL

    psql -U postgres -h <external_host> -p <port> -d <km_database> -f <km_dump_path>
  3. Update Kyvos Manager Configuration

    1. Open the jdbc.properties file from the Kyvos Manager configuration path.

    2. Update or add the following:

      installedRepo=false repoIdentifier=<external_repo_identifier> jdbc.url=<external_postgres_jdbc_url>
    3. Save the file.

  4. Start Kyvos Manager

    1. Start the Kyvos Manager service.

    2. Verify that it connects successfully to the external PostgreSQL repository.

Step 2: Switch Kyvos Repository

  1. Export Kyvos Repository Dump

    pg_dump -U postgres -h <installed_host> -p <port> -d <kyvos_database> -f <kyvos_dump_path> -or- ./pg_dump -c -C --host=localhost --port=45421 --dbname=delverepo --user=postgres > kyvosdbdump.sql
  2. Import Dump to External PostgreSQL

    psql -U postgres -h <external_host> -p <port> -d <kyvos_database> -f <kyvos_dump_path>
  3. Switch Repository for Kyvos (via KM UI)

    • Log in to Kyvos Manager.

    • Go to Configuration → Repository → Switch Repository.

    • Select External Repository.

    • Provide external PostgreSQL connection details.

    • Click Switch Repository.

  4. Automatic Configuration Update

    • Kyvos Manager automatically updates Kyvos configuration for external PostgreSQL.

    • No manual edits are required.

Step 3: Post-Switch Activities

  1. Stop Installed PostgreSQL Service

    sudo systemctl stop postgresql
  2. Push KM Data

    • From Kyvos Manager, push KM data and disaster-recovery.sh snapshots.

  3. Verify Connections

    • Ensure both Kyvos and Kyvos Manager are connected to the external PostgreSQL repository.

    • Validate by checking repository-related operations (e.g., connection test, configuration changes).

Validation Checks

  • Confirm that Kyvos Manager successfully connects to the external PostgreSQL repository.

  • Verify that Kyvos services are also connected to the external PostgreSQL repository.

  • Check that all repository-related operations (like saving configuration or switching repositories) work correctly.

  • Ensure that the installed PostgreSQL service is stopped after the switch.

  • Validate that all data and configurations are consistent and no information is missing after migration.

Copyright Kyvos, Inc. 2026. All rights reserved.