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
\restrictand\unrestrictentries 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
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.sqlImport Dump to External PostgreSQL
psql -U postgres -h <external_host> -p <port> -d <km_database> -f <km_dump_path>Update Kyvos Manager Configuration
Open the jdbc.properties file from the Kyvos Manager configuration path.
Update or add the following:
installedRepo=false repoIdentifier=<external_repo_identifier> jdbc.url=<external_postgres_jdbc_url>Save the file.
Start Kyvos Manager
Start the Kyvos Manager service.
Verify that it connects successfully to the external PostgreSQL repository.
Step 2: Switch Kyvos Repository
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.sqlImport Dump to External PostgreSQL
psql -U postgres -h <external_host> -p <port> -d <kyvos_database> -f <kyvos_dump_path>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.
Automatic Configuration Update
Kyvos Manager automatically updates Kyvos configuration for external PostgreSQL.
No manual edits are required.
Step 3: Post-Switch Activities
Stop Installed PostgreSQL Service
sudo systemctl stop postgresqlPush KM Data
From Kyvos Manager, push KM data and disaster-recovery.sh snapshots.
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.