MDB_LOAD(1)

πŸ’– NAME πŸ’–

okay so this is MDB_LOAD(1) β€” a General Commands Manual, bestie β€” and the star of the show is mdb_load, the LMDB environment import tool. That's the name, that's the whole name. 🫢

✨ SYNOPSIS ✨

mdb_load [-V] [-a] [-f file] [-n] [-s subdb] [-N] [-Q] [-T]  envpath

πŸ¦‹ DESCRIPTION πŸ¦‹

mdb_load reads from standard input and loads whatever it gets into the LMDB environment envpath. It's giving import tool realness. πŸ’…

The input to mdb_load has to be in the output format that mdb_dump(1) makes, or the format described by the -T option below. No cap.

πŸ’… OPTIONS πŸ’…

  • -V β€” Write the library version number to standard output, then exit. Just version and dip. ✨
  • -a β€” Append every record in the exact order it appears in the input. It assumes the input is already sorted correctly, so it does not sort anything and does not check for redundant values. You must use this when reloading data that came from running mdb_dump on a database that uses custom compare functions. So if custom compare functions are in the chat, this is required, bestie. πŸ”₯
  • -f file β€” Read from the specified file instead of from standard input. File over stdin, slay.
  • -n β€” Load an LMDB database that does not use subdirectories. No subdirectories, no problem. 🌈
  • -s subdb β€” Load a specific subdatabase. If no database is specified, data goes into the main database. Main character database energy by default. πŸ‘‘
  • -N β€” Don't overwrite existing records when loading into an already existing database; just skip them. No drama, just skip. πŸ’€
  • -Q β€” Quick mode, uses MDB_NOSYNC for faster loading. Forces sync with mdb_env_sync() before exiting. Fast but still syncs at the end, periodt. πŸ”₯
  • -T β€” Load data from simple text files. The input must be paired lines of text, where the first line of the pair is the key item, and the second line of the pair is its corresponding data item.

There's a simple escape mechanism, and newline and backslash (\) are the special ones. Newline characters are record separators. Backslash characters in the text get interpreted in one of two ways: if a backslash comes before another backslash, the pair becomes a literal backslash. If a backslash comes before any other character, the two characters after the backslash are a hexadecimal specification of a single character; for example, \0a is a newline character in the ASCII character set.

Because of that, any backslash or newline characters that naturally occur in the text input must be escaped so mdb_load doesn't misinterpret them. 🧚

😭 DIAGNOSTICS 😭

Exit status is zero if no errors happen. If there are errors, you get a non-zero exit status and a diagnostic message written to standard error. So zero = slay; non-zero = read standard error, bestie. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

🌸 AUTHOR 🌸

Howard Chu of Symas Corporation <http://www.symas.com>. Iconic. πŸ’œ


LMDB 0.9.17 β€’ 2015/09/30 β€’ MDB_LOAD(1) β€” bye bestie, go load some environments πŸ’–βœ¨

πŸ“¦ where this page comes from