Hi Lyn,
I have Mongodb 2.6 version installed on server and the physical file for each database consists of
databasename.0
databasename.1
databasename.2 …
and 1 .ns file
databasename.ns
These are MMAPv1 physical files. The MMAPv1 storage engine was the default (and only) storage engine for MongoDB version 2.6.x.
I’ve now got another database server with 3.2 installed and noticed the filestructure is completely different.
The files i can see are a bunch of collection-nn-nnnnnnnnnnnnnnnn.wt and index-nn-nnnnnnnnnnnnnnnnnnnnnn.wt files.
These are WiredTiger physical files, which is currently (as per MongoDB version 3.2.x) the default storage engine employed by MongoDB.
Is there a configuration or parameter to set so that the filestructure contained by database??
No. The file structure is determined by the selected database storage engine and cannot be changed. I would also strongly discourage copying individual files between dbpath
(especially on a running mongod
instance) as this will likely introduce data corruption.
If you need to copy one database to another server, you might want to take a look at the db.copyDatabase()
command instead.
Also, there are many advantages of using WiredTiger compared to MMAPv1, such as:
Unless you have a very specific need for MMAPv1 features, I would recommend you to use the WiredTiger storage engine instead due to WiredTiger’s generally better performance, concurrency abilities, and compression capabilities. Also, MMAPv1 files may be larger compared to the actual data size, due to storage padding and fragmentation.
Best regards,
Kevin
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/cRz6jrl-UFU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/bf793ec2-2965-4dc3-9273-ea5e217943d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.