1

I have collection-0-xxx.wt and index-0-xxx.wt files simply copied from another dbpath.

I am wondering if those files are enough to restore the data in MongoDB. If yes, how can I do that? If not, what other files are needed? Thanks!

  1. MongoDB Backup Methods
  2. How to restore .wt backup file to local MongoDB?
justsomeguy
  • 301
  • 1
  • 5
zurich_ruby
  • 111
  • 1

1 Answers1

2

As one other user wrote, that you need to have whole content of dbPath -directory copied. This is called snapshot copy. You can't copy just "some of" those files, copy must include all, and all of those files must be from the same moment of time. This is f.ex. the easiest way to create (fast) secondary to replica set, which primary have huge amount of data.

JJussi
  • 5,873
  • 1
  • 18
  • 19