I am new to this whole containarization and backend as a services technologies. But I wanted to give appwrite a shot because it seemed very easy and well suited for a small project I am about to build. The only problem is I donot know that much about docker, and I am a bit unsure if and how will I be able to move the appwrite image instance that is running locally with all the changes that I have made to it (i.e. created projects, existing db documents, functions etc) to production server or any other computers. How might I be able to do this? thanks
2 Answers
If you're looking to move the configuration for your project AND the data, the best thing to do would be to:
- Backup your project
- Move the backups and the appwrite folder to the new location
- Start Appwrite
- Restore the backup
If you only need to migrate the schema for your collections, you can use the Appwrite CLI to create an appwrite.json file of your project and then deploy it to another instance. The CLI can also be used to manage your Appwrite Functions too.
References:

- 452
- 4
- 4
-
What is the command to create the appwrite.json file? I couldn't find it in the docs. Thanks! – Develocode 777 Aug 18 '23 at 10:56
-
It should be `appwrite init project`. See https://appwrite.io/docs/command-line-deployment#initializeProject – Steven Nguyen Aug 23 '23 at 06:29
For me, the SQL dump method is not good enough due to following reasons:
As a solution, I highly recommend you to use this set of scripts. The repo contains everything you need: schema backup/restore, data backup/restore, files backup/restore, docker compose script
This will not work with AppWrite Cloud or another cloud platform without shell access
This will not work for different AppWrite versions, for example, cloud runs on 1.1.2, local 1.4.1
The SQL dump file is read only due to system data which should not be changed
SQL dump contains data and schema both. So you cannot deploy development to production without manual test data removing
You cannot apply your own data migration script. For example, It impossible to rename or resize document attribute without data lose
AppWrite store files in S3. You will lose all images from your DB!
Due to these issues, building DEV/PROD pipeline is impossible

- 1,419
- 15
- 23