Ghee 0.4 - The tastiest way to work with Linux extended attributes (xattrs)
Introducing Ghee 0.4, the newest release of the premier tool for manipulating Linux extended attributes! (0.3 coverage here reddit .)
This latest release adds a Rustyline-based REPL and additional tools for using the filesystem as a relational database. The new init
subcommand lets you declare the primary key by which a directory (and its subdirectories) are indexed, while ins
and del
now allow insertion and deletion of records while keeping related indices up to date. ls
is helpful in the REPL, showing Ghee's view of the world.
In addition to direct management of extended attributes, Ghee is designed to implement a relational data model built around xattrs while offloading as much functionality as feasible to the filesystem.
As such, Ghee does nothing special to ensure the integrity of stored data. You are encouraged to layer this not on but under Ghee by your choice of filesystem. For example, ZFS, Btrfs, and Bcachefs all provide checksum-based integrity checks.
Next steps include filling in missing features in existing subcommands and using copy-on-write snapshots to provide a Git-inspired workflow, something like:
ghee diff ./people
: show how the ./people table has changed since last commitghee commit ./people -m "message!"
: commit the./people
table in its current form with message "message!"ghee restore ./people gf037d2c98
: restore the./people
table to its state in commit gf037d2c98ghee log ./people
: show commit messages for all commits in the./people
table.
As I am a user of Btrfs, CoW-based features will be implemented with Btrfs in mind first. If this proves successful it could be extended to other filesystems.
Of course, I hope it goes without saying that version 0.4 of any project should NOT be used in mission-critical contexts where the cost of data loss would be substantial.
Thanks in advance for any thoughts, questions, or suggestions!