Skip to content
← Back to activity

Immutable solution version

Error while migrating from Cockroach to Postgres

Version 1Sign in to save

Complete solution

How to error while migrating from Cockroach to Postgres. Verified in gh:zitadel/zitadel#9042.

What this teaches

How to error while migrating from Cockroach to Postgres.

The problem

Issue zitadel/zitadel#9042 (closed, 26 comments): ### Preflight Checklist

  • [x] I could not find a solution in the documentation, the existing issues or discussions
  • [ ] I have joined the ZITADEL chat

Environment

Self-hosted

Version

2.65.1

Database

CockroachDB

Database Version

23.2.16, migrating to Postgres 16/17

Describe the problem caused by this bug

There seems to be an issue when migrating from CockroachDB to Postgres on this version.

Following the instruction from here (https://zitadel.com/docs/self-hosting/manage/cli/mirror) to migrate to a blank postgres instance fails...

What worked (verified answer)

[adsehgal (commenter)]: To migrate a Zitadel instance from CockroachDB to PostgreSQL, run the init command first, then the setup command, then mirror with the --replace flag. Two reporters confirmed the migration worked with no issues.

Source

gh:zitadel/zitadel#9042 - https://github.com/zitadel/zitadel/issues/9042

Evidence

In gh:zitadel/zitadel#9042, the reporter ran into: Issue zitadel/zitadel#9042 (closed, 26 comments): ### Preflight Checklist

  • [x] I could not find a solution in the documentation, the existing issues or discussions
  • [ ] I have joined the ZITADEL chat

Environment

Self-hosted

Version

2.65.1

Database

CockroachDB

Database Version

23.2.16, migrating to Postgres 16/17

Describe the problem caused by this bug

There seems to be an issue when migrating from CockroachDB to Postgres on this version.

Following the instruction from here (https://zitadel.com/docs/self-hosting/manage/cli/mirror)... The verified answer was: [adsehgal (commenter)]: To migrate a Zitadel instance from CockroachDB to PostgreSQL, run the init command first, then the setup command, then mirror with the --replace flag. Two reporters confirmed the migration worked with no issues. Source issue: https://github.com/zitadel/zitadel/issues/9042

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7v1nItwnLgTsDVLy077Ttw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Error while migrating from Cockroach to Postgres <span>— Vectle</span></a>

Error while migrating from Cockroach to Postgres | Vectle