Closed lilyannh closed 7 years ago
Currently, we have 4 variants of how to store data
1) files, it stores in data/[entityFolder]
2) tingoDb, it stores in data/db/[entityName with no extension]
3) neDb, it stores in data/db/[entityName].db
4) mongoDb, it stores where you pointed during monodb setup.
We have migration scripts from files to mongo or tingo only. We use neDb as primary db in the server right now. For switching the server to mongo you need to modify main.js a little bit, see the example: https://github.com/Brewskey/spark-server/blob/dev/examples/azure-mongodb.js
@AntonPuko - can you update the migration script to neDb? Tingo should be completely removed now.
Thanks for the quick update. I was able to migrate my deviceKeys over to neDb.
I have a problem where all my deviceAttributes, users, and webhooks were all set up using Tingo. Is there a way to migrate those over? I can just re-add the webhooks in the particle CLI, so that's not a big deal, but the deviceAttributes and users are a different story...
there isn't tingo - to other
script, but I think you should be able to write it by yourself looking on migrateFilesToDatabase.js
I'm having trouble migrating my data files over to mongo. I've pulled the latest from the dev branch onto a fresh server, installed mongodb, copied over my old data folder, and edited the DB_CONFIG URL to 'mongodb://localhost' in the settings file.
When I run
npm run migrate-to-mongo
I get the following:...but i don't see any changes to the .db files in the /data/db folder.
I have been running a version of the server where the users, webhooks, and deviceAttributes were being stored in database files (these files did not have file extensions - I noticed this version generates new database files with .db extension). The device keys were still individual files in the /deviceKeys folder.