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

Mongodump multiple dbs in sh script on same server/auth credentials

I have created this sh script #!/bin/sh DIR=`date +%d%m%Y` DEST=/home/user/backup/$DIR mkdir $DEST mongodump --host=same --port=same --username=same --password="same" --db=db1 --out=$DEST mongodump --host=same --port=same --username=same…
user2829319
  • 239
  • 4
  • 16
0
votes
1 answer

Mongodump cannot specify username and uri

I had the following command but it doesn't work. Please help. mongodump --uri="130.164.10.1:27017,130.164.10.2:27017,130.164.10.3:27017/?replicaSet=rs0" -d mydb -u admin -p myPass -o C:\myDump I am using mongodb 4.2. I got error "cannot specify…
jxStackOverflow
  • 328
  • 1
  • 7
  • 17
0
votes
2 answers

mongodump is abruptly getting killed inside a container of mongo:latest image

I am running a container with image mongo:latest. Starting the container: sudo docker run -it -v /tmp/adhock-container/mongo_latest:/tmp/ mongo:latest /bin/bash I want to take the backup of Mongo database so I run the following: # mongodump -vvvv…
codeaprendiz
  • 2,703
  • 1
  • 25
  • 49
0
votes
0 answers

mongodump: "there are no users authenticated" but authentication is disabled

I have MongoDB 4.2 on localhost with authentication disabled. I have never even created any users. But When I try to use mongodump like this: mongodump --uri mongodb://localhost:27017 --out dump I get there are no users authenticated. I am on…
chrispytoes
  • 1,714
  • 1
  • 20
  • 53
0
votes
1 answer

Mongodump 0 document dumped

I've got a problem with mongodump command line inside a docker container. I'm trying to dump some document of a collection by using query parameter. When I run the command, sometimes I've got my results, sometimes I have nothing... I would like to…
Joe Allen
  • 1,267
  • 4
  • 24
  • 41
0
votes
0 answers

Windows Batch Script for Automated Mongodb Backup

I have setup a superuser in mongodb and I am able to do a backup manually in the command line or connect to the database with the username and password in the console or in Compass, but if I move that command to a batch script and run the script, I…
Eddy
  • 145
  • 14
0
votes
1 answer

mongodump 1 single document fails because ObjectId

I'm trying to create a mongo dump for 1 single document inside a mongo collection. When I do this on windows command line: mongodump /host:x.x.x.x /port:27017 /username:my_user /password:my_pass -d my_db -o C:\fsdump -c "fs.files" -q '{_id:…
TomTem
  • 89
  • 9
0
votes
0 answers

MongoDB restoration fails on linux

i am facing issue while restoring mongodb it is showing an error here the snip for my error ulimit is set to 64000 but still facing this error can any one please help thankx in advance
0
votes
0 answers

Latest version of mongorestore very slow when restoring backup made with old version of mongodump

I am using mongorestore 4.2 mongorestore --gzip --archive=my-archive.gz to restore a backup made with mongodump 3.2(ish?) and the process is very, very slow. Like I haven't even seen one completed because it's been running for 3 days slow. Is…
orpheus
  • 479
  • 1
  • 7
  • 20
0
votes
0 answers

how to run mongodump command from child process?

I am trying to run the mongo dump command from child process here is the code from command prompt the command which is present inside cmd variable is working fine. using spawn it is not. I am not getting how to add mongo url and dump command inside…
Trang D
  • 333
  • 5
  • 16
0
votes
1 answer

How to stop mongodump safely?

I started a mongo dump and my database is with 95% of storage filled, and I am downloading to my local machine the bson file. But it is very slow and I am afraid to stop mongo dump to increase server storage size, and one observation I am…
0
votes
0 answers

MongoDB Backup and Archiving

We have a MongoDB database of 600+ GB which includes 6 Collections hosted on AWS EC2 Ubuntu 14 Instance (m4.2xlarge). I have 2 queries: 1) How to backup 600GB of database safely? 2) How can I archive the MongoDB Database periodically without any…
Pritish Pandey
  • 129
  • 1
  • 8
0
votes
1 answer

Migrate local mongodump into a docker container

I was using the local mongo database. Now I dockerized my entire application on another remote system including MongoDB. So that, I need to migrate my local mongo dump into the docker container. How can I import all the data from local MongoDB to…
0
votes
0 answers

Why am I receiving "error connected to db server: no reachable servers" after importing GZipped Archive file(.agz) to Studio 3T?

I have my database running on a docker container and I want to upload data stored in GZipped Archive file (.agz) to Studio 3T using Mongodump import. However, when I click execute it returns an error: "Import mongodump archive error connecting to db…
Joe P
  • 63
  • 1
  • 8
0
votes
0 answers

How to persist a restored db in my container so that it can be reused

When building a docker image, I'm dumping an external db on a directory inside my container using mongodump, then I start a mongodb and execute a restore (mongorestore). Everything seems to works fine when seeing the log. My goal is to deliver…
Chab
  • 1
  • 1