Questions tagged [mongorestore]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
170 views

unable to perform mongodb oplog recovery

I've taken a oplog backup after the timestamp 1683598975 using below mongodump command on node server. mongodump -u username -p password --host=server --port=8303 -d local -c oplog.rs --oplog --...
unknown's user avatar
  • 94
0 votes
1 answer
2k views

Can't restore `mongodump` archivegz file with `mongorestore`

I generated a MongoDB dump file with the archivegz format. When I try to restore it with the mongorestore command, it won't restore. The command for restore mongorestore --gzip --archive="./...
behroozbc's user avatar
  • 101
0 votes
1 answer
2k views

How to do a mongo restore with Atlas URI

I am trying to do a mongorestore of a few collections . I am trying to use the Atlas URI to do this and it throws an error saying that positional arguments not allowed: [mongodb+srv://hostname.mongodb....
Suresh C Nair's user avatar
0 votes
1 answer
1k views

How do I restore a database using MongoDB 5.0 CLI?

I've just installed the MongoDB version 5.0 CLI tools on my workstation. But now when I go to restore a database like I've always done I get an error: mongorestore mongorestore : The term '...
user99201's user avatar
  • 117
0 votes
1 answer
2k views

Rename all databases when doing a mongorestore?

I have a datadump but I need to change the name of every database while restoring them, if a database is named "customers" it needs to be "customer2", "products" to "...
DB guy's user avatar
  • 69
0 votes
1 answer
312 views

how to mongorestore mongoDB 4.2 to documentDB 4.0?

I need to do mongorestore from my mongodb 4.2 to DocumenDb 4.0 compatible i got the command from aws which is this mongorestore --ssl --host="abc.aws.com:27017" --username=user --password=...
DB guy's user avatar
  • 69
1 vote
1 answer
106 views

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 ...
Temp O'rary's user avatar
1 vote
0 answers
555 views

How to check progress with mongorestore

I'm using mongorestore to move a dump from a location to another. I've to use the quiet flag and I'm on Windows. How can I check for restore progress? Actually I can only check the size of the db on ...
Manuel Castro's user avatar
0 votes
1 answer
405 views

using mongorestore for a db present in my computer

I just started using mongodb so my question might be a little basic. I have a folder with the collections I want to restore(this was a zip file I downloaded from my email). How do I use mongorestore ...
codergal's user avatar
0 votes
1 answer
307 views

mongodump and restore in single command

How to perform mongo DB dump and restore in a single command, by providing source and sink DB and collection name separately? I understand we can do mongodump and then mongorestore but if I need to ...
Shubham A.'s user avatar
5 votes
1 answer
8k views

Failed to restored indexes using mongorestore - MongoDB

Note: I already know about --noIndexRestore I have an org collection with the following document structure, { "_id" : ObjectId("5cc2bf9f5ca45131b8f8e427"), "name" : "National", "parent" :...
Abdul Moiz's user avatar
3 votes
1 answer
738 views

mongorestore from multiple dumps

I have a mongo-database where existing entries never change but new entries are added every day. I have ~1000 dumps, each is the new data that was added on the corresponding day. I.e. I have the ...
Nik's user avatar
  • 133
1 vote
0 answers
15 views

Mongodb - Small and Larger deployment

I read the following information from "https://docs.mongodb.com/manual/core/backups/" "mongodump and mongorestore are simple and efficient tools for backing up and restoring small MongoDB ...
Hanees's user avatar
  • 11
2 votes
3 answers
12k views

MongoDB - Mongorestore is not working as expected

A Very Good Day, I have the user in the mongodb like below who has the superuser privileges (I confirmed the role setting using show users command) { "_id" : "admin.mongoadmin", "user" : "...
Harry's user avatar
  • 71
1 vote
1 answer
3k views

MongoDB merge two collections and drop documents with same value in field

In my database I have two collections, but some documents were added (possibly) at different times to both collections. I could use mongodump and then mongorestore for merging. But then I have the ...
Wuff's user avatar
  • 111
1 vote
1 answer
234 views

Amount of Data transferred out in mongorestore

I'm using MongoDB version 4 Consider I have a database with dataSize 15GB, storageSize 10GB. After I mongodump --gzip it, the file created is of 5GB. Now, If I'm restoring it to a remote machine (M2)...
Dushyant Bangal's user avatar
1 vote
1 answer
3k views

How to restore Mongo DB tar.gz archive

Using the Mongo DB Atlas cloud service (MongoDB Version: 3.4.16), the below backup archive of a MongDB was generated: Cluster0-shard-0-1531635127-5b4b0df33b34b92b0f50a045.tar.gz In this file I can ...
Migul's user avatar
  • 11
2 votes
1 answer
4k views

Mongodb _id Value and Indexes Are Lost During Mongorestore

Steps I used: mongodump copy dump folder to another computer (for each collection I get .bson and metadata files) mongorestore myDumpFolder I noticed the indexes are lost and _id has new ...
Will's user avatar
  • 121
2 votes
1 answer
1k views

How to properly use moveChunk when chunks of certain range needs to be moved?

A MongoDB 3.6.3 database has two shards and a mongodump file with partial data of one collection needs to be restored. The first shard is named "fast" while second "slow". The idea is to restore the ...
ssasa's user avatar
  • 221
1 vote
3 answers
5k views

Failed to import a mongodb database with duplicate fields

I'm trying to import a mongodb database and I've been using the mongorestore command, the import starts without problems until it gives the error: Failed: dbprod.mys_account: error creating collection ...
Arnaldo Raxach's user avatar
0 votes
1 answer
692 views

mongodump sharded collection size is smaller after restoring

I need to change shard index from range to hashed in a sharded collection. So I need to mongodump and restore the collection. I have 3 shards with 3 replica sets.MongoDB version is: 3.2.11 I started ...
Selcen Şahin's user avatar
4 votes
2 answers
8k views

MongoDB restore with replica set

I have MongoDB setup like this: Primary | Server1 -----------+--------- Secondary | Server2 -----------+--------- Arbiter | Server3 -----------+--------- Backup | Server4 I ...
SGRao's user avatar
  • 41
5 votes
2 answers
25k views

MongoDB import bson files from a folder

I am unable to import (.bson) file on my computer to MongoDB database .I have been trying below commands : 1)mongorestore -d demo -c dcoll C:\data\dump\twitter\tweets.bson and 2)mongorestore -d ...
sai's user avatar
  • 51
0 votes
1 answer
744 views

Assertion failure _state.get() error in MongoDB during mongorestore

I would like to say i am newbie in mongodb,today i have tried to restore dump file .I am getting the Assertion failure _state.get() during mongorestore dump in my mongod and process has stuck at that ...
Md Haidar Ali Khan's user avatar