Database migration issue. The process stopped at Step 3 the Deploy Migration Service
I tried to migrate my railway database but it returned an error at step three without showing any log info
43 Replies
Project ID:
98888b3e-8302-4a34-a31a-6ba9963dccee
Project id : 98888b3e-8302-4a34-a31a-6ba9963dccee
hey is the migration still stuck?
It failed. I tried three times but it now fails At step 4: Migrate Data
However, a New MySQL database was created, but I can't tell if it has all the data from the Legacy DB
can you check the logs of the migration service for any errors?
Yes. I've just checked and it shows an error: [ ERROR ] The new database is not empty. Aborting migration.
auth_group_permissions
Set the OVERWRITE_DATABASE environment variable to overwrite the new database.
set that variable
To True?
any value should work
OK. Thanks, man. I'll try it now.
I've tried it, but it didn't work
what do the logs say now
[ ERROR ] The new database is not empty. Aborting migration.
auth_permission
django_admin_log
django_celery_results_chordcounter
Set the OVERWRITE_DATABASE environment variable to overwrite the new database.
have you set that variable?
Yes, I've set the OVERWRITE_DATABASE to True
the migration service thinks otherwise
can you send me a screenshot of the project so i know where we are at?
Yes, sure
Here
thats a lot of red
Yes, I tried three times and it failed tree times
delete everything highlighted
and delete any stray volumes as a result
OK. Got it
OK. It's done
new screenshot please
Here it is
rename your mysql database to just
MySQL
OK. I dit it
would you happen to know how much data you have in your mysql database?
would it be over 5gb?
No, I don't. But I am quite sure it is less than 1 gb
sounds good
does that school-manager service use variable references?
No, I hard-coded the url
please use reference variables before we run another migration https://docs.railway.app/guides/variables#referencing-another-services-variable
OK.
let me know when done!
It's done now
can you show me how you have used reference variables?
here
cool, re-run the migration now
OK
It worked!! Thank you very much @Brody
no problem!
By the way, is it possible to check the current db size?
maybe this would help? https://stackoverflow.com/a/57024953
OK. A 1000 thanks
happy to help!