SkillAgentSearch skills...

PyWT

Python script to delve into MongoDB's WiredTiger data files

Install / Use

/learn @kevinadi/PyWT
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PyWT

Python script to delve into MongoDB's WiredTiger data files

Requirements

  • pip install pymongo
  • pip install wiredtiger
  • pip install blessings

Please note that proper tooling is required to install the WiredTiger Python module. Please refer to the WiredTiger documentation for instructions on how to successfully compile WiredTiger.

Usage

usage: PyWT.py [-h] [--dbpath DBPATH] [--list] [--raw] [--pretty]
               [--table TABLE] [--export EXPORT] [--export-all]

optional arguments:
  -h, --help       show this help message and exit
  --dbpath DBPATH  dbpath (defaults to the current directory)
  --list           print MongoDB catalog content
  --raw            print raw data
  --pretty         pretty print documents
  --table TABLE    WT table to print
  --export EXPORT  MongoDB namespace to export
  --export-all     Export all MongoDB namespaces

Examples

List MongoDB namespace <-> WiredTiger tables:

PyWT.py --dbpath /data/db --list

Pretty print the contents of a specific WiredTiger table:

PyWT.py --table _mdb_catalog --pretty

Restore a specific MongoDB namespace to a running MongoDB instance:

PyWT.py --export test.collection | mongoimport -d test -c collection
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated4y ago
Forks3

Languages

Python

Security Score

55/100

Audited on Dec 6, 2021

No findings