Back

Error when restoring a backup

  • 0
  • Self Hosted
BloodThermic
22 Jun, 2023, 08:24

When I run this command docker-compose exec -T mariadb sh -c 'exec mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' < dump.sql I get this error. The file is uploaded and named accordingly

TypeScript
ERROR: The Compose file './docker-compose.yml' is invalid because:
Invalid top-level property "x-logging". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-".

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/```
I am following this guide. 
https://dev.to/appwrite/appwrite-in-production-backups-and-restores-4beg

I was able to create the dump file but cant restore it .
TL;DR
User is experiencing an error when trying to restore a backup in Mariadb. They ask if they can change the username and password for the database, and are told that they cannot change those values after the database has started. They eventually reset the password and are able to login, but encounter an issue where they are logged out when trying to access the web panel. They are advised to uninstall the old version and update to Docker compose v2. They mention their Docker version as 24.0.2 and their Docker compose version as 1.25.0. They receive an error when trying to run a command to restore the backup,
Drake
22 Jun, 2023, 16:54

what version of docker and docker compose do you have?

BloodThermic
22 Jun, 2023, 20:44

Docker version 24.0.2, build cb74dfc

docker-compose version 1.25.0, build unknown

Drake
22 Jun, 2023, 20:46

You need to use docker compose v2

BloodThermic
22 Jun, 2023, 20:48

Ty

BloodThermic
22 Jun, 2023, 21:13

I have updated compose to 2.18.1 and still same error

Drake
22 Jun, 2023, 21:14

What's docker-compose version show?

BloodThermic
22 Jun, 2023, 21:20

1.25v

BloodThermic
22 Jun, 2023, 21:21

How do I update then. I tired and it did not work

Drake
22 Jun, 2023, 21:21

So you might be using the old one still

Drake
22 Jun, 2023, 21:21

You can try uninstalling the old one

BloodThermic
22 Jun, 2023, 21:49

Ok I got it to work but when i go to look at the web panel I got logged out and cant login

BloodThermic
22 Jun, 2023, 22:46

I got it all working! I had to reset password in order to beable to login

BloodThermic
22 Jun, 2023, 22:49

If i change my username and password to the db in the the .env will that break anything?

Drake
22 Jun, 2023, 23:59

what do you mean? you can't change those values after the database has started

BloodThermic
23 Jun, 2023, 01:37

Is there anyway to change the username password?

Drake
23 Jun, 2023, 01:38

you do it like any other mariadb database: https://linuxconfig.org/how-to-change-mariadb-user-password

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