LTDBTOOL(1)

✨ LTDBTOOL ✨

okay bestie, buckle up, because we're talking about ltdbtool β€” that's the ltdbtool command from the CTDB crew (you know, clustered TDB database energy) πŸ’… it's a manual page, page 1, and it's literally your girl for messing with local TDB files πŸŽ€


🌸 NAME 🌸

ltdbtool β€” manipulate CTDB's local TDB files πŸ¦‹


🌈 SYNOPSIS 🌈

ltdbtool [OPTION...] {COMMAND} [COMMAND-ARGS]

πŸ’– DESCRIPTION πŸ’–

So ltdbtool is this iconic little utility that lets you mess with CTDB's local TDB databases (aka LTDBs) without connecting to a CTDB daemon. no daemon, no drama, we love a low-maintenance queen πŸ‘‘

It's giving three main character vibes:

  • dump the contents of an LTDB, and if you want, print out the CTDB record header info too πŸ‘€
  • convert between an LTDB and a non-clustered tdb by adding or removing CTDB headers, slay
  • convert between 64 and 32 bit LTDBs, where the CTDB record headers differ by 4 bytes of padding (yes, four, we counted, periodt)

✨ OPTIONS ✨

  • -e β€” dump empty records. normally these get excluded, but not today bestie, we're showing everything 🫢
  • -p β€” dump with header information, kinda like ctdb catdb does. header reveal moment πŸ’…
  • -s {0 | 32 | 64} β€” tell it how to figure out the CTDB record header size for the input database:
    • 0 β€” no CTDB header, zero, nada πŸ™ˆ
    • 32 β€” CTDB header size of a 32 bit system (that's 20 bytes, write it down ✍️)
    • 64 β€” CTDB header size of a 64 bit system (24 bytes, iconic)
    • the default? it's 32 or 64 depending on your system architecture. she picks for you based on your vibe 🧚
  • -o {0 | 32 | 64} β€” same energy as -s but for the output database instead. go look at -s if you need a refresher πŸ’œ
  • -S SIZE β€” explicitly specify the CTDB record header SIZE of the input database, in bytes. no guessing, we're being precise 😀
  • -O SIZE β€” explicitly specify the CTDB record header SIZE for the output database, in bytes. also precise, also iconic
  • -h β€” print help text. when in doubt, ask for help, that's self care 🌸

πŸ‘‘ COMMANDS πŸ‘‘

  • help β€” print help text. yes it's the same as -h, they're twins πŸ’•
  • dump IDB β€” dump the contents of an LTDB input file IDB to standard output in a human-readable format. we love a readable moment πŸ“–
  • convert IDB ODB β€” copy an LTDB input file IDB to output file ODB, and if you want, add or remove CTDB headers along the way. glow up transformation ✨

πŸ¦‹ EXAMPLES πŸ¦‹

Print a local tdb in tdbdump style:

ltdbtool dump idmap2.tdb.0

Print a local tdb with header information similar to ctdb catdb:

ltdbtool dump -p idmap2.tdb.0

Strip the CTDB headers from records:

ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb

Strip 64 bit CTDB headers from records, running on i386:

ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb

Strip the CTDB headers from records by piping through tdbrestore:

ltdbtool dump idmap2.tdb.0 | tdbrestore idmap.tdb

Convert a local tdb from a 64 bit system for usage on a 32 bit system:

ltdbtool convert -s64 -o32 idmap2.tdb.0 idmap2.tdb.1

Add a default header:

ltdbtool convert -s0 idmap.tdb idmap2.tdb.0

πŸŽ€ SEE ALSO πŸŽ€

ctdb(1), tdbdump(1), tdbrestore(1), ctdb(7), http://ctdb.samba.org/ β€” go read those too, expand your horizons bestie πŸ“š


πŸ’œ AUTHOR πŸ’œ

This documentation was written by Gregor Beck 🫢


Copyright Β© 2011 Gregor Beck, Michael Adam

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.


πŸ’€ real talk though: no warranty means no warranty, she's free software, not a safety net. read the license, it's the rules fr fr.

and that's the whole page bestie!! this one's from the ctdb collection, version dated 09/09/2026 β€” ltdbtool page 1, and honestly? iconic. go forth and manipulate those LTDBs πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from