Questions tagged [mongodump]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
8 views

mongodump and restore in single command

How to perform mongo DB dump and restore in a single command, by providing source and sink DB and collection name separately? I understand we can do mongodump and then mongorestore but if I need to ...
1
vote
1answer
201 views

mongodump command with timestamp query

When I execute the below query in mongodb shell, it gives me the number of records updated after the mentioned timestamp. db.getCollection('oplog.rs').find({"ts":{"$gt":Timestamp(1582823397,2)}}) I ...
0
votes
1answer
138 views

How to use variables in a mongodump query

I want to backup data of last day (Current Day-1) every day using cron tasks. In the mongo shell, I can query the data using variables as below: var start = new Date(); start.setHours(0,0,0,0); ...
0
votes
1answer
116 views

Mongo: mongodump and the config database error

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database: (Apologies for the image, I ...
1
vote
1answer
577 views

mongodump fails after exactly 10 minutes

Using single instance MongoDB v4.2.0 on Debian 9.11 with collection of 78GB and 60M documents on a 2 vCPUs, 13 GB memory server. This command is invoked on the same server where database runs: ...
0
votes
0answers
12 views

mongorestore mongodump

please advise if mongodb provide support mongorestore from older version to new version and vice versa. I would like to restore database from 3.2 to version 4.0 and second database from version 3.6 ...
0
votes
0answers
24 views

Backup and restore a subset of a mongo collection that includes all the GridFS references and related document?

I have a big collection in MongoDB GridFS database. How can I backup a subset of the collection by date filter and all the GridFS related collection in the chunks, files and gridfs bucket will be ...
1
vote
0answers
8 views

Mongodb - Small and Larger deployment

I read the following information from "https://docs.mongodb.com/manual/core/backups/" "mongodump and mongorestore are simple and efficient tools for backing up and restoring small MongoDB ...
0
votes
0answers
199 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
224 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
452 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 ...
40
votes
3answers
25k 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 ...
1
vote
1answer
2k 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 ...
2
votes
1answer
3k 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
461 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
3k 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
279 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
4k views

MongoDB restore with replica set

I have MongoDB setup like this: Primary | Server1 -----------+--------- Secondary | Server2 -----------+--------- Arbiter | Server3 -----------+--------- Backup | Server4 I ...
6
votes
3answers
9k 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 ...
4
votes
2answers
17k 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
537 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
566 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
458 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
6k 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
2answers
732 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
1k 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 ...