digint / digint/btrbk

Machine-readable output of `btrbk list`

Open
#606 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Perl
Stars
2.1k
Forks
139
PR merge metrics
No merged PRs in 30d

Description

I have a use-case where I need to determine the latest btrbk snapshot for some subvol.

I had to resort to parsing the raw format using a regex:

```sh
btrbk list --format=raw | rg "^.* snapshot_subvolume='(/.*?/snapshotnamehere\..*?)' .*$" --replace '$1' | tail -n 1
```

This would have been much simpler (not to mention more robust) if there was an option to output a standardised machine-readable format such as JSON.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the `btrbk list` command and inspect the existing `--format=raw` output, including the snapshot fields the issue's regex extracts. Decide on a standardized machine-readable schema and define what the new output option must emit for relevant subvolumes and snapshots. Done means callers can reliably consume the output without regex parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.