1611 shaares
17 private links
17 private links
5 results
tagged
collection
Moment-iterator is a moment-js addons, to iterate through date range, or create date range.
Infer a probabilistic schema for a MongoDB collection.
Usage
mongodb-schema
can be used as a command line tool or programmatically in your application as a node module.
mongodb-schema mongodb://localhost:27017 db.collection
$ mongodump -d some_database -c some_collection
$ mongorestore -d some_other_db -c some_or_other_collection dump/some_collection.bson
db.originalCollectionName.renameCollection('newCollectionName')
You can select the collection via:
mongodump -d some_database -c some_collection
[Optionally, zip the dump (zip some_database.zip some_database/* -r
) and scp
it elsewhere]
Then restore it:
mongorestore -d some_other_db -c some_or_other_collection dump/some_collection.bson
Existing data in some_or_other_collection
will be preserved. That way you can "append" a collection from one database to another.
Prior to version 2.4.3, you will also need to add back your indexes after you copy over your data. Starting with 2.4.3, this process is automatic, and you can disable it with --noIndexRestore
.