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
0
votes
1 answer

Why is mongodump performing a COLLSCAN?

I am trying to do a monogdump action to export DB, all records. There's no query parameters passed to the mongodump command as well. MongoDB version is 4.4.3 I still see that it's performing a COLLSCAN from the mongo logs. { "t": { "$date":…
swateek
  • 6,735
  • 8
  • 34
  • 48
0
votes
1 answer

Dumping and restoring MongoDB in a single command

I'm trying to dump an existing MongoDB into a new MongoDB without using dump files at all. Is there a way to pass data from mongodump into mongorestore using pipes? something like this: mongodump --host=0.0.0.0 --port=27017 --db=database_name |…
Alon Barad
  • 1,491
  • 1
  • 13
  • 26
0
votes
1 answer

How do I convert an array of objects / subdocuments to an array of strings in a MongoDB Aggregation pipeline?

I have documents with the following structure { "_id":{"$oid":"..."}, "work_type": "ASSIGNMENT", "materials": [ { "driveFile": { "driveFile": { "id": "...", "title":…
FaultyJuggler
  • 532
  • 1
  • 8
  • 29
0
votes
1 answer

mongoexport / mongodump with option --uri

During my studying of MongoDB I tried to dump a collection from training course's mongo database. I tried both mongodump and mongoexport. My shell command is like mongoexport…
Yuriy L.
  • 95
  • 12
0
votes
2 answers

Spawn mongodump cluster in nodeJs exit code 1

I want to run mongodump to a cluster in Mongo Atlas. I have copied the code to do this from Mongo Atlas. mongodump --uri mongodb+srv://lims:@cluster0.f3zyz.mongodb.net/ If I replace "PASSWORD" and "DATABASE" and run the command…
Javier salvañá
  • 191
  • 2
  • 16
0
votes
1 answer

mongodump - query for one collection

I'm trying to write a mongodump / mongorestore script that would copy our data from the production environment to staging once a week. Problem is, I need to filter out one of the collections. I was sure I'd find a way to apply a query only on a…
0
votes
1 answer

MongoDB: Queries running twice slow on NEW server compared to OLD server

I transferred current/old running DB into a new standalone server for MongoDB. To do this, I performed the following: Took dump of data from OLD server Restored data from the generated dump into NEW server Configured the server for…
Temp O'rary
  • 5,366
  • 13
  • 49
  • 109
0
votes
1 answer

Clone mongoDB collections

I have different servers with mongoDB in it. What is the best way to clone one collection from one server to another ? I did use mongodump (using Studio 3T) and create a BSON archive of the collection I want to copy on the another server. To do so I…
thefwguy
  • 85
  • 1
  • 11
0
votes
1 answer

How to install MongoDB tools on Mac

I want to use some of the tools on MongoDB tools (for example mongoexport, mongodump). I downloaded MongoDB tools from their download page which gave me a zip file. I unzipped it, but it was not clear how to install the tools. So I just copied…
Andrew Einhorn
  • 741
  • 8
  • 23
0
votes
0 answers

Passing MongoDB user password in newline for Mongodump command using bash script

I am trying to backup a MongoDB instance that has authentication enabled but i get this error: $> mongodump --username=admin --password=******* --authenticationDatabase=admin --db=ixpay --collection=blacklist --out=. 2020-06-02T21:39:39.086+0000 …
Nnamdi Jibunoh
  • 156
  • 1
  • 8
0
votes
0 answers

MongoDB gives out of memory at dumping

I have a database which is almost 4gb size which working on 16GB memory, 6 core Ubuntu 18.04. I write a cron which backup database at specific time everyday, but yesterday, firstly it occured an error which is Out of memory at backup process and…
Tony Stark
  • 135
  • 3
  • 13
0
votes
0 answers

How to build the mongo tools 4.2.1 version from source on windows

I need to compile / build mongo-tools 4.2.1 version on windows machine. I dont see .bat file for env setting for the same how its there for linux . Please share the steps . I downloaded the tools code from…
0
votes
1 answer

GCP Cron Job MongoDB Backup from mlab

I wanted to set up a way (using GCP) to automatically and frequently download a copy/backup of one MongoDB instance hosted on mlab and use it to restore/populate another MongoDB instance also on mlab. My thought process was as follows: Create a…
0
votes
0 answers

Unable to connect to my Mongo DB via SSH or Studio3T

I have an EC2 instance and a Mongo DB. Say my DB credentials were as follow: DB_USERNAME: 'Max', DB_PASSWORD: 'secretPass', //DB_HOST: "20.133.122.121", DB_HOST: "155.5.5.0", DB_PORT: 27017, DB_NAME: 'maxowner' The Custom TCP inbound rule on…
Sammuel
  • 27
  • 5
0
votes
2 answers

Restore dump from older mongo

I’m currently trying to restore a mongodump made with mongodb:3.4-jessie into a newer version, mongodb:4.2.3-bionic. When I try to execute my command: sudo docker exec mongo mongorestore —db=mock —gzip /mongorestore/app It returns me with this…