{"id":31405309,"url":"https://github.com/drdo/redu","last_synced_at":"2025-09-29T17:03:51.533Z","repository":{"id":240280484,"uuid":"769962120","full_name":"drdo/redu","owner":"drdo","description":"ncdu for your restic repository","archived":false,"fork":false,"pushed_at":"2025-09-29T11:48:20.000Z","size":4111,"stargazers_count":85,"open_issues_count":10,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T13:19:16.881Z","etag":null,"topics":["analyzer","disk-usage","ncdu","restic","usage"],"latest_commit_sha":null,"homepage":"https://github.com/drdo/redu","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-10T14:51:26.000Z","updated_at":"2025-09-29T11:48:23.000Z","dependencies_parsed_at":"2024-05-28T18:59:36.053Z","dependency_job_id":"7808ddb3-cc0a-413c-a791-cfa4282f900f","html_url":"https://github.com/drdo/redu","commit_stats":null,"previous_names":["drdo/redu"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/drdo/redu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drdo%2Fredu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drdo%2Fredu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drdo%2Fredu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drdo%2Fredu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drdo","download_url":"https://codeload.github.com/drdo/redu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drdo%2Fredu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277551126,"owners_count":25837605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","disk-usage","ncdu","restic","usage"],"created_at":"2025-09-29T17:01:54.168Z","updated_at":"2025-09-29T17:03:51.526Z","avatar_url":"https://github.com/drdo.png","language":"Rust","readme":"# Introduction\n\nredu in a nutshell: it's ncdu for your restic repo.\n\nIf you ever wanted to know what's taking so much space in your restic\nrepo so that you can find all the caches and useless things you might be backing\nup and delete them from the snapshots, then this is exactly for you.\n\nredu aggregates data from **all** snapshots into one view so you can easily find\nthe culprits!\n\n# Installing\n## Cargo\n```\ncargo install redu --locked\n```\n\n## Nix\n```\nnix-env -i redu\n```\n\n## Prebuilt binaries\nYou can grab a pre-built binary from Github, currently available for:\n- Darwin (MacOS) arm64\n- Darwin (MacOS) x86-64\n- Linux arm64\n- Linux x86-64\n- Windows arm64\n- Windows x86-64\n\nNote: On MacOS if you download via browser you might need to remove quarantine with:\n`xattr -d com.apple.quarantine \u003cbinary name\u003e`\n\n# Running\n\nYou can specify the repository and the password command in exactly the same ways\nthat restic supports.\n\nFor example using environment variables:\n```\n$ export RESTIC_REPOSITORY='sftp://my-backup-server.my-domain.net'\n$ export RESTIC_PASSWORD_COMMAND='security find-generic-password -s restic -a personal -w'\n$ redu\n```\n\nOr via command line arguments:\n```\nredu -r 'sftp://my-backup-server.my-domain.net' --password-command 'security find-generic-password -s restic -a personal -w'\n```\n\nNote: `--repository-file` (env: `RESTIC_REPOSITORY_FILE`) and `--password-file` (env: `RESTIC_PASSWORD_FILE`),\nas well as plain text passwords set via the `RESTIC_PASSWORD` environment variable,\nare supported as well and work just like in restic.\n\nSimilar to restic, redu will prompt you to enter the password, if it isn't\ngiven any other way.\n\n### Other options\n- `--non-interactive`: Run redu only to update the cache, without any UI and without requiring a terminal. Logs to stderr and exits when done.\n- `-v`: Log verbosity level. You can pass it multiple times (maxes out at two).\n- `-j`: How many restic subprocesses to spawn concurrently. Default: 4.\n\n# Usage\nRedu keeps a cache with your file/directory sizes (per repo).\nOn each run it will sync the cache with the snapshots in your repo,\ndeleting old snapshots and integrating new ones into the cache.\n\nIf you have a lot of large snapshots the first sync might take some minutes\ndepending on your connection speed and computer.\nIt will be much faster the next time as it no longer needs to fetch the entire repo.\n\nAfter some time you will see something like this:\n\n![Screenshot of redu showing the contents of a repo](screenshot_start.png)\n\nYou can navigate using the **arrow keys** or **hjkl**.\nGoing right enters a directory and going left leaves back to the parent.\n\n**PgUp**/**PgDown** or **C-b**/**C-b** scroll up or down a full page.\n\nThe size that redu shows for each item is the maximum size of the item\nacross all snapshots. That is, it's the size of that item for the snapshot\nwhere it is the biggest.\n\nThe bars indicate the relative size of the item compared to everything else\nin the current location.\n\nBy pressing **Enter** you can make a small window visible that shows some details\nabout the currently highlighted item:\n- The latest snapshot where it has maximum size\n- The earliest date and snapshot where this item appears\n- The latest date and snapshot where this item appears\n\n![Screenshot of redu showing the contents of a repo with details open](screenshot_details.png)\n\nYou can keep navigating with the details window open and it will update as you\nbrowse around.\n\nHint: you can press **Escape** to close the details window (as well as other dialogs).\n\n### Marking files\nYou can mark files and directories to build up your list of things to exclude.\nKeybinds\n- **m**: mark selected file/directory\n- **u**: unmark selected file/directory\n- **c**: clear all marks (this will prompt you for confirmation)\n\nThe marks are persistent across runs of redu (they are saved in the cache file),\nso feel free to mark a few files and just quit and come back later.\n\nThe marks are shown with an asterik at the beginning of the line\nand you can see how many total marks you have on the bar at the bottom.\n\n![Screenshot of redu showing the contents of a repo with some marks](screenshot_marks.png)\n\n### Generating the excludes\nPress **g** to exit redu and generate a list with all of your marks in alphabetic order to stdout.\n\nEverything else that redu prints (including the UI itself) goes to stderr,\nso this allows you to redirect redu's output to a file to get an exclude-file\nthat you can directly use with restic.\n\nFor example:\n```\n$ redu \u003e exclude.txt\n$ restic rewrite --exclude-file=exclude.txt --forget\n```\n\nNote: redu is strictly **read-only** and will never modify your repository itself.\n\n### Quit\nYou can also just quit without generating the list by pressing **q**.\n\n# Contributing\nBug reports, feature requests and PRs are all welcome!\nJust go ahead!\n\nYou can also shoot me an email or talk to me on the rust Discord or Freenode\nif you want to contribute and want to discuss some point.\n\n### Tests and Benchmarks\nYou can run the tests with\n```\ncargo test\n```\n\nThere are also a couple of benchmarks based on criterion that can be run with\n```\ncargo bench --features bench\n```\n","funding_links":[],"categories":["Apps","Table of Contents"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrdo%2Fredu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrdo%2Fredu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrdo%2Fredu/lists"}