Switching Kyvos Repository

Switching Kyvos Repository

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


The section provides information on the following:

Important points

  • From Kyvos 2025.10 onwards, heterogeneous repository types are no longer supported.

  • Switching will only be allowed across repository types same as Kyvos Manager. Switching Kyvos repository to a repository type which is not the same as Kyvos Manager is not supported. If you want to change the repository type for Kyvos, first change the repository type for Kyvos Manager.

  • You can see the last operation details, including progress status and start time, by clicking the i icon. To view more comprehensive details, simply click the View Details link, which will take you to the Operations page, where you can view the operation information in detail. 

  • To avoid semantic model data loss, ensure that before switching ensure property “OBSOLETE_CUBE_PURGE_FREQUENCY“ is set in biserver.properties by increasing the value for it to desired frequency value in which verification that switching worked well can be complete. 

  • If the target repository password is different then only for connection testing purposes password can be specified in provided optional input. If not specified explicitly, Kyvos Manager will use the existing password configured in the system for validating the connection. This is not applicable to GCP.

  • Before switching the repository ensure that you have data ready in the target Postgres instance to which you are switching.

  • Dump import and export can be done using pgdump and psql. However, in case of external to external repository change service on the snapshot offered by the cloud can be used to take snapshot from source Postgres and restore it in destination Postgres.

  • Username and Password and database name in target Postgres instance to which switching to is expected to be same as that of current in-use Postgres instance.

  • Rollback Scenario: If after an upgrade, the repository is switched then before performing rolling back, ensure it is switched back to the original repository.

  • Permissions required in role attached on Kyvos Manager node remains same as that of required for automated deployed in case of external repository thus for switching from external repository to external repository no additional permission is required in the role added on Kyvos Manager node.

  • For switching from bundled to an external repository, you need to add permission on the role attached to the Kyvos Manager node so that fetch or external repository details work. If permission is not added to the role, then the Fetch Details will not work. However, you can still proceed ahead by providing those details manually on provided UI inputs.

  • If switching to an external repository, then proper network access should be configured.

  • The security group must have a role granting access to the port used by external repo from BI Server and Kyvos Manager node if it is in the same region and resource group (For Azure Postgres) as that of the cluster.

  • Following tags are expected on the external repository:

    • UsedBy - Kyvos

    • ROLE - DATABASE

    • LAYER - Metadata_Storage

  • For GCP CloudSQL, the following privileges required while importing dump to external repository:
    GRANT ALL PRIVILEGES ON DATABASE your_database_name TO your_username;
    GRANT new_owner TO current_user WITH SET TRUE;
    GRANT kmdbuser TO postgres WITH SET TRUE;

Using commands to import and export database

Note:

Database name is fixed and always required as delverepo.

For import and export, run the below commands from kyvos/Postgres/bin folder of Kyvos Manager machine.

Connect to Database from terminal

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{KYVOS_HOME}/Postgres/lib:{KYVOS_HOME}/Postgres/librhel8 ./psql -h <HOST-NAME> -p <PORT> -U <USER-NAME>

Database dump Import

Before importing, if database is not created automatically, you must manually create database first using create database command

Execute one of the following commands:

./psql -U <USER-NAME> -p <PORT> -h <HOST-NAME> -d <DATABASE-NAME> -f <FILE-NAME> ./psql -U <USER-NAME> -p <PORT> -h <HOST-NAME> -d <DATABASE-NAME> < <PATH-TO-FILE-IN-WHICH-CONTAINS-EXPORTED-DUMP>

The following tables describes the sample commands. This is ONLY for reference.

Repository

Sample command (for Kyvos database ONLY)

Repository

Sample command (for Kyvos database ONLY)

Import to bundled

./psql -U postgres -p 45421 -h localhost -d delverepo -f db-dump.sql

Import to external 

AWS:
./psql -U postgres -p <> -h <> -d delverepo -f db-dump.sql
Azure:
./psql -U postgres -p 5432 -h kyvos-postgresserver-1010.postgres.database.azure.com -d delverepo -f db-dump.sql
GCP:
./psql -U postgres -p 5432 -h 10.243.140.5 -d delverepo -f db-dump.sql

Database dump export

./pg_dump -c -C --host=<host> --port=<port> --dbname=<database name> --user=<user name> --password=<password> -f <file name>

The following tables describes the sample commands. This is ONLY for reference.

Repository

Sample command (for Kyvos database ONLY)

Repository

Sample command (for Kyvos database ONLY)

Export from bundled

./pg_dump -c -C --host=localhost --port=45421 --dbname=delverepo --user=postgres -f dbdump.sql
-or-

./pg_dump -c -C --host=localhost --port=45421 --dbname=delverepo --user=postgres >dbdump.sql

Export from external 

AWS:
./pg_dump -c -C --host=<RDS endpoint> --port=45421 --dbname=delverepo --user=postgres --password=<password> >dbdump.sql

Azure:
./pg_dump -c -C --host=kyvos-postgresserver-1010.postgres.database.azure.com --port=5432 --dbname=delverepo --user=postgres --password=<password> >dbdump.sql

GCP:
./pg_dump -c -C "host=10.123.230.22 port=5432 dbname=delverepo user=postgres password=<passwd>" > dbdump.sql

Switching repository

The section provides information on the following:

Switching from bundled repository to external repository

In the case of a cloud environment, you can switch to an external repository. 

  1. Export data from bundled Postgres.

  2. Import the data exported from step #1 above, in the new Postgres instance (AWS RDS or Azure Postgres) running on the cloud.

  3. On the Kyvos Manager, navigate to Utilities > Manage Kyvos Repository.

  4. On the page, select the External Repository option (by default, the Bundled Postgres-Server is selected)  

  5. Enter details as:

Note

  • Ensure that the Role attached on the Kyvos Manager node has sufficient permission to get External repository details.

  • In case fetch for details of the external repository fails, then manually provide the necessary details of the external repository (endpoint and port).

  1. Click the Automatically Start or Stop checkbox.

Note
Select this checkbox when your repository is not shared (only Kyvos is using this repository). If your repository is shared and it is being used by any other service, you must not select this checkbox.

  1. Perform repository connection validation using Test Connection link.
    NOTE: In case of any problem with the test connection, you will see an error message. Fix those problems before proceeding with switching the repository.

  2. Once the connection is validated successfully, click the Save button. This will configure new Postgres as a repository for Kyvos.

  3. Restart the BI Server service.

Switching from external repository to another external repository

  1. Export data from the current configured external Postgres repository (AWS RDS or Azure Postgres) running on the cloud.

  2. Import the data exported in above step-1 to the new target external Postgres instance (AWS RDS or Azure Postgres) running on the cloud.

  3. On the Kyvos Manager, navigate to Utilities > Manage Kyvos Repository.

  4. On the Manage Repository page, provide the details of the external repository you use.

Note

  • Ensure that the Role attached on the Kyvos Manager node has sufficient permission to get External repository details.

  • In case fetch for details of the external repository fails, then manually provide the necessary details of the external repository (endpoint and port).

  • Port access must be permitted as a prerequisite in the network security group.

  1. Enter details as:

  1. Perform repository connection validation using Test Connection link.
    NOTE: In case of any problem with the test connection, you will see an error message. Fix those problems before proceeding with switching the repository.

  2. Once the connection is validated successfully, click the Save button. This will configure a new Postgres as a repository for Kyvos.

  3. Restart the BI Server service.

Switching from an external repository to bundled repository

  1. Export data from external Postgres (Azure Postgres or GCP CloudSQL).

  2. In an existing cluster, identify the target node for running bundled Postgres and start the Postgres service on that target node.

  3. On the navigation bar, click Utilities > Manage Kyvos Repository.

  4. On the Manage Kyvos Repository page, select the Bundled Postgres Repository option (by default, Bundled Postgres will be shown selected).

  5. Select that cluster node from the dropdown on which the data dump is imported in step #2 above.

  6. If needed, select the Restore Database Dump option to restore a dump of the Postgres database.

    1. Locate Dump data from:

      1. Restore data from last backup: Select this option to get the data restored from the last created backup.

      2. Upload data dump file: Select this option to upload a previously saved data dump file.

  7. Perform repository connection validation using Test Connection link.
    NOTE: In case of any problem with the test connection, you will see an error message. Fix those problems before proceeding with switching the repository.

  8. Once the connection is validated successfully, click the Save button. This will configure new Postgres as a repository for Kyvos.

  9. Restart the BI Server service.

Switching to a new bundled repository (recovered state) from the bundled repository

The following procedure is required in Kyvos Manager node Disaster Recovery case. When the bundled Postgres was configured on Kyvos Manager node.

  1. Download data dump from DFS.

  2. In an existing cluster, identify the target node for running bundled Postgres and start the Postgres service on that target node, and import that data into that Postgres instance which was downloaded as a dump from DFS in step #1.

  3. On the Kyvos Manager, navigate to Utilities > Manage Kyvos Repository.

  4. On the Manage Repository page, select the Bundled Postgres Repository option (by default external repository will be shown selected).

  5. Provide details for the target External repository.

  6. Perform repository connection validation using Test Connection link.
    NOTE: In case of any problem with the test connection, you will see an error message. Fix those problems before proceeding with switching the repository.

  7. Once the connection is validated successfully, click the Save button. This will configure new Postgres as a repository for Kyvos.

  8. Restart the BI Server service.

Switching Repository from External to Installed PostgreSQL

This document describes the procedure for switching both Kyvos Manager (KM) and Kyvos repositories from an external PostgreSQL instance to an installed PostgreSQL service (version 16). The activity involves stopping Kyvos and Kyvos Manager services, exporting and importing database dumps, updating configurations, and validating the migration.

Step 1: Preparatory Actions

  1. Update the passwords for both Kyvos Manager and Kyvos external repositories to match the default passwords used for the installed Kyvos Manager and Kyvos repositories.

  2. Install PostgreSQL 16 service: On the Kyvos Manager node, run the ./configure-postgres16.sh command with sudo user to install PostgreSQL 16 using the Kyvos-provided shell script. Ensure that the PostgreSQL service is running at: sudo systemctl status postgresql post installation.

  3. Use installed PostgreSQL commands: All PostgreSQL-related commands (for dump export and import) should be executed from the installed PostgreSQL directory.

Step 2: Database Export and Import

  1. Export database dumps

    • Take separate dumps of the Kyvos Manager and Kyvos databases from the external repository using the pg_dump utility.

    • Use a PostgreSQL version up to 16.9.

    • Do not use version 16.10 or above, as additional manual edits (removal of unsupported \restrict and \unrestrict entries) will be required in the dump files.

    Example command: pg_dump -U <username> -h <external_host> -p <port> -d <database_name> -f <dump_file_path>

  2. Import database dumps into installed PostgreSQL

    • Import the KM and Kyvos dumps into the installed PostgreSQL service using the psql command.

    • Always use postgres as the user (-U postgres) during import.
      Example command: psql -U postgres -d <target_database> -f <dump_file_path>
      Note: Any compatibility changes required previously for PostgreSQL 13 are no longer needed, as the installed PostgreSQL version is 16.

  3. TLS Configuration (If Applicable): If TLS is enabled in the deployed cluster using the bundled PostgreSQL, perform the following steps:

    1. Copy the certificate files server.crt and server.key from <bundled_pg_base_path>/postgres/data/ to <installed_pg_data_dir> to the data directory of the installed PostgreSQL.

    2. Change ownership using sudo chown postgres:postgres /var/lib/pgsql/data/<file-name>.

    3. Enable SSL in postgresql.conf: ssl=on

    4. Update the following properties in postgresql.conf:

      ssl_cert_file = '<certificate_file_name>' ssl_key_file = '<key_file_name>'
    5. Restart the installed PostgreSQL 16 service after making the above changes.

  4. Update KM configuration: In the jdbc.properties file, update the installedRepo=true parameter before starting Kyvos Manager:

    1. Remove or update any repoIdentifier or outdated repository URL entries as per the installed PostgreSQL connection configuration.

    2. Push the following from Kyvos Manager:

      1. KM data snapshot

      2. disaster-recovery.sh snapshot

  5. Update symbolic link on cluster nodes

    1. On each cluster node:

      1. Move the existing postgres folder outside the kyvos directory.

      2. Create a soft link inside the kyvos directory pointing to the relocated postgres folder.
        Example command:

      ln -s /path/to/postgres /path/to/kyvos/postgres
  6. Step 4: Switch Repository for Kyvos

    1. Using the Kyvos Manager UI, perform the Switch Repository operation for Kyvos.

    2. During this process, Kyvos Manager will automatically update the configuration parameters for Kyvos to point to the installed PostgreSQL repository.

Post-Migration Validation

  • Start Kyvos Manager and verify that it connects successfully to the installed PostgreSQL repository.

  • Start Kyvos cluster services and validate connectivity for both KM and Kyvos repositories.

  • Confirm that all repository-dependent functionalities operate as expected.

Switch Repository from Installed PostgreSQL to External PostgreSQL

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.

Copyright Kyvos, Inc. 2025. All rights reserved.