TTDBCK(1m)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’… ttdbck β€” display, check, or repair ToolTalk databases

okay so bestie, welcome to ttdbck πŸ’– β€” it lives in the user cmd section of the manual (yes that's the vibe, we're fancy here) and it is literally the ToolTalk database maintenance tool. like, the whole point: it lets you peek directly at ToolTalk spec data, spot inconsistencies, and fix problems. slay. ✨


✨ SYNOPSIS ✨

ttdbck [selection opts]  [diagnosis opts]  [display opts]  [repair opts]
[data-base-directory]  [...]

🌸 DESCRIPTION 🌸

ttdbck is the ToolTalk database maintenance tool. it gives you direct inspection of ToolTalk spec data, detection of inconsistencies, and repair of problems. that's the whole personality πŸŽ€

πŸ’… OPTIONS πŸ’…

πŸ—‚οΈ data-base-directory

  • data-base-directory β€” names the directory (or directories!) containing the ToolTalk database you wanna inspect or repair. if you name no directories, the current directory is assumed, no big deal. and if a directory path doesn't end in TT_DB, then TT_DB gets appended to it. automatic. ✨
ngl, permissions matter here: whoever runs this command must have read access to the files in the directory to inspect the data, and write access to repair the data. and since ToolTalk databases are typically accessible only to root, this command is normally run as root. πŸ‘‘

πŸ” Selection options

these determine which specs in the database get displayed or modified. if you give no selection options, then all specs in the database are displayed β€” every single one, bestie. 😭 and to prevent massive accidental changes to ToolTalk databases, no repair options except -I are allowed unless a selection or diagnosis option is given. the tool is literally protecting you from yourself 🫢

  • -f filename β€” restricts the set of specs to be inspected or modified to those which describe objects in the named file. the file name can contain shell-style wildcards, which must be escaped to prevent the shell from expanding them. πŸ™ˆ
  • -k objidkey β€” an object id key, specifying a particular spec to be displayed or modified. you can grab the object id key from a previous invocation of ttdbck; like, you might display a set of specs, figure out the one that needs repair, and then specify its key here. iykyk πŸ”₯
  • -t type β€” restricts the set of specs to be inspected or modified to those with otype type. the type name can contain shell-style wildcards, which must be escaped to prevent the shell from expanding them.

🩺 Diagnosis options

these options check for and report on inconsistencies in the selected specs. ⭐ only specs selected by the selection options are checked. and if a diagnosis option is given, any display or repair option is applied only to specs which fail the diagnostic check. so efficient πŸ’€

  • -b β€” check for badly formed specs: those which have no file or type, or those which have types not defined in the type database.
  • -x β€” check for specs which refer to files that no longer exist. rip to those files πŸͺ¦

πŸ–¨οΈ Display options

these determine which data gets printed for each selected spec.

  • -i β€” display the object id (including the object id key.)
  • -m β€” display the mandatory data that must appear in every spec: the otype of the object described by the spec, and the file in which the spec is stored.
  • -p β€” display all the properties and values for each selected spec.
  • -a β€” display all data (equivalent to specifying -imp). the full lore drop πŸ‘‘

πŸ› οΈ Repair options

  • -I β€” invoke the NetISAM isrepair() function for all files accessed. this action is applied before any other inspection or repair action. use this option when normal operations return EBADFILE (error code 105). πŸ”§
  • -F filename β€” change the file name for the selected specs to the supplied file name.
  • -T otypeid β€” change the type of the selected specs to the given otype.
  • -Z β€” remove the selected specs entirely. gone. deleted. not me being dramatic πŸ’€

🌈 EXAMPLES 🌈

ttdbck -bxi /home

in the /home/TT_DB directory, finds all badly formed specs and specs that refer to non-existent files, and prints their ids. cute and diagnostic πŸ’–

ttdbck -f /home/sample/data -F /home/sample/data1 /home

in the /home/TT_DB directory, finds all specs that refer to objects in file /home/sample/data and changes them to refer to /home/sample/data1. glow-up for your paths ✨

ttdbck -t Sample_Otype_Name -Z /export/TT_DB

in the /export/TT_DB directory, finds all specs that refer to objects of type Sample_Otype_Name and deletes the specs. periodt. πŸŽ€

πŸ“ FILES πŸ“

  • /path/TT_DB β€” ToolTalk database

⚠️ NOTES ⚠️

the ttdbck command should be run on the same machine where the TT_DB files being inspected and repaired physically exist. that is, don't try to access the TT_DB files via NFS. like, just don't. it's giving chaos πŸš«πŸ¦‹

and that's the whole page bestie 🫢 β€” this was ttdbck from the user cmd manual section, no cap, go fix your databases πŸ’œπŸ‘‘

πŸ“¦ where this page comes from