Hacker News new | ask | show | jobs
Ask HN: Zero-downtime migration from MongoBD to PostgresSQL
1 points by fosron 1214 days ago
Hey,

we are looking for an efficient way to migrate away from MongoDB to Postgres. Were hosted on Mongo Cloud ATM but i dont think theyll provide us a solution.

Key thing is were running a system which can not go down, and looking online i could not find anything that seems reliable and would help us to achieve that. Developing an in house solution for a one-off job also seems to be not the best one.

Maybe someone has experience regarding that, and could at least point in a good way? Would be really helpful. Thanks!

2 comments

I'm afraid there is no quick solution. Your app will have to write to both temporarily and make the switch, no way around adding logic to it.

Even if a multi-DB polyglot proxy/gateway exists, you'd still have to specify the relations, constraints, etc... at which point you'd better do that in your app to avoid lock-in.

Google for "mongodb to postgres downtime". I've found a few detailed articles.

Yeah, thats what i think too, thanks. Hoping for a miracle solution. And also i did google, and i understand that the schema will have to be provided, we can do that, but the actual data transfer is the pain point here. I tried one solution, Airbyte, locally, but its mongo support is in beta, and does not use a feature like WAL, etc.
I can think of a few different solutions for you, depending on your write/read loads and DB size. Unfortunately, I don't think any of your solutions will be quick/easy.

Feel free to schedule a call with me! I've done 3 large NoSQL to PG migrations for different orgs.

[1] https://calendly.com/taylor-town/30min