Start a new topic

Migration Strategy?

Happy new year everyone.

Has anyone had any successful strategy when it comes to managing data migration on a Kinvey database? I understand that this is a common problem with MongoDB and other NoSQLs but figured there may be a Kinvey-specific way, rather than upgrading the document structure in bulk manually (by that I mean writing a script that would be run against the entire database).

My initial thought would be to use Business Logic's collection hooks to version the data structure. Is this strategy too costly in terms of time and resources compared to the _potential_ cost of messing up data integrity in a manual migration?

Thank you for your opinions and have a wonderful new year.

Hi Kenneth,

The app "Fetchnotes" did a migration to Kinvey. I'll see if they're able to share some tips.
When you say "Managing data migration on a Kinvey database" what exactly are you trying to accomplish?
I meant data schema migration. We constantly needs to incorporate new APIs, making us especially susceptible to changes to the document structure within our Kinvey database, which is basically schema agnostic because of MongoDB being a document database. Managing different data structure expectations across our different app versions has proven difficult.
Ah I see, this is something I unfortunately don't have experience with. Were I in your situation I would most likely use Collection hooks and BL and automate as much as possible.

Anecdotally, manual migration usually turns out to be costlier in every way.
"Manual migration usually turns out to be costlier in every way." That's a sage advice in every sense Alex, especially in our case we need to do it quite frequently.

And we have indeed been thinking about using collection hooks to provide a versioned API. It's going to be quite a large project if there isn't any other way...
I'd get an opinion from someone directly at Kinvey before you start a huge project but automation is usually best.
That would be fantastic! Thanks Alex. Look forward to any smarter way of going about it.
Login or Signup to post a comment