#Database problems after migration from 1.4.14 to 1.5.3

40 messages · Page 1 of 1 (latest)

chilly marsh
#

Hello guys, i having a similar problem but i cant make it work like this
I have this updated from 1.4.14 to 1.5.3 and after that nothing works anymore
Maria DB is running, but with this error

heady lark
#

Did you tried running docker compose down and docker compose up -d?

chilly marsh
#

yes, one the the images i sent is that

chilly marsh
#

idk what else to do...

#

also, I run docker exec appwrite migrate after runing the docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="upgrade" \ appwrite/appwrite:1.5.3

heady lark
chilly marsh
#

nop, no errors in the output

#

Im considering install all from scratch, but idk if this could happen again with other updates

heady lark
#

Did you change any data in your .env? can you check that the db related env variables are in the file?

chilly marsh
#

the only diff i had is the _APP_DOMAIN and _APP_DOMAIN_TARGET variables

#

everything else is the same as before the update

flint rose
chilly marsh
#

hey @flint rose ! that was a question?

#

i dont think so

#

it just didnt start

flint rose
#

i would try restoring and trying again

chilly marsh
#

what you mean with "restoring"? will i lose the data i have @flint rose ?

flint rose
chilly marsh
#

can you guide me for this? i never restore from a backup... and to be honest, i have several backups and idk which one i have to use (all of them were created in the updates)

flint rose
chilly marsh
#

yes @flint rose I have backups but the restore seems no to do anything... im using this guide https://www.youtube.com/watch?v=lM5yZEPtlvg

Appwrite is a self-hosted backend-as-a-service platform that provides developers with all the core APIs required to build any application.

It's a good practice to backup your Appwrite server data regularly if you need to restore it later.

Backup/Restore scripts: https://gist.github.com/stnguyen90/fee636ff652b8ecbf761935b2aa254fb

Backup Notes...

▶ Play video
#

but after the restore, i dont have my user, organization, project, anything

flint rose
chilly marsh
#

backup folder

#
#!/bin/bash

docker compose exec -T mariadb sh -c 'exec mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' < ./backup/dump.sql

appwrite_volumes=(uploads cache config certificates functions)
for volume in ${appwrite_volumes[@]}; do
    if [ ! -f "./backup/$volume.tar" ]; then
        continue
    fi
    docker run --rm --volumes-from "$(docker compose ps -q appwrite)" -v $PWD/backup:/restore ubuntu bash -c "cd /storage/$volume && tar xvf /restore/$volume.tar --strip 1"
done

if [ ! -f "./backup/builds.tar" ]; then
    exit 0
fi
docker run --rm --volumes-from "$(docker compose ps -q appwrite-worker-deletes)" -v $PWD/backup:/restore ubuntu bash -c "cd /storage/builds && tar xvf /restore/builds.tar --strip 1"
#
#!/bin/bash

mkdir -p backup

docker compose exec mariadb sh -c 'exec mysqldump --all-databases --add-drop-database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' > ./backup/dump.sql

appwrite_volumes=(uploads cache config certificates functions)
for volume in ${appwrite_volumes[@]}; do
    mkdir -p backup && docker run --rm --volumes-from "$(docker compose ps -q appwrite)" -v $PWD/backup:/backup ubuntu bash -c "cd /storage/$volume && tar cvf /backup/$volume.tar ."
done

docker run --rm --volumes-from "$(docker compose ps -q appwrite-worker-deletes)" -v $PWD/backup:/backup ubuntu bash -c "cd /storage/builds && tar cvf /backup/builds.tar ."

cp docker-compose.yml backup
cp .env backup
if [ -f docker-compose.override.yml ]; then
    cp docker-compose.override.yml backup
fi
flint rose
flint rose
chilly marsh
#
WARN[0000] /home/appwrite/docker-compose.yml: `version` is obsolete 
WARN[0000] /home/appwrite/docker-compose.yml: `version` is obsolete 
./app-64b310095852786cbbdc/
./app-64b310095852786cbbdc/65b3137e2c443baeb054/
./app-64b310095852786cbbdc/65b3137e2c443baeb054/65e85356ef9e97ef8df3.png
./app-64b310095852786cbbdc/65b3137e2c443baeb054/65b314aa577a5050942b.png
./app-65e867dfa2404654d812/
./app-65e867dfa2404654d812/profile-photos/
./app-65e867dfa2404654d812/profile-photos/profile_w.png
./app-65e867dfa2404654d812/profile-photos/profile_m.png
WARN[0000] /home/appwrite/docker-compose.yml: `version` is obsolete 
./app-64b310095852786cbbdc/
./app-64b310095852786cbbdc/daece399f74682e327e579623600d3f5
./app-64b310095852786cbbdc/2dd2bd5c65d88817d751c3e717268243
./app-64b310095852786cbbdc/52efcee273fa8c2a61f2f23d2cc1ec7f
./app-64b310095852786cbbdc/a9820e1611fe9f43029aef903ed1fcde
./app-64b310095852786cbbdc/abf278efaa1e353b5db17cc0dcc961be
./app-64b310095852786cbbdc/84b481dccb8c0bfd3f225b4b335e89ac
./app-64b310095852786cbbdc/4b6b3d53ebd45304b80a8f87075a8358
./app-65e867dfa2404654d812/
./app-65e867dfa2404654d812/1f1b2e24dee53425aee8fddd636d41e5
./app-65e867dfa2404654d812/ee387ef5fcff16ebc1126d2510fc7c78
./app-65e867dfa2404654d812/e39bbde941c43b469819e5c9a97e6474
./app-65e867dfa2404654d812/c399bbca18dda238493c9c0f66a93611
./app-65e867dfa2404654d812/605d5f31a9c35083e5cb788fcd2d155b
./app-65e867dfa2404654d812/7ba28067bfbcc34313a932a67e9cd34e
./app-65e867dfa2404654d812/17e4ccdea0986452b44bb4ef102ba943
./app-65e867dfa2404654d812/a713d86097f0c532bf252d64ea23545a
./app-65e867dfa2404654d812/f410b0d33f79b2964001f2d8840a000f
./app-64b310095852786cbbdc/
./app-64b310095852786cbbdc/6594d53381d8d2a0da3b.gz
./app-64b310095852786cbbdc/
./app-64b310095852786cbbdc/6594d5520b089.gz
chilly marsh
#

thats the only output i had

flint rose
chilly marsh
#

yes, and it seems that nothing happens, the "admin user" is not there, neither the organizations or projcts

flint rose
flint rose
#

So you didn't have any database data backed up

#

Your backup didn't work correctly

chilly marsh
#

ok... what a problem