简体   繁体   中英

MongoDB Indexes from development to production

I'am a newbie with mongoDB. Now I'am developing a personal project. I'm using MongoVUE, and while I'm developing I create my indexes with MongoVUE. But of course the DB im working on is for development. How I copy my indexes, to the production DB? When I pass to production the collections will be empty, how I create those indexes with empty collections?

Script? program to do this? what you recommend?

Thanks!

If you base your setup only on click-tools then you also have to click in production!

There should be code in some language for the bootstrap of a new database with all necessary definitions of indexes, schemas or whatever. This true for every project and every database. I would consider other approaches as running productions in kindergarten-style by people that don't know better. Don't take it personally but we have seen so much similar-style weak deployments without a strategy moving from development to testing to production.

When you create an index with MongoVUE it'll show you the actual MongoDB shell command in the Learn Shell panel at the bottom. Just keep a record of these commands and run them directly through the shell on your production server when you're ready to deploy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM