legdur - keep your legacy durable
Hey, I wrote a thing. Thing being a piece of software. I have a collection of photos & documents that I really care about. I synch them between computers using syncthing and also run backups regularly. What I didn't have was a way to quickly detect bitrot.
Enter legdur
legdur is a simple CLI program to compute hashes of large sets of files in large directory structures and compare them with a previous snapshot.
Think having your photo collection you acquired over time and worrying about bitrot.
Installation
cargo install legdur --force should get you there on a system that has Rust installed already.
Try it out without installation
If you have a nix-flakes enabled system:
nix run git+https://git.cyplo.dev/cyplo/legdur.git
Usage
legdur path/to/a/directory/
working:
finished:
How it works
- it will compute a hash of each file present in the directory structure (it works recursively).
- if previously computed
legdur.dbexists it will compare the current state of the world to the one represented bylegdur.dband output any differences. Only files that changed or got deleted get printed out, additions or file moves anywhere within the directory are not. - it will move the current
legdur.dbtolegdur.oldand write the new state of the world to a newlegdur.db
Contact & contributions
- Let me know if you'd like to hack on this by contacting me on
legdur@cyplo.devor viacyplo@peninsula.industrieson the Fediverse.
Sources
git clone https://git.cyplo.dev/cyplo/legdur.git