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

Can't find mongodump on Windows/Docker

I am trying to dump my mongodb, which is currently in a docker container on windows. I run the following command: docker run --rm --link docker-mongodb_1:mongo --net docker_default -v /backup:/backup mongo bash -c "mongodump --out /backup/ --host…
user1816907
0
votes
2 answers

What is "create" in mongo dump files?

I am trying to restore a mngo db from dump. Here is sessions.metadata.json snippet: { "options": { "create": "sessions", "flags": 1 }, "indexes": [ { "v": 1, "name": "_id_", "key": { "_id": 1 }, …
Cherry
  • 31,309
  • 66
  • 224
  • 364
0
votes
0 answers

Mongodump database with prefix

I am running into a situation where I want to only dump and restore mongo databases that contains the prefix "user" i.e user_5956ed801cc421a7a0c3132e. I am working on an App where every user gets his/her own database. Is this possible to achieve…
Yasin Yaqoobi
  • 1,888
  • 3
  • 27
  • 38
0
votes
2 answers

How to run mongodump command in spawn/exec child process with arguments

I need to run mongodump command with below arguments var dbhost = mongoose.connection.host || "127.0.0.1", dbport = mongoose.connection.port, dbname = mongoose.connection.name, dbuser =…
Srinivas
  • 147
  • 3
  • 15
0
votes
1 answer

How to copy 5TB mongodb to a new machine within LAN

I've tried: SCP the (custom) DB directory from old machine to new machine - didn't work. Mongo complained of corrupt wiredTiger files Ran mongodump and mongorestore - took about 5 times as long. The process was interrupted by someone who thought…
someguy99
  • 177
  • 6
0
votes
1 answer

mongodump fail: error creating bson file, no such file or directory

Trying to backup my data base. My mongoDB version is: 3.0.12 I am getting this error: $ mongodump --out . 2017-05-19T09:45:29.536+0000 Failed: error creating bson file `city/address_/house_sensors:power_sensors.bson`: open…
sabrina2020
  • 2,102
  • 3
  • 25
  • 54
0
votes
1 answer

mongodump no space on device error

Ubuntu 14.04 MongoDB shell version: 2.4.9 doing backup of mongodb used for ceilometer in OpenStack Kilo. get no space error during back. Where is partial back file? What file do I delete to get rid of the partial backup file. How do I recover the…
latenite4
  • 23
  • 6
0
votes
1 answer

mongodump , mongorestore , mongoimport and mongoexport

Among mongodump , mongorestore , mongoimport and mongoexport which one isn't required to run against a running mongod or mongos . I've refereed to the documentation it says mongodump, mongoimport and mongoexport require a running mongod or mongos…
0
votes
1 answer

Best practice mongodump backing up 250GB database

I'm tring another aproach. Full dump and the daily dump of new data using: oid=$(mongo --quiet --eval 'ObjectId.fromDate(ISODate("2017-03-29 00:10:20"))') mongodump -q "{_id:{$gt:$oid}}" -d dbname --collection name_data But I'm getting: Failed:…
basante
  • 515
  • 3
  • 9
  • 20
0
votes
2 answers

mongodump - What am I doing wrong?

I'm running mongo 2.6.5 & Ubuntu 14.04 I run the command; mongodump -d MyDBname -o /home/mongobackup and I get the following error; 2017-02-12T03:19:44.956+1000 SyntaxError: Unexpected identifier I'm new to mongo, and all I want to do is take a…
0
votes
1 answer

MONGODB, stuck with dump and delete large data

I have problem with "dump" then "delete" large data MONGODB db have already index fields need to query total data ~50m records filtered data have to dump and delete ~5m 3 server: -- MONGO t2.medium -- SIDEKIQ t2.small -- OTHER SERVER t2.small…
Peter89
  • 706
  • 8
  • 26
0
votes
3 answers

Mongodump not working on AWS EC2 instance

I tried Mongodump on AWS EC2 instance. There is no error, but the files are not dumped. [ec2-user ~]$ sudo mongodump --host localhost:27017 --db test--out /var/backups/ connected to: localhost:27017 2017-01-19T01:56:05.608+0000 DATABASE: test to…
user2325247
  • 774
  • 1
  • 7
  • 18
0
votes
0 answers

Migrating MongoDB server from a local machine to AWS EBS

I have a mongodb server running locally on a machine and I want to migrate it to AWS EBS. The only option that I found was to use mongodump on my local machine and then copy this dump to my EBS machine manually. Is there any other way to do this if…
Swapnil
  • 1,870
  • 2
  • 23
  • 48
0
votes
2 answers

How to export a single field from a collection in MongoDB?

I want to export a single field from a single collection. Like collection name is products and field name is tag. All tag will create new collection. I have tried this command: mongodump --host 192.168.1.46 --port 27017 --db myDb --collection…
0
votes
0 answers

Converting or copying uncapped collection to capped

My use-case supports capped collections. So, trying to convert or copy existing uncapped collection to capped collection. Conversion/Copy are successful. But the problem is there are no enough records as original contain. Uncapped…
srikanth
  • 958
  • 16
  • 37