Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Atemu opened this issue Jul 14, 2024 · 1 comment
Open

Comments

@Atemu
Copy link
Owner

Atemu commented Jul 14, 2024

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 -
@Atemu
Copy link
Owner Author

Atemu commented Nov 9, 2024

Forgot to backlink but I have implemented support for borg create dry-runs here: wodny/ncdu-export#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant