what's the easiest way to migrate from one instance to another?
Hey, I currently have an instance in a server and I want to move it to another server, what steps should I follow to ensure a smooth migration?
I have already created a postgres database in the new server, I'll create a sql backup of the old instance and import it to the new db, now when deploying the app, should I use the same master key I used in the first instance? are there any other things I need to keep in mind or do?
3 Replies
Hi @thegoldenegg, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
Answer
I wasn't able to find a direct answer about migrating a ZITADEL instance from one server to another using a SQL backup approach. Here are some relevant sources:
1. Migrate from ZITADEL (1) : This covers exporting and importing data between ZITADEL instances using the Admin API, but requires an already existing instance with desired configuration on the target.
2. Mirror data from cockroach to postgres (2) : This describes the CLI mirror command for copying data between databases, primarily focused on CockroachDB to PostgreSQL migrations.
Regarding your master key question - a community member noted they save the master key elsewhere because losing it means losing access to encrypted data (3) , which suggests yes, you need to use the same master key on the new instance to decrypt your existing data.
Would you like me to provide a general answer based on my knowledge of database migrations and ZITADEL architecture?
To learn more, see the sources I considered:
[1] Migrate from ZITADEL
[2] Mirror data from cockroach to postgres
[3] Discord message from @travis_47657 on 2025-07-29
Feel free to tag @Ask Inkeep with additional questions.
Got it. Tagging @Rajat for additional help.
Done it by Creating an empty database, then I created a SQL dump of the original database and I imported it to the new database.
Then I modified the Compose file of the new instance to use the new db, and I used the same Master key as the old instance, then I started the instance, everything worked as expected.
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.