Collection of tools to debug and analyze MongoDB WiredTiger files
In order to use the provided debug tools you need to install wt
binary on your system.
wt
can be compiled from wiredtiger source following this procedure or from MongoDB source using:
ninja install-wiredtiger
Once you have the wt
binary, make sure to add its installation folder to your PATH environment variable.
The wiredtiger package provided in major Linux usually provides a very old version of wt
that is not capable of processing .wt files produced in newer versions.
The wiredtiger-debug-tools
package is available on PyPI
pip install wiredtiger-debug-tools
- Print list of collections contained in the
_mdb_catalog
wtd list-collections
- Inspect content of a specific collection:
wtd cat local.oplog.rs
You can use FZF to interactively select the the collection to open
wtd cat `wtd list-collections | fzf | cut -d " " -f1`
To enable CLI auto-completion on ZSH shell run:
eval "$(_WTD_COMPLETE=zsh_source wtd)"
On Bash shell:
eval "$(_WTD_COMPLETE=bash_source wtd)"