Skip to content

About

mongosh scripts and operator notes for MongoDB. Storage stats, compaction, defrag, and replica-set tooling, plus TLS, Kerberos, and LDAP command notes.

Topics

Resources

Stars

32 stars

Watchers

10 watching

Forks

Latest commit

 

History

1,873 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-scripts

A collection of MongoDB scripts and command notes.

Live scripts are in src/. They run under mongosh 1.10 / 2.10+ (mongosh --file and load()). Read the disclaimer before running anything outside a test environment.

Start here

  • src/ — operator scripts for storage, deletes, schema, latency, and cluster checks.
  • DB Storage tools — WiredTiger disk use. dbstats reports it. autoCompact, onlineDefrag, and indexCacheUtil act on or inspect the same storage.
  • mongosh scripting guide — read preference, sessions, async, and --eval behaviour that long-running scripts keep hitting.
  • Roadmap — planned work, plus the live and archived version of each script.

Howtos

Command notes

Auth and TLS

Topology and clients

Operations

Legacy

The last dual-shell (mongo / mongosh) tree is the legacy mongo shell snapshot, cut 2026-09-01 at tag legacy-mongo-shell. It is unmaintained. Pair those files with archived mdblib.js v0.15.10.

About

mongosh scripts and operator notes for MongoDB. Storage stats, compaction, defrag, and replica-set tooling, plus TLS, Kerberos, and LDAP command notes.

Topics

Resources

Stars

32 stars

Watchers

10 watching

Forks

Releases

Packages

Used by

Contributors

Languages