Questions tagged [mongodump]

The tag has no usage guidance.

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

MongoDB dump oplog based on timestamp

I'm trying to dump oplog.rs from local database, based on timestamp. Query directly from mongo shell works but not from mongodump Query from mongo shell RS1:PRIMARY> db.oplog.rs.find({"ts" : {$gt ...
0
votes
1answer
17 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
525 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
349 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
149 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
895 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: ...
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
219 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
272 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
496 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 ...
47
votes
4answers
29k 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
501 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
3answers
4k 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
318 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 ...
4
votes
2answers
4k views

MongoDB restore with replica set

I have MongoDB setup like this: Primary | Server1 -----------+--------- Secondary | Server2 -----------+--------- Arbiter | Server3 -----------+--------- Backup | Server4 I ...
10
votes
3answers
10k 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
18k 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
568 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
611 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
505 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
786 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 ...