0

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

samman adhikari
  • 571
  • 1
  • 7
  • 17

2 Answers2

2

If you're looking to move the configuration for your project AND the data, the best thing to do would be to:

  1. Backup your project
  2. Move the backups and the appwrite folder to the new location
  3. Start Appwrite
  4. 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:

  1. YouTube Video on Backing Up and Restoring
  2. Docs on Backups
  3. Docs on Appwrite CLI
Steven Nguyen
  • 452
  • 4
  • 4
0

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

  1. This will not work with AppWrite Cloud or another cloud platform without shell access

  2. This will not work for different AppWrite versions, for example, cloud runs on 1.1.2, local 1.4.1

  3. The SQL dump file is read only due to system data which should not be changed

  4. SQL dump contains data and schema both. So you cannot deploy development to production without manual test data removing

  5. You cannot apply your own data migration script. For example, It impossible to rename or resize document attribute without data lose

  6. AppWrite store files in S3. You will lose all images from your DB!

  7. Due to these issues, building DEV/PROD pipeline is impossible

Petr Tripolsky
  • 1,419
  • 15
  • 23