Back

[SOLVED] Run mysqldump with docker-compose

  • 0
  • Self Hosted
Said H
24 Mar, 2023, 02:07

Hello, I have been trying to backup my appwrite database. I refer to the instruction in https://discord.com/channels/564160730845151244/1086299526802968627/1086316803891937485

I am currently stuck at

TypeScript
root@appwrite:/home/ubuntu/appwrite# /usr/local/bin/docker-compose -f /home/ubuntu/appwrite/docker-compose.yml exec mariadb sh -c 'exec mysqldump --all-databases --add-drop-database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' > ./backup/dump.sql
bash: /usr/local/bin/docker-compose: No such file or directory

It does not seem to be able to detect my docker-compose.

TypeScript
root@appwrite:/home/ubuntu/appwrite# docker-compose --version
bash: docker-compose: command not found
root@appwrite:/home/ubuntu/appwrite# docker compose version
Docker Compose version v2.15.1

I have docker compose v2 installed. but i can't use docker compose command with hyphen. anyone has any idea?

TL;DR
The user was trying to run mysqldump with docker-compose but encountered an error with the docker-compose command. They realized they were using the old version of docker-compose and needed to switch to the new version called "docker compose." They were able to resolve the issue by using "docker compose" instead of "docker-compose."
Drake
24 Mar, 2023, 02:11

docker-compose is the old v1 compose. You should be using docker compose

Said H
24 Mar, 2023, 02:27

oh. Ok, let me rerun the script

Said H
24 Mar, 2023, 02:27

thanks so much Steven

Said H
24 Mar, 2023, 02:28

everything works fine! thanks a lot.

Said H
24 Mar, 2023, 02:28

[SOLVED] Run mysqldump with docker-compose

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