Skip to content
Init is here / May 19 - 23
Back

Migrate data from one DB to another via CLI

  • 0
  • Self Hosted
  • Databases
pgk1124
23 May, 2025, 07:59

Hello,

I have a database that is currently used in production with lots of data in it. I would like to create a dev database with the same content to test out some new features.

If the new features pan out, the dev DB will be marked as the prod_v2 the old prod_DB will be archived.

Is there a quick way to do this that does not involve reading each document from the prod db and then uploading it to the dev db ? There are many entries and it will take too long.

I tried to export the DB contents using the cli but I cannot find the right command to export all contents to a file.

Additionally, can I perform DB operations on the DB locally and then push the modified DB to the server ? It would be faster than sending millions of HTTP requests to a server.

TL;DR
Developers want to migrate data from one DB to another for testing new features. This can be done quickly and efficiently by exporting the DB contents using CLI commands. Once exported, local DB operations can be performed before pushing the modified DB to the server. This method is faster than individually uploading documents.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more