Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recovering a missing WiredTiger.wt

Tags:

mongodb

nodebb

Is there a way to regenerate a missing WiredTiger.wt? Our MongoDB instance stopped working (bizarrely), and that file got missing from the dbpath folder—Seems like this behaviour is known.

BTW, the repair utility doesn't succeed:

file:WiredTiger.wt, connection: .//WiredTiger.wt: handle-open: open: No such file or directory

Losing the database is hard to stomach...

Any idea? Thanks.

P.S. We still got all the other .wt files.

like image 529
Azzouz Avatar asked Nov 30 '16 14:11

Azzouz


People also ask

What is wt file in MongoDB?

wt files contain the data of the MongoDB collections and indexes that you observe as a client connected to a MongoDB instance. Once you've identified the WT ident value for the collection or index you want to inspect you can use that in the URI argument to the wt dump command.

How do I view a .WT file?

You need a suitable software like WildTangent to open a WT file. Without proper software you will receive a Windows message "How do you want to open this file?" or "Windows cannot open this file" or a similar Mac/iPhone/Android alert.

What is WiredTiger storage engine?

WiredTiger is the default storage engine starting in MongoDB 3.2. It is well-suited for most workloads and is recommended for new deployments. WiredTiger provides a document-level concurrency model, checkpointing, and compression, among other features. In MongoDB Enterprise, WiredTiger also supports Encryption at Rest.

What is WiredTiger wt file?

wt backup. Perform a backup of a database or set of data sources. The backup command performs a backup of the database, copying the underlying files to a specified directory, which can be subsequently opened as a WiredTiger database.


1 Answers

The WiredTiger.wt file includes essential metadata about a MongoDB data directory: which collections & indexes exist as well as the latest checkpoints in each of those files. If WiredTiger.wt has been completely removed from your dbPath there is currently no process or tool to recreate this metadata, short of restoring the full dbPath from a backup copy. While you do have data files, you've unfortunately lost the catalog describing what these files contain and how they relate.

like image 102
Stennie Avatar answered Oct 20 '22 17:10

Stennie