Switching to mongoDB on running project


#1

Hi there

I have a running project with a lot of entries in my collections. (I’ve built an eCommerce with over 1000 entries in my “Orders” collection)

I need some of the mongoDB features, and I am currently running with the default SQLite configuration. Is it safe to just swap over to mongoDB, or will I lose all the data currently stored then?

And if I do lose all data, is possible some how to make the swap without data loss?


#2

You would need to export the data and the import it again. I’ll do some tests and tell you if it is possible without losing the item ids.

greets
artur


#3

Hi Sebastian and Artur,

I’m chiming in here since I’m attempting to do the same, any best practices or further hints on how to get this done?
Thanks, Fabian


#4

try to run the command line tool (in cockpits root folder)

./cp export --target /path/to/folder

import the data again on cockpit instance with the mongodb connection:

./cp import --src /path/to/folder

there might be some issues, when you’ve started with an older Cockpit version. the generated ids weren’t compatible with mongodb. this was fixed in v0.6.1


#5

thanks, good that we’ve been using v. 0.5.3 :sob: