found the solution by myself.
use db.printCollectionStats()
in the output you will find the mentioned algorithm in the "wiredTiger.creationString" section.
"wiredTiger" : {
"metadata" : {
"formatVersion" : 1
},
"creationString" : "allocation_size=4KB,app_metadata=(formatVersion=1),block_allocation=best,block_compressor=zlib,cache_resident=0,checkpoint=(WiredTigerCheckpoint.1=(addr=\"018181e4de542a6a8281e4f2e09da0808080808080e21fc0dfc0\",order=1,time=1440667794,size=8192,write_gen=2)),checkpoint_lsn=(2,25344),checksum=on,collator=,columns=,dictionary=0,format=btree,huffman_key=,huffman_value=,id=15,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=64MB,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,value_format=u,version=(major=1,minor=1)",
"type" : "file",
just look for block_compressor
That error implies there is already data in TestDataBase.testCollections
. You might consider using the --drop option:
Before restoring the collections from the dumped backup, drops the collections from the target database. --drop does not drop collections that are not in the backup.
When the restore includes the admin database, mongorestore with --drop removes all user credentials and replaces them with the users defined in the dump file. Therefore, in systems with authorization enabled, mongorestore must be able to authenticate to an existing user and to a user defined in the dump file. If mongorestore can’t authenticate to a user defined in the dump file, the restoration process will fail, leaving an empty database.
Best Answer
You can only use a single storage engine type per
mongod
instance. There is only a singledbPath
setting for amongod
deployment, and you cannot mix & match data files from different storage engines within the same data path.However, you can use different storage engine configurations within members of a replica set (for example, mmap primary and WiredTiger secondaries). If you do this, you should be wary of differences in performance and be sure to test thoroughly in a QA/staging environment with representative workload.
Another available option is to set storage-engine specific options when creating a collection. For example, you could override the instance-level defaults for WiredTiger and set different options for specific collections (i.e. higher level of compression, or perhaps no compression).