Firebase migration

Hello Mongo community, I was wondering if it’s possible to migrate from a Firestore db to Mongo DB Atlas, Im developing an IOS app using Firebase (Auth, Firestore, Storage) for now for my lack of back-end knowledge , but if my app scales up I’d like to switch to Mongo in the future , will there be problems? Thanks

@Marco_Vastolo There are definitely similarities between Firebase and MongoDB Realm - particularly in how the data is stored in Firestore and MongoDB Atlas - the data follows a document model and is namespaced into collections.

In any migration you will need to do a bit of refactoring in in order for the different systems to work. For instance, the Realm client SDKs use an object database which is reflected from your object model definitions whereas with Firestore, the data is cached locally as a document which can then be mapped to your data layer of choice if you wish (SQLite or Classes) or used as a document directly.

One thing to keep in mind is that in any of these systems there is typically no way to migrate user accounts unless you manually store them yourself. This is because the passwords are hashed and salted based on different algorithms and there is not a way to transfer these to a different system and have them authenticate successfully. This means that users will need to register a new account with the new system - there are ways of creating a mapping between the two but it can be brittle.

I hope this helps

3 Likes