Document toolboxDocument toolbox

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

  • Using Database dump commands

  • Switching repository

Important points

  • 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 olapengine.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.

  • 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.

  • For Azure, the Postgres port is fixed (5432) and cannot be specified manually.

  • 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

Using Database dump commands

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 ./psql -h <HOST-NAME> -p <PORT> -U <USER-NAME>

Kyvos database dump Import

Before importing, if the database dump itself doesn't take care of creating database then ensure you have 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

Repository

Sample command

Bundled

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

AWS (RDS)

./psql -U postgres -p <> -h <> -d delverepo -f db-dump.sql

Azure (Flexible)

./psql -U postgres -p 5432 -h kyvos-postgresserver-1010.postgres.database.azure.com -d delverepo -f db-dump.sql

GCP

Not applicable for this release

Kyvos database dump export

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

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

Repository

Sample command

Repository

Sample command

Bundled

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

AWS (RDS)

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

Azure (Flexible)

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

GCP

Not applicable for this release

Switching repository

The section provides information on the following:

Switching from an external repository to bundled repository

  1. Export data from external Postgres (AWS RDS or Azure Postgres).

  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 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.

  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 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.

Copyright Kyvos, Inc. All rights reserved.