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 with date in query parameter using shell script

I am trying to take mongodump of a collections of last 24 hours using bash but getting errors as i am unable to use custom date in query parameter of mongodump statement. timeInMs=$(expr "$(date +'%s%3N')" - 86400000) mongodump -u user -p…
vashishatashu
  • 7,720
  • 7
  • 29
  • 34
0
votes
1 answer

Mongodb: Restore database with broken document

I have problem to restore our database with broken document. mongorestore stops to restore when broken document came out. Here is error. INVALID OBJECT - going to try and print out size: 2760 error: bson length doesn't match what we found in object…
goldenhordes
  • 65
  • 1
  • 7
0
votes
1 answer

MongoDB: FailedToParse: Bad characters in value

mongodump command: mongodump --host myhost.com --port 12345 --username myUsername --password PSWRD --out /opt/somepath --db myDb --collection my_collection --query "{ content_type_id: { \$not: { \$eq: db.my_type.findOne({slug: 'form_submissions'}…
Jackie Chan
  • 2,654
  • 6
  • 35
  • 70
0
votes
1 answer

How to use query in mongodump on embedded documents

I'm trying to do a mongodump with query. Below is my syntax. mongodump --db mydatabase --collection records --query '{ "embedded_document.field_1" : { "$ne" : "Zebra" }}' -vvvv What I'm trying to do is dump all records with…
Ben
  • 1,370
  • 17
  • 42
0
votes
2 answers

MongoDB 2.2: why didn't replication catch up a collection following a dump/restore?

We have a three-server replicaset running MongoDB 2.2 on Ubuntu 10.04, and recently had to upgrade the hard drive for each server where one particular database resides. This database contains log information for web service requests, where they…
Alan
  • 3,715
  • 3
  • 39
  • 57
0
votes
1 answer

MongoDB: How to ensure success of mongodump in archiving process before deleting collection?

Our application logs a large amount of data and as a result we have to archive the data and move it off of the production machine once per week. Right now this is a manual process, but I am automating it. Basically, I use 'mongodump' and compress…
jteezy14
  • 436
  • 4
  • 11
0
votes
3 answers

Which is my database in mongodb?

Next question in reference with previous one Where does mongodb store databse in ubuntu? $ cd /var/lib/mongodb/ $ ls ihtx.0 ihtx.1 ihtx.ns journal local.0 local.ns mongod.lock Here, I can see ihtx.0 ihtx.1 ihtx.ns three files with the same…
Laxmikant Ratnaparkhi
  • 4,745
  • 5
  • 33
  • 49
0
votes
0 answers

MongoDB point in time recovery

I'm attempting to perform a Point in Time oplog restore and the system tells me my oplog on the running system is newer than the oplog I'm attempting to restore from and bails out. I'm using mongo 2.4 mongorestore --port…
Chad Prey
  • 147
  • 2
  • 4
0
votes
1 answer

Should I compact a MongoDB database before mongodump/mongorestore?

I have a database that hasn't been compacted in a while so its disk size is much larger than actual data and index sizes. I'll be moving it to another database and would like to know: would compacting speed up mongodump does mongorestore rebuild…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
0
votes
1 answer

Mongodump using DBRef criteria and indexes?

I want to dump some part of a database, especially some part of a collection using the -q / --query option. Here is what I'm doing: mongodump --host ... -o ... -q "{ pipe: DBRef(\"pipe\", ObjectId($2)) }" The dump is operating but is strongly slow.…
user2619608
  • 111
  • 1
  • 3
0
votes
0 answers

mongodump --oplog on empty db throws segmentation fault?

I installed mongodbfrom scratch from the 10gen source on a fresh Ubuntu 13.04 Digital Ocean image: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist…
wackazong
  • 474
  • 7
  • 18
0
votes
0 answers

mongodump via vmc tunnel to cloudfoundry hangs up

For some reason the process of the mongodump via tunnel hangs up at the same collection each time. If I break the process, files with collection has size near 39Mb. I can't understand what's happened.
Voj
  • 1
0
votes
1 answer

Mongo import/dump not working with replica set

I have a problem doing backups of replica set mongodump. Validated the same problem with mongoexport just out of curiosity. Here is my setup: mongodb-linux-x86_64-static-legacy-2.2.0 3 nodes replica set (as of time being healthy) PRIMARY>…
Jan Zyka
  • 17,460
  • 16
  • 70
  • 118
-1
votes
1 answer

Error importing collections into a mongodb database on an ec2 instance

I exported the collections from a local database and I want to import them into an ec2 instance. I did the following: 1) I exported the collections to a folder called data. The files are in this…
E. Biagi
  • 452
  • 3
  • 12
-1
votes
1 answer

How to use mongodump to export specified collections only

I checked the mongodump docs, and I found this: --collection=, -c= Specifies a collection to backup. If you do not specify a collection, this option copies all collections in the specified database or instance to the dump…
NeNaD
  • 18,172
  • 8
  • 47
  • 89
1 2 3
24
25