Skip to content
/ PyWT Public

Python script to delve into MongoDB's WiredTiger data files

Notifications You must be signed in to change notification settings

kevinadi/PyWT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python script to delve into MongoDB's WiredTiger data files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages