Back

Server Errors After Backup Restore

  • 0
  • Self Hosted
  • Databases
darShan
13 Apr, 2024, 08:57

I followed this script - https://gist.github.com/stnguyen90/fee636ff652b8ecbf761935b2aa254fb#file-0-backup-sh & successfully created a backup of an appwrite (1.5.4) instance.

After this I cleaned my server to remove CloudPanel & installed a fresh copy of Ubuntu 22.04, Docker 26.0.1 & Appwrite (1.5.4) from scratch.

After appwrite's installation, I stopped traefik via docker stop appwrite-traefik & then executed the restore script like ./restore.sh which afaik worked fine as there were no errors. I did a docker compose up -d after this and I was able to login with my backed up credentials.

But I can no longer see relevant data on the dashboard, I keep seeing Error 500s. Some form of data like the Projects, Root account are visible but not the others at all.

Contents of the docker logs appwrite -

TypeScript
[Error] Method: GET
[Error] URL: /v1/project/usage
[Error] Type: TypeError
[Error] Message: array_key_exists(): Argument #2 ($array) must be of type array, null given
[Error] File: /usr/src/code/app/controllers/shared/api.php
[Error] Line: 320
[Error] Timestamp: 2024-04-13T08:52:35+00:00
[Error] Method: GET
[Error] URL: /v1/migrations
[Error] Type: TypeError
[Error] Message: array_key_exists(): Argument #2 ($array) must be of type array, null given
[Error] File: /usr/src/code/app/controllers/shared/api.php
[Error] Line: 320

PS: If I forcefully run docker exec appwrite migrate, I can see the Auth accounts for sometime but again 500s after a page refresh.

A few attributes not found errors from migrate -

TypeScript
'oAuthProviders' from projects: Attribute not found

Migrating Collection "stats"
'type' from stats: Attribute not found

Migrating Collection "stats"
'type' from stats: Attribute not found
TL;DR
Developers created a backup for an Appwrite instance and restored it on a new server with Ubuntu 22.04, Docker 26.0.1, and Appwrite 1.5.4. After the restore, they encountered `Error 500`s on the dashboard and missing data. The error logs point to a TypeError related to array_key_exists in specific files. Running `docker exec appwrite migrate` temporarily shows Auth accounts but reverts to errors later. There are attribute errors related to 'oAuthProviders' and 'type' during migration. Solution: - Investigate the TypeError related to array_key_exists in the
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