Hi when I do a mongorestore to dump my database ok
if I had:
> show dbs
local (empty)
test 0.203125GB
it became:
> show dbs
local (empty)
test 0.203125GB
ok 0.203125GB
but if I do a db.getCollectionName() it just prints
> db.getCollectionNames()
[ "system.indexes", "test", "users" ]
I want ok to appear here, how can I do ?
thanks
Okwill never appear in the list of collections, becauseokis a database, not a collection. Databases contain many collections, but aren't collections themselves.To see the collections in the
okdatabase, typeuse okfollowed bydb.getCollectionNames();.If you want to backup and restore a single collection, then you'll need to use the
--collectionarguments to mongodump and mongorestore. See the documentation for more info.