R
Railway13mo ago
Umang

db migration

The postgres db migration is not moving past step one for with this error log in the new db service
project id- 8255344d-43ae-4e2a-ade0-557ac96ab17e
No description
25 Replies
Percy
Percy13mo ago
Project ID: 8255344d-43ae-4e2a-ade0-557ac96ab17e
Brody
Brody13mo ago
red doesn't always mean an error happened, how long has the migration been going on for?
Umang
UmangOP13mo ago
20mins
No description
Brody
Brody13mo ago
would you say you have a lot of data?
Umang
UmangOP13mo ago
not that much, but it's stuck in the step 1 itself so thought of creating the ticket
Brody
Brody13mo ago
okay gonna tag in @jr here
jr
jr13mo ago
Hey @Vampo, I gave it a kick and it is progressing as normal now The data looks to be all migrated now and the service was just redeployed Although you may be running into the network initialization issue with prisma
Umang
UmangOP13mo ago
Hey @jr, so we're in a little problem here the db was successfully migrated at 7:05 my local time same as when you did these messages, but I saw it back later and didn't actually updated the envs + deleted the legacy dbs a few mins back and unfortunately realised all the data in these hrs was stored in the old legacy db, it's not in the new one and old db I have deleted is there any way we can get this old data of today from legacy db to new one? didn't really realize this edge case, as the post migration guide only mentioned to test app with new envs, but the time between will update data in new db wasn't told and we didn't have any way to double check if the new db is up to date with the old one
Brody
Brody13mo ago
the guide does say to manually verify the data in the new database before you delete the old database im not sure how much the team can do for you here as you deleted the database yourself
Umang
UmangOP13mo ago
got it, would be helpful to know if the team can do something in the current scenerio
Brody
Brody13mo ago
generally railway wouldn't restore a database if they weren't at fault but cant hurt to ask - @jr
Umang
UmangOP13mo ago
would be great to get this favor just once haha
Brody
Brody13mo ago
yeah i get where your coming from, but you did delete the database yourself when the guide mentioned twice (or more) to verify the data yourself
jr
jr13mo ago
Oh no that is not good. How were you connecting to the plugin? The migration should switch over any variable references to use the new database. We normally don't provide database restoration in cases like this, but if you provide me the timestamps of what happened I can check with our team and see if there is anything we do. Assuming it went something like this? - Migrate database - App runs for a bit assuming it is connected to the new db - Delete legacy plugin ?
Umang
UmangOP13mo ago
The migration should switch over any variable references to use the new database.
I was expecting same and it did switch the env in our cron service from plugin but not in the server deployment (the env names were same) Yes, the workflow was this, the db was successfully migrated at around 7:05 my local time (same as when you did the message in chat that it's done) after that almost 16 hrs later at around 22:50 my local time, I updated the env of db url in server deployment and data started storing in the new plugin
No description
Umang
UmangOP13mo ago
I just need data which was updated in these 16 hrs in the db, which was stored in legacy plugin and not the new one
jr
jr13mo ago
Was the URL hardcoded as an environment variable?
Umang
UmangOP13mo ago
yeah it was hardcoded in the server deployment
jr
jr13mo ago
ah okay that was it then. We only switch over variable references. I'll update the guide with that information As for restoring the data, it is unlikely. We take snapshots of our hosts every 24 hours so there is a good chance that some data would be lost anyway. I can still check but it won't be for a few hours/until tomorrow When was the plugin deleted?
Umang
UmangOP13mo ago
around 22:50 my local time, so approx 2 hrs ago
jr
jr13mo ago
Do you have the old database url? I just need the containers-*** part
Umang
UmangOP13mo ago
fortunately I do, shall I send in DMs? sent a friend req
jr
jr13mo ago
accepted
Umang
UmangOP13mo ago
sent the whole url
jr
jr13mo ago
Moving convo to DBs
Want results from more Discord servers?
Add your server