Skip to content

bleetube/strfry-prune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strfry-prune

Selectively expire events from a strfry database.

While strfry already includes its own delete method which takes an --age and/or --filter param, this tool facilitates granular control over what events are expunged.

Usage

Simple example

strfry export | deno run --allow-read prune.ts > output.jsonl
cat /var/lib/strfry/metagross-01.jsonl | strfry import --no-verify

A more advanced example includes copying strfry.conf to pruning.conf and changing the database path, then running compaction. e.g. db = "./temp-db/"

doas -u strfry strfry export | doas -u strfry deno run --allow-read prune.ts  | doas -u strfry strfry --config pruning.conf import --no-verify
systemctl stop stfry
mv -v temp-db/data.mdb strfry-db/data.mdb
doas -u strfry strfry compact
systemctl start stfry

Just print stats:

deno run --allow-read=. stats.ts --input input.jsonl

notes

Inspect kinds arbitrarily:

grep '"kind":0' input.jsonl | jq

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published