Back

[SOLVED] Error migrating from 1.3.7 to 1.4.9

  • 0
  • Self Hosted
  • General
Felipe Amaral
30 Nov, 2023, 12:52

Hi all! i followed the self-host update guide (https://appwrite.io/docs/advanced/self-hosting/update) and got some strange messages in output. The outputs are too long, so i'll post it in different messages. My steps:

Step 1. Install the next version:

TypeScript
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.4.9

Output:

TypeScript
Starting Appwrite installation...
Previous installation found, do you want to overwrite it (a backup will be created before overwriting)? (Y/n)
y
Compose file found, creating backup: docker-compose.yml.1701339330.backup
Env file found, creating backup: .env.1701339330.backup
Choose your server HTTP port: (default: 80)

Choose your server HTTPS port: (default: 443)

Choose a secret API key, make sure to make a backup of your key in a secure location (default: 'xxx')

Enter your Appwrite hostname (default: 'mydomain.com')

Enter a DNS A record hostname to serve as a CNAME for your custom domains.
You can use the same value as used for the Appwrite hostname. (default: 'mydomain.com')


If you haven't already done so, set the following record for mydomain.com on your DNS provider:

Type            Name       Value
A or AAAA       @          <YOUR PUBLIC IP>

Use 'AAAA' if you're using an IPv6 address and 'A' if you're using an IPv4 address.

Running "docker compose up -d --remove-orphans --renew-anon-volumes"

Appwrite installed successfully
TL;DR
During an update from version 1.3.7 to 1.4.9, the user encountered an error. Some suggestions were made, including upgrading to version 1.4.0 first and then running the migration command. Another suggestion was to upgrade to the nearest version step by step and run the migration command each time. The user also encountered a usage restarting issue but continued with the process. In the end, the user successfully completed the migration by removing some orphaned projects.
Felipe Amaral
30 Nov, 2023, 12:53

Step 2. Check Version

TypeScript
docker ps | grep appwrite/appwrite

Output:

TypeScript
6aab843ed17f   appwrite/appwrite:1.4.9   "realtime"               35 seconds ago   Up 31 seconds   80/tcp   appwrite-realtime
93c0adfff393   appwrite/appwrite:1.4.9   "usage"                  35 seconds ago   Restarting (255) 1 second ago                                                                              appwrite-usage
6bfda863b928   appwrite/appwrite:1.4.9   "maintenance"            37 seconds ago   Up 32 seconds   80/tcp   appwrite-maintenance

...

c1e05997d2ce   appwrite/appwrite:1.4.9   "worker-certificates"    43 seconds ago   Up 31 seconds   80/tcp   appwrite-worker-certificates
7f0189154299   appwrite/appwrite:1.4.9   "worker-mails"           43 seconds ago   Up 33 seconds   80/tcp   appwrite-worker-mails
90cc86424cdc   appwrite/appwrite:1.4.9   "worker-audits"          44 seconds ago   Up 32 seconds   80/tcp   appwrite-worker-audits
c1c38314bf59   appwrite/appwrite:1.4.9   "worker-webhooks"        44 seconds ago   Up 32 seconds   80/tcp   appwrite-worker-webhooks
3b700826c61f   appwrite/appwrite:1.4.9   "docker-php-entrypoi…"   44 seconds ago   Up 31 seconds   80/tcp   appwrite
402fa278b3af   appwrite/appwrite:1.4.9   "schedule"               44 seconds ago   Up 26 seconds   80/tcp   appwrite-schedule
7d490fb8fa20   appwrite/appwrite:1.4.9   "worker-migrations"      45 seconds ago   Up 32 seconds   80/tcp   appwrite-worker-migrations

I dont know if "USAGE" restarting is a problem, but i carried on.

Felipe Amaral
30 Nov, 2023, 12:55

Step 3. Running the Migration

TypeScript
docker compose exec appwrite migrate

Output:

TypeScript
View message.txt

I stoped the upgrade, rolleback the VM and came here looking for help. πŸ™‚

Felipe Amaral
30 Nov, 2023, 12:56
trashcoder
30 Nov, 2023, 13:54

Somewhere i read, that it is recommended to upgrade to the nearest Version, eg. 1.3.7 to 1.3.8 and run the migrate command. Then upgrade to 1.3.9 and run the migrate command again and so on.

Felipe Amaral
30 Nov, 2023, 15:47

I think its from major version... like 1.2.x to 1.4.x ...

Felipe Amaral
30 Nov, 2023, 15:47
Felipe Amaral
30 Nov, 2023, 15:48

I cant go from 1.2.x to 1.4.x bypassing version 1.3.x

trashcoder
1 Dec, 2023, 10:02

i looked into you message.txt again and then i remember, that you only may upgrade from 1.3.7 to 1.4.0 because of new attributes in 1.4.0 you can see in line 170gg. So, do this: upgrade from 1.3.7 to 1.4.0 then run the migration command. After that you may upgrade from 1.4.0 to 1.4.9 without the need of running the migration command again.

Felipe Amaral
1 Dec, 2023, 11:57

SOLVED: My Appwrite had some orphaned projects that were preventing the migration process. Once they were removed, the process completed normally.

Felipe Amaral
1 Dec, 2023, 11:57

SOLVED: Error migrating from 1.3.7 to 1.4.9

Felipe Amaral
1 Dec, 2023, 11:57

[SOLVED] Error migrating from 1.3.7 to 1.4.9

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