Sign in
Log inSign up

How to restore MongoDB shards data in mongos?

Ahmed Ashraf's photo
Ahmed Ashraf
·Nov 28, 2016

Hi there, I have a mongos with 3 config servers and 3 shards . today we found 30 GB missed from our collection and we sure these 30 GB in the third shard . the mongos was connection to this shard using port 27017 and the other shards used 27018 .. so I changed the port of third shard to be 27018. but no thing changed .. while I was trying to retrieve these missed data I run flushconfig command .. after this command all databases and shards removed from mongos .. and I can't get them back :( ..

how can I reconnect config servers and shards to mongos and get my whole data again ..

PS the directory /data/db have a lot of files with my collection names in one of each shards

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct