Hello all, I restored from backup my server and now I have an error 500 when trying to access:
Here is the logs from appwrite container
[Error] Timestamp: 2024-06-14T10:04:21+00:00
[Error] Method: GET
[Error] URL: /v1/account/prefs
[Error] Type: TypeError
[Error] Message: Utopia\Database\Document::__construct(): Argument #1 ($input) must be of type array, Utopia\Database\Document given, called in /usr/src/code/app/controllers/api/account.php on line 2409
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Document.php
[Error] Line: 27
How did you have made and restored the backup?
At what version the backup was made? Do you have upgraded the server or similar prior to restoring the backup?
I used theses script to backup & restore:
https://gist.github.com/stnguyen90/fee636ff652b8ecbf761935b2aa254fb/
The backup was made on version 1.5.7 No upgrade has been made. The restoration was working great instead I restarted the server.
What are the logs for docker compose logs appwrite
?
[...]
appwrite | [Error] Timestamp: 2024-06-14T10:07:18+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/account/prefs
appwrite | [Error] Type: TypeError
appwrite | [Error] Message: Utopia\Database\Document::__construct(): Argument #1 ($input) must be of type array, Utopia\Database\Document given, called in /usr/src/code/app/controllers/api/account.php on line 2409
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Document.php
appwrite | [Error] Line: 27
appwrite | [Error] Timestamp: 2024-06-14T10:40:54+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/account/prefs
appwrite | [Error] Type: TypeError
appwrite | [Error] Message: Utopia\Database\Document::__construct(): Argument #1 ($input) must be of type array, Utopia\Database\Document given, called in /usr/src/code/app/controllers/api/account.php on line 2409
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Document.php
appwrite | [Error] Line: 27
appwrite | [Error] Timestamp: 2024-06-14T10:40:54+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/account/prefs
appwrite | [Error] Type: TypeError
appwrite | [Error] Message: Utopia\Database\Document::__construct(): Argument #1 ($input) must be of type array, Utopia\Database\Document given, called in /usr/src/code/app/controllers/api/account.php on line 2409
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Document.php
appwrite | [Error] Line: 27
It seems that there's something wrong with the DB so restore fails
Maybe is it possible to edit the DB manually to search what is going wrong?
Yeah, of course. You can as any other MariaDB database
I think that you will need to delete the existing DB volume (make a backup of the volume and make sure to not overwrite or delete accidentally the backup that you have with the Steven script) (In oter words, a separated backup of that). And then restore the backup with the restore script.
(Make also sure that you know how to do all the process correctly) (Testing on a test environment is very recommended)
You mean to delete the actuall broken restored & restore again?
Basically deleting the actual broken database data and then restoring the backup. Be careful with all that as mentioned, mainly if it contains important data. You will loss all the data posterior to backup.
Okay I would try again thanks π I'm working on a test env so it should be fine, thanks for the warning π
Recommended threads
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...