Migrating Kyvos PostgreSQL Repository
From Kyvos 2025.6 onwards, external Postgres repository version 16 is supported in Azure (Flexible Server) and GCP (Cloud SQL) clouds.
Kyvos now includes two PostgreSQL directories—postgres and postgres16—in its bundle. However, for use as the bundled repository, only PostgreSQL version 13 (located in the postgres directory) is supported. The postgres16 directory is included solely to support external repositories using PostgreSQL version 16. It enables you to take and restore dumps of the PostgreSQL version 16 repository via the bundled PostgreSQL commands, pg_dump and psql located in the postgres16 folder.
Points to know
The method for exporting data from the currently used PostgreSQL repository (via pg_dump) and importing it into the required version of the repository—whether bundled or external—remains unchanged. For more information, see the commands used to export or import database.
To create a new external PostgreSQL 16 repository for migration, use the templates available in both Azure and GCP.
All other steps for exporting (dumping) and importing (restoring) PostgreSQL data remain unchanged. These include:
Ensuring identical username and password in both repositories.
Confirming no active connections to the target database during import.
Ensuring the bundled PostgreSQL service is running on the expected node when switching to bundled PostgreSQL.
When migrating data between PostgreSQL repositories of different versions or types (bundled vs. external), ensure the following:
To switch to the external Postgres repository 16
Do one of the following:Dump the existing external PostgreSQL repository (version 13) data and import it into the newly created external PostgreSQL repository (version 16).
-or-Upgrade the existing in-use external Postgres 13 to the latest version using the native console.
Note
Once the version is updated from the native console, you must save the configuration (make it dirty and save) from Manage Kyvos Repository page.
No additional permission is required to fetch details unless the repository is in the same resource group as the Kyvos Manager machine. It is recommended that the repository must be in the same region.
To switch from External PostgreSQL 16 to External PostgreSQL 13
Dump the existing external PostgreSQL 16 repository data.
Import this dump into the newly created external PostgreSQL 13 repository.
To switch from Bundled PostgreSQL 13 to External PostgreSQL 16
Take a dump of the existing bundled PostgreSQL 13 repository data.
Import this dump into the newly created external PostgreSQL 16 repository.
To switch from External PostgreSQL 16 to Bundled PostgreSQL 13
Take a dump of the existing external PostgreSQL 16 repository data.
Import this dump into the bundled PostgreSQL 13 repository.
Export and Import data
To select the appropriate bundled PostgreSQL version for running pg_dump in various migration scenarios:
|
Destination | |
Source | 13 | 16 |
13 | 13 | 13 |
16 | 16* | 16 |
Migrating from PostgreSQL 13 to PostgreSQL 13: The dump must be taken using PostgreSQL 13.
Migrating from PostgreSQL 13 to PostgreSQL 16: The dump can be taken using pg_dump from either bundled PostgreSQL version (i.e., postgres or postgres16 directories). However, it is recommended to use the command located in the postgres/bin folder.
Migrating from PostgreSQL 16 to PostgreSQL 16: The dump should be taken using pg_dump located in the postgres16 folder.
Migrating from PostgreSQL 16 to PostgreSQL 13: The dump should be taken using pg_dump from the postgres16 folder.