{"id":34030981,"url":"https://github.com/copontherun/btrview","last_synced_at":"2026-04-07T07:01:15.546Z","repository":{"id":224628444,"uuid":"762525659","full_name":"CopOnTheRun/btrview","owner":"CopOnTheRun","description":"A tool to better view btrfs subvolumes","archived":false,"fork":false,"pushed_at":"2024-06-03T18:08:34.000Z","size":152,"stargazers_count":31,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-04T05:52:59.469Z","etag":null,"topics":["btrfs","command-line","linux","python","shell"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/btrview/","language":"Python","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/CopOnTheRun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-02-24T00:54:11.000Z","updated_at":"2025-12-16T05:18:02.000Z","dependencies_parsed_at":"2024-04-12T14:16:56.148Z","dependency_job_id":null,"html_url":"https://github.com/CopOnTheRun/btrview","commit_stats":null,"previous_names":["copontherun/btrview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CopOnTheRun/btrview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopOnTheRun%2Fbtrview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopOnTheRun%2Fbtrview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopOnTheRun%2Fbtrview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopOnTheRun%2Fbtrview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CopOnTheRun","download_url":"https://codeload.github.com/CopOnTheRun/btrview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopOnTheRun%2Fbtrview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31503394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["btrfs","command-line","linux","python","shell"],"created_at":"2025-12-13T18:04:46.125Z","updated_at":"2026-04-07T07:01:15.541Z","avatar_url":"https://github.com/CopOnTheRun.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BTRVIEW\n\n## Overview:\n\nCall btrview with a label to get an overview of the subvolume and snapshot tree layout for that specified btrfs filesystem. Call it with multiple labels and it will list each filesystem specified. Call it with no labels, and it will give an overview of every btrfs filesystem it can find.\n\n```\n\u003e sudo btrview --labels HDDs --fold 5\n```\n![btrview output](https://github.com/CopOnTheRun/btrview/raw/main/images/output.svg)\n\nSubvolumes that are mounted (in fstab or somehow else) are in bold, those that are grey are subvolumes that aren't currently reachable on the filesystem, and subvolumes in red (not shown here) are not currently on the filesytem. This could be because they're deleted, or maybe its child subvolume was `btrfs received` from another filesystem.\n\nWondering what the difference between the subvolume and snapshot tree is? [Check out the FAQ](#q-whats-the-difference-between-the-subvolume-tree-and-the-snapshot-tree)!\n\n## Installation:\n\nBtrview relies on the following dependencies:\n* [python 3.11 or greater](https://www.python.org/)\n* [findmnt](https://man7.org/linux/man-pages/man8/findmnt.8.html) (should be installed by default on most distributions)\n* [btrfs-progs](https://github.com/kdave/btrfs-progs/tree/master)\n* [python-btrfsutil](https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil) (might be included with btrfs progs)\n* [python-treelib](https://treelib.readthedocs.io/en/latest/)\n* [python-rich](https://rich.readthedocs.io/en/stable/introduction.html)\n\nThe easiest way to download btrview is to use [pipx](https://pipx.pypa.io/stable/installation/) to download it from the python package index. Use the command `pipx install --system-site-packages btrview`. Using pipx to install btrview will also install treelib and rich and add the `btrview` command to your path allowing you to run the command from anywhere on the system.\n\nIf you don't feel like installing via pipx you can download it via `git clone https://github.com/CopOnTheRun/btrview` then `cd btrview`. From within the btrview directory you can run the script with `python -m btrview`. Note that if you clone the repository you'll need to make sure you have all the dependencies installed already.\n\n### Installation Troubleshooting\n\nQ: How come when I use the sudo command with btrview I get `sudo: btrview: command not found`, but when I run it without sudo the command is recognized?\n\nA: You are likely using a linux distribution which hard codes the paths sudo can use to find executables. There are two options here, you can either comment out the line that contains \"secure_path\" in `/etc/sudoers` or you can add the path you're using to that variable. The former option will change it so that any executable in the user's path can be executed, the latter option will merely add the user's path to list of allowed paths.\n\n## Some Qs and As:\n\n### Q: What is btrfs?\n\nIn short, it's a copy on write (COW) filesystem. If you're not already using btrfs, then check out the [documentation](https://btrfs.readthedocs.io/en/latest/) to see if it's something you'd be interested in.\n\n### Q: What does btrview do?\n\nIt produces a view of the btrfs filesystems, mounts, as well as the subvolume tree or snapshot tree on your system.\n\n### Q: What's the difference between the subvolume tree and the snapshot tree?\n\nThe subvolume tree is a tree of which subvolumes are within other subvolumes, parents being denoted by \"Parent ID\". The subvolume tree can be manipulated by moving subvolumes in or out of other subvolumes. The snapshot tree shows the relations between snapshots, ie snapshots taken of snapshots, etc.\n\nIf that's a little obscure here's a visual example of the difference.\n\nIf you run these commands:\n\n```\nbtrfs subvolume create subvol\nbtrfs subvolume create subvol/nested_subvol\nbtrfs subvolume snapshot subvol subvol/subvol-snap\nbtrfs subvolume snapshot subvol subvol/subvol-snap2\nbtrfs subvolume snapshot subvol/nested_subvol subvol/nested_subvol-snap\n```\n\nThe subvolume tree would look like:\n\n```\nsubvol\n├── nested_subvol\n├── subvol-snap\n├── subvol-snap2\n└── nested_subvol-snap\n```\n\nThe snapshot tree would look like:\n\n```\nsubvol\n├── subvol-snap\n└── subvol-snap2\nnested_subvol\n└── nested_subvol-snap\n```\n\n### Q: What's the point of this program?\n\nThe main thing btrview accomplishes is providing an organized overview of a (or multiple) btrfs filesystem(s). Due to the fact btrfs relies only on loose conventions to determine where snapshots are stored, and how subvolumes are organized, it can be difficult to gain an understanding of how things are laid out. With btrview it's easy to know which subvolumes have snapshots, how many, and where they're stored. Even if your snapshots and subvolumes are scattered around a messy filesystem they'll all still show up as a nice little tree.\n\n### Q: What's not the point of this program?\n\nThis is in no way shape or form a backup solution. Use something like [btrbk](https://github.com/digint/btrbk) for that. \n\nThis is also not a snapshot diff viewer. If that sounds like something you're interested in check out [httm](https://github.com/kimono-koans/httm).\n\nTo put it plainly, btrview merely shows the state of things as they are, it doesn't actually \"do\" anything.\n\n### Q: How is the \"btr\" part of btrview pronounced?\n\nThe same as the \"btr\" part of btrfs.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopontherun%2Fbtrview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopontherun%2Fbtrview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopontherun%2Fbtrview/lists"}