Back

why i get Server Error while creating new attribute in the latest version

  • 0
  • Databases
  • Web
Drake
25 Apr, 2023, 20:41

These are our docs on backups: https://appwrite.io/docs/production#backups

TL;DR
User is experiencing a server error while trying to create a new attribute in the latest version. They suspect that the error might be due to connecting two parts from different versions. They ask if deleting and reinstalling the appwrite container with the volume path changed to 'Backup_Latest' will work. Other users suggest that running the install/upgrade command, re-editing the docker-compose.yml file, and following the backup procedure from the documentation may be necessary. The user is warned that changing the volume path back to the previous version may result in data loss. They are advised to manually upgrade the files by comparing them with the official documentation and running
manazo
25 Apr, 2023, 20:46

in the docker-compose.yml file, I changed the path of the volumes and pointed it to the "Backup_Latest" folder. I got this "Backup_Latest" folder from someone else. so he suggested I do it like this and everything will be good (everything was good. but we were on 1.2.1 back then)

Drake
25 Apr, 2023, 20:47

Holy moly

manazo
25 Apr, 2023, 20:47

did I mess everything up?

Drake
25 Apr, 2023, 20:49

The more custom/non-standard stuff you do, the more complicated things get and the harder to maintain. Especially if you don't understand how things work

manazo
25 Apr, 2023, 20:50

what should i do now

Drake
25 Apr, 2023, 20:51

im not really sure. don't run the upgrade commands from the upgrade docs

Drake
25 Apr, 2023, 20:52

would you please share your docker-compose.yml file?

Drake
25 Apr, 2023, 20:52

when did you do this?

manazo
25 Apr, 2023, 20:53

DMed you

manazo
25 Apr, 2023, 20:53

maybe last month

Drake
25 Apr, 2023, 20:54

before upgrading? You probably lost your data when you did this, right?

manazo
25 Apr, 2023, 20:56

yes. my docker crashed (at least I thought). so I reinstalled everything back then and got the "backup" files from that guy

Drake
25 Apr, 2023, 21:01

ok...anyways...since you have a modified docker-compose.yml file, you won't be able to run the appwrite upgrade command anymore and you'll have to manually upgrade by comparing your docker-compose.yml file with https://appwrite.io/install/compose and your .env file with https://appwrite.io/install/env. Going forward, be careful with that Backup_Latest folder. All your database data is in there. After you manually update the files, run docker compose up -d --remove-orphans --renew-anon-volumes to recreate the containers with the new version. Finally, run the migrate command https://appwrite.io/docs/upgrade#migration as needed.

manazo
25 Apr, 2023, 21:05

instead of doing that, can we just re-edit docker-compose.yml file and make it as it was (cuz I only edited the volumes and appwrite version) and then follow the backup procedure from the doc?

Drake
25 Apr, 2023, 21:07

all your data is in that Backup_Latest now. If you change the mariadb service back to:

TypeScript
  mariadb:
    image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
    container_name: appwrite-mariadb
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    volumes:
      - appwrite-mariadb:/var/lib/mysql:rw

you'll lose data because the container will be looking at a different spot for the data

manazo
25 Apr, 2023, 21:14

then how about installing the latest version anyways, and then again changing the volume path to Backup_Latest folder? will this work? cuz comparing and changing the whole yml and env file will be enough tedious

Drake
25 Apr, 2023, 21:16

you mean running the install/upgrade command?

manazo
25 Apr, 2023, 21:19

running only the install command. not the upgrade. cuz running only the install is similar to installing appwrite for the first time I think. so if I install it and then change the volume path to Backup_Latest, will it work? Please note here that Backup_Latest is from the older version

Drake
25 Apr, 2023, 21:22

the install command is the same as the upgrade command

Drake
25 Apr, 2023, 21:23

the install/upgrade command will give you the same file as the compose file i linked except with the ports from your previous file

manazo
25 Apr, 2023, 21:29

if I delete my appwrite container, and then reinstall it by this attached command, it'll be similar to installing it for the first time. isn't it? and after installing that, if I change the volume path to Backup_Latest? will it work? cuz I did the same thing last time. and it worked. the only difference is, last time both Backup_Latest and my newly installed appwrite were from the same version. 1.2.1. but this time, Backup_Latest will be from 1.2.1, but appwrite will be from 1.3.1. that's what I'm afraid of mainly

Drake
25 Apr, 2023, 21:31

maybe 🤷🏼‍♂️ . you may end up with an extra volume because the install command will install and spin up appwrite

manazo
25 Apr, 2023, 21:53

is there any chance for this to show errors because we're connecting two parts from different versions?

Drake
25 Apr, 2023, 23:21

im not sure

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