Skip to content

Use borg to generate an exact list of paths and sizes to pass to ncdu #2

Description

@Atemu

Currently, there is a mismatch between the files which ncduCmd shows and what borgCmd actually backs up because the --exclude implementations are different. Additionally, borg's advanced patterns cannot be used if you want to use ncduCmd because it can't understand those.

ncdu can read a saved snapshot of the filesystem to explore. The format is super weird but it's possible to create automatically and thereby make ncdu make any filtered (or even entirely made up) structure explorable visually.

borg's create has the --dry-run --list flags which output a list of files that borg would back up. It should be possible to transform these into a format that ncdu can visualise.

Prior art exists at https://github.com/wodny/ncdu-export. Using its tools, it ought to be possible to do something like:

borg create ... --dry-run --list ... | ... | ./find2flat.py - | ./unflatten.py - | ncdu -f -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions