Back

How to properly restore an Appwrite backup?

  • 0
  • Self Hosted
  • Databases
  • General
  • Storage
m0hsin_
22 Jan, 2025, 18:50

I have two separate servers both running Appwrite 1.6.0. I am trying to move all the data from the Appwrite instance running on Server A to the one running on Server B.

This is how I have gone about it:

  1. Took a dump of the DB on server A
  2. Created a volume backup of appwrite uploads and functions on Server A
  3. Copied the db dump and the backup volumes to server B
  4. Set the OPENSSL key to match on both servers
  5. Restored the db
  6. Restored the volumes
  7. Ran docker migrate to finish up the migration

Now after doing all this, I launch the console and try to login, I get an invalid credentials error. Now the smtp config is setup fine on server B so I reset the password and login. From the console, I can see that everything is there in the database, however when I go to the storage section, the files are there, but they are still encrypted, the images show broken links and can’t be previewed. What exactly is it that I am missing here?

Also, I am running both servers on Coolify, so if there is a simpler way of doing this, please let me know

TL;DR
To properly restore an Appwrite backup: 1. Take a dump of the DB on Server A 2. Create a volume backup of Appwrite uploads and functions on Server A 3. Copy the DB dump and backup volumes to Server B 4. Set the OPENSSL key to match on both servers 5. Restore the DB and volumes 6. Run docker migrate to complete the migration 7. If files are encrypted, ensure encryption keys match between servers To take a backup of the Redis cache: - Try recreating the containers and dump the Redis cache from Server B.
D5
22 Jan, 2025, 18:51

Try recreating the containers and dump the redis cache from the server B

m0hsin_
22 Jan, 2025, 18:52

Ah I see, how can I take a backup of the redis cache?

D5
22 Jan, 2025, 18:54

I think you can just invalidate it and then restart appwrite

D5
22 Jan, 2025, 18:54

Don't try in the working server but in testing/B instance just in case

m0hsin_
22 Jan, 2025, 18:54

Also, the docs strictly prohibit doing this https://appwrite.io/docs/advanced/self-hosting/production

D5
22 Jan, 2025, 18:55

Where?

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