Database migration issue - wrong config after migration

Hello, I did not change database_url upon migration. Did not think that was needed... Anyway. You state: "A copy of the raw plugin data will be available upon request for 6 months after this date." I really need a copy of my legacy db to sync with the new db. Project id: 9648ebed-8dec-4670-8188-b0ecee70a969
34 Replies
Percy
Percy10mo ago
Project ID: 9648ebed-8dec-4670-8188-b0ecee70a969
Adam
Adam10mo ago
Your legacy database should still exist, unless you deleted it. You can transfer your data from there
JeppePepp
JeppePeppOP10mo ago
yes its there but i cant access it Is there a way to re-migrate or can i get access to the data?
Adam
Adam10mo ago
The team is working on a solution to this, but for now...
Duchess
Duchess10mo ago
Thread has been flagged to Railway team by @Adam.
JeppePepp
JeppePeppOP10mo ago
okej! thx
Brody
Brody10mo ago
so you originally migrated a few months ago and continued to write to the legacy database up until yesterday, when you switched over to the new database you are missing all the data from that time span. the solution is to manually revert your project back to the state it was in before the migration, use reference variables, then run the migration again to resync the data from the legacy plugin to a new database your legacy data may be shut down but you can still trigger a new migration after you manually revert your project to the pre-migration state, that should be as simple as deleting the current v2 database
JeppePepp
JeppePeppOP10mo ago
i did the migration 12th of january. So not a few month ago. Im using the aws backup plugin that migrated fine. So all my backups since that date are empty (was pointing wrong ie to the db that was not active). There must be a way to just get access to the db and then i can manually just move data to the new db. Im scared as fuck to just mis click somthing and lose everything instead of just 2 weeks. everything was working fine for us until today. So its 12th of jan til today
Brody
Brody10mo ago
right, up until yesterday the legacy database was still running, it has since shut down, you should be able to start it back up for an hour if you need to manually migrate data
JeppePepp
JeppePeppOP10mo ago
also to add. The state of the project is right now the date of when i did the migration and then thought everything was working fine and the new db was active. "you should be able to start it back up for an hour if you need to manually migrate data" yes that would be fine. How do i do that?
Brody
Brody10mo ago
open the legacy database and click the applicable button, can't miss it!
JeppePepp
JeppePeppOP10mo ago
im missing it
No description
JeppePepp
JeppePeppOP10mo ago
there is no sucha button
Brody
Brody10mo ago
right, you would need to manually revert your project to a pre migration state aka delete the v2 database
JeppePepp
JeppePeppOP10mo ago
to be clear here. From the image: delete the Postgres (not legacy) instance?
Brody
Brody10mo ago
correct, the postgres service that has the volume attached
JeppePepp
JeppePeppOP10mo ago
easiest way to do a backup before i case something just goes to hell and fire ?
Brody
Brody10mo ago
a backup of the v2 database that you are about to delete?
JeppePepp
JeppePeppOP10mo ago
yes. I dont really know how everything works in the background. Wanna be sure that i have a backup of the data in v2 before deleting it. At least it has almost all data
Brody
Brody10mo ago
do you use any database client apps like dbgate, dbeaver, pgadmin, etc? I'm pretty sure all those clients have native export functionality you could look into
JeppePepp
JeppePeppOP10mo ago
yes dbeaver. But i guess db_dump will work. Ill give it a try before continue. Ill find a way 🙂
Brody
Brody10mo ago
but you where still connected to your legacy database up until it was shut down last night, so the new database would only have new data since you switched last night
JeppePepp
JeppePeppOP10mo ago
yes the new data is kinda nothing. So no worry about that. I just do not wanna lose the current (with the negative delta) and for some strange reason the legacy disapears as well. Then im kinda screwed
Brody
Brody10mo ago
no worries
JeppePepp
JeppePeppOP10mo ago
Okej last question. Delete volume or delete service?
Brody
Brody10mo ago
both
JeppePepp
JeppePeppOP10mo ago
kool thnx Everything worked just fine! thanks for support ⭐
Brody
Brody10mo ago
you've re migrated to a new new v2 database?
JeppePepp
JeppePeppOP10mo ago
yes have you changed so when deleting a service in one environment you dont delete the services/instances in other environments?
Brody
Brody10mo ago
yes but that only applies for services, if you delete this legacy plugin it will delete it from all environments still but I have to make sure, are you using a variable reference now?
JeppePepp
JeppePeppOP10mo ago
alright. No i dont. But im just reading upon it. Will update so its used
Brody
Brody10mo ago
did you need the link to that docs page? or you got it handled?
JeppePepp
JeppePeppOP10mo ago
I got the link in when i tried to add / read more. So i got it
Brody
Brody10mo ago
perfect! happy to help
Want results from more Discord servers?
Add your server