MDB_DUMP(1)

πŸ’– MDB_DUMP(1) πŸ’–

okay bestie, welcome to the General Commands Manual page for mdb_dump β€” yes that's the page title, and yes you're in the right place. grab a strawberry πŸ“, this one's actually useful.


✨ NAME ✨

mdb_dump β€” the LMDB environment export tool. it's giving "get all that data OUT of the env and into a text file" energy πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

mdb_dump [-V] [-f file] [-l] [-n] [-p] [-a | -s subdb]  envpath

like. that's the whole vibe. envpath goes at the end, no cap.


🌸 DESCRIPTION 🌸

so mdb_dump reads a database and writes its contents to the standard output, using a portable flat-text format that mdb_load(1) understands. it's the classic dump-and-reload glow-up pipeline πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -V β€” writes the library version number to the standard output and then exits. that's it, that's the whole job, she's done πŸ‘‘
  • -f file β€” write to the specified file instead of the standard output. bye stdout, hello file bestie πŸ’Ύ
  • -l β€” list the databases stored in the environment. just the names get listed β€” no data will be output. window shopping only, no buying πŸ™ˆ
  • -n β€” dump an LMDB database that does not use subdirectories.
  • -p β€” if characters in either the key or data items are printing characters (as defined by isprint(3)), output them directly. this option lets users use standard text editors and tools to modify the contents of databases. so chic, so convenient ✨
⚠️ note: different systems may have different notions about what characters count as printing characters, and databases dumped this way may be less portable to external systems. so like, it slays locally, but she might not travel well πŸ’€
  • -a β€” dump all of the subdatabases in the environment.
  • -s subdb β€” dump a specific subdatabase. if no database is specified, only the main database is dumped.
also, remember -a and -s subdb are mutually exclusive up there in the synopsis β€” pick a lane bestie 🫢

😭 DIAGNOSTICS 😭

exit status is zero if no errors occur. errors result in a non-zero exit status and a diagnostic message being written to standard error. so if you see a non-zero, something went sideways, no cap.

🚨 major warning, bestie, read this one twice: dumping databases that use user-defined comparison functions will output records with the ordering imposed by those comparison functions. if mdb_load is invoked without including the -a option when reloading those records, the new databases will likely be damaged beyond repair β€” permitting neither record storage nor retrieval. like, genuinely gone. not a vibe. do not do this. πŸ˜­πŸ’€

πŸ’œ SEE ALSO πŸ’œ

  • mdb_load(1) β€” the other half of the duo, the one that puts it all back 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Howard Chu of Symas Corporation <http://www.symas.com> β€” king behavior, honestly πŸŽ€


and that's the whole page, bestie!! this was LMDB 0.9.17, dated 2015/09/30, and it lives under MDB_DUMP(1) in the General Commands Manual. go dump responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from