Questions tagged [mongodump]

Mongodump is a utility for creating a binary export of the contents of a database.

Consider using this utility as part of an effective backup strategy. Use mongodump in conjunction with mongorestore to restore databases.

362 questions
5
votes
2 answers

mongorestore failing on shard cluster v4.2.x | Error: "panic: close of closed channel"

Scenario: I had a standalone MongoDB Server v3.4.x where I had several DBs and collections respectively. As the plan was to upgrade to lastest 4.2.x, I have created a mongo dump of all DBs. Created a shard cluster of config server (replica…
Amol M Kulkarni
  • 21,143
  • 34
  • 120
  • 164
5
votes
1 answer

mongorestore error Failed: EOF when restore DB from dump.gz

I am getting error while importing DB backup using mongorestore command with dump.gz Using following command to restore DB: mongorestore --gzip --archive=dump.gz --nsInclude=MyApp Getting following error: 2019-12-04T14:14:40.352+0530 Failed:…
Nisar Saiyed
  • 728
  • 1
  • 8
  • 17
5
votes
0 answers

Mongodump not dumping all records

I am using mongodump(version 2.4.14) to create a db backup that I restore on another system using mongorestore(version 2.4.14) but all the records are not being dumped and restored in the target mongo(2.4.14) instance. I have tried: Restoring the…
Sushant
  • 324
  • 2
  • 14
5
votes
2 answers

mongodump gives segmentation fault

I have MongoDB v3.2.6 installed on my mac macOs High Sierra v10.13.1 and I am trying to make a backup before I upgrade. I have an instance of $ mongod running in one window using defaut db location and default port. It is my local database, it is…
Kevin Amiranoff
  • 13,440
  • 11
  • 59
  • 90
5
votes
1 answer

Dump remote database: Failed: error connecting to db server: no reachable servers

I have a database in www.myweb.io, which has SSL. The version of mongo is 2.6.12 in the server: the version of mongo in local is 3.4.1. I want to dump it into my local machine, modify it, and then restore back. I tried mongodump --host www.myweb.io…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
5
votes
1 answer

Printing mongodump or mongorestore command output to a log file

I am using this command to save output to a file. mongorestore --host %computerName%:%_portnumber% -u Admin -p user --oplogReplay %_sourceFolder% >> D:\Data\admin\abc.log This creates an empty file and all the output is listed on the command…
user2386411
  • 113
  • 2
  • 9
5
votes
1 answer

MongoDB Remote Backup and Restore

I hope you can help me. It is a question that was asked before, but I have tried all solutions, and simply cannot get it right. I have spend quite some time researching before posting this question. I have looked at the official MongoDB documents…
onmyway
  • 1,435
  • 3
  • 29
  • 53
5
votes
0 answers

What's the performance impact of running mongodump?

What's the performance impact of mongodump util? Will write operations be blocked while mongodump is running? Will read operations be blocked/significantly slowed down? I cannot find any official docs about its behavior, so I'm curious in…
Roman
  • 64,384
  • 92
  • 238
  • 332
5
votes
3 answers

Error 10334 "BSONObj size is invalid" when importing a back up with mongorestore

I have a MongoDB collection backup containing many small documents. The back up was produced by mongodump, but when I try to import it using mongorestore I get an error: AssertionException handling request, closing client connection: 10334 BSONObj…
Jonathan Lee
  • 116
  • 1
  • 9
5
votes
0 answers

Mongodump Fails Frequently After upgrade from 2.6 to 3.0

I'm in the process of upgrading our database to Mongo 3.0, and I'm at the step of upgrading our daily backups process from using mongodump 2.6.1 to 3.0.1, which has has greater performance due to parallelized collection downloads. I'm running into…
mattse
  • 51
  • 7
5
votes
2 answers

mongodump - range query on timestamp filed raising FailedToParser Error

The following is the structure of the documents: { "_id" : ObjectId("4fccd39c9d8597a034d183b1"), "image" : "23ef514f8201320c2d7253e4bf28edf6", "owner" : "1b8c335c902ac4ab128ee8ed773bee04", "pageviews" : 57, "source" :…
rubayeet
  • 9,269
  • 8
  • 46
  • 55
5
votes
2 answers

How to use backup and restore all databases from mongodb?

If i want to do a generic backup for all databases in mongodb, is it that all i have to do is: $ mongodump And if i want to restore the latest dump i've created, all i need to do is: $ mongorestore Where are the backups from the mongodump stored?…
alvas
  • 115,346
  • 109
  • 446
  • 738
4
votes
2 answers

bson vs gzip dump of mongodb

I have a Database with On disk size 19.032GB (using show dbs command) Data size 56 GB (using db.collectionName.stats(1024*1024*1024).size command) While taking mongodump using command mongodump we can set param --gzip. These are the observations I…
best wishes
  • 5,789
  • 1
  • 34
  • 59
4
votes
2 answers

mongodump "Failed: bad option: can only dump a single collection to stdout"

mongodump --out "-" doesn't work, it gives me this message : "Failed: bad option: can only dump a single collection to stdout". What happens ?...
L.G
  • 1,458
  • 4
  • 14
  • 24
4
votes
2 answers

mongodb dump and pipe to other db name

Mongodb version 3.2.12. I have two local databases, "base1" and "base2" I want to copy all data (all collections) from base1 over to base2, replacing everything there (like when dumping production to a dev environment). Any pipe command (or other…
henit
  • 1,150
  • 1
  • 12
  • 28