Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mongodump]

The tag has no usage guidance.

0
votes
0answers
40 views

Mongoexport and mongodump disk usage rationale

I just had an interesting experience with the mongoexport tool and came out with a doubt about the exporting process' disk usage. I was trying to dump a 50 MB collection to a disk that had 3 GB free ...
0
votes
1answer
41 views

Mongoexport halts when it reaches 101 records

I'm trying to dump a MongoDB collection from a remote server to a local JSON file. First, I do some ssh port forwarding to begin with: ssh -NL 12345:localhost:27017 $REMOTE_USERNAME@$REMOTE_HOST &...
0
votes
2answers
37 views

mongodump download collections only if changed

If I get it right if to make mongodump in to directory that already contains previous dumped data it will still download full collection data even if is not different from data containing in the dir ...
9
votes
2answers
5k views

Mongodump: Unrecognized field 'snapshot'

I am using mongodump from mongo tools to download a backup of my server. However as I run the command, the command returns "Unrecognized field 'snapshot'". The full error is: Failed: error reading ...
0
votes
1answer
614 views

Mongodb _id Value and Indexes Are Lost During Mongorestore

Steps I used: mongodump copy dump folder to another computer (for each collection I get .bson and metadata files) mongorestore myDumpFolder I noticed the indexes are lost and _id has new ...
1
vote
1answer
892 views

mongodump 3.4.1 error reading collection: Closed explicitly [closed]

[BACKUP COMMAND]: mongodump -u username -p password -d database --port port -o output path. [ISSUE]: error writing data for collection to disk: error reading collection: Closed explicitly. The ...
2
votes
1answer
247 views

Reliability of mongodump

I understand that the recommended way to backup MongoDB data is to use file system level tools. However, mongodump utility is promoted as a valid alternative for smaller instances, when file system ...
1
vote
2answers
1k views

Failed to import a mongodb database with duplicate fields

I'm trying to import a mongodb database and I've been using the mongorestore command, the import starts without problems until it gives the error: Failed: dbprod.mys_account: error creating collection ...
0
votes
1answer
108 views

mongodump sharded collection size is smaller after restoring

I need to change shard index from range to hashed in a sharded collection. So I need to mongodump and restore the collection. I have 3 shards with 3 replica sets.MongoDB version is: 3.2.11 I started ...
3
votes
2answers
1k views

MongoDB restore with replica set

I have MongoDB setup like this: Primary | Server1 -----------+--------- Secondary | Server2 -----------+--------- Arbiter | Server3 -----------+--------- Backup | Server4 I ...
1
vote
3answers
3k views

What is difference between mongodump and mongoexport?

I know that when we have to take full backup at database & collection level we use mongodump but with mongodump we can take backup of a particular record also so what is difference between ...
3
votes
2answers
8k views

MongoDB import bson files from a folder

I am unable to import (.bson) file on my computer to MongoDB database .I have been trying below commands : 1)mongorestore -d demo -c dcoll C:\data\dump\twitter\tweets.bson and 2)mongorestore -d ...
0
votes
1answer
305 views

Assertion failure _state.get() error in MongoDB during mongorestore

I would like to say i am newbie in mongodb,today i have tried to restore dump file .I am getting the Assertion failure _state.get() during mongorestore dump in my mongod and process has stuck at that ...
0
votes
1answer
290 views

Too much memory is being used during backup

I have mongodb in ubuntu server. DB version : 3.2.8 CPU : 4 Core Memory : 16 GB Disk : 50GB Normally server memory status: Running backup script: DIR=`date +%m%d%y` DEST=DBBackup/MongoDB/$DIR ...
0
votes
1answer
234 views

How to update collections and restore while doing mongorestore?

is there any way that i can update the collection and restore the same from dump created by mongodump cmd . when we do mongorestore , it directly restores from the dump , but my requireemnet is to ...
0
votes
2answers
3k views

Backing up a MongoDB cluster with mongodump?

Can anyone indicate the right way to backup a MongoDB database with mongodump? I have tried: mongodump --host "cluster0-shard-00-00-2djno.mongodb.net:27017,cluster0-shard-00-01-2djno.mongodb.net:...
0
votes
0answers
336 views

Mongodump failing on Primary instance of replica set

I am trying to run a mongodump on a single host of my replica set. This works fine unless that instance is primary in my replica set, then the mongodump fails. If I check the instance and it is ...
0
votes
2answers
451 views

mongodump: are 4 shards with total datasize 575 GB consider a Small Sharded Cluster?

I need to test the restore with Ops Manager. For this I "clone" the production sharded cluster. I create VMs with the same size like production and do mongodump/mongorestore (Ops Manager Deployment). ...
2
votes
2answers
634 views

Unable to configure MongoDB replication without initial sync

I have a big MongoDB database on my production server, which I want to set up as a replica set. I understand that if I enable the replica set option on both servers, it will automatically start to ...