btrview


Namebtrview JSON
Version 0.6.2 PyPI version JSON
download
home_pageNone
SummaryView btrfs snapshot trees
upload_time2024-05-03 19:17:37
maintainerNone
docs_urlNone
authorChris Copley
requires_python>=3.11
licenseMIT License Copyright (c) 2024 Chris Copley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords btrfs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BTRVIEW

## Overview:

Call 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.

```
> sudo btrview --labels HDDs --fold 5
```
![btrview output](https://github.com/CopOnTheRun/btrview/raw/main/images/output.svg)

Subvolumes 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.

Wondering 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)!

## Installation:

Btrview relies on the following dependencies:
* python 3.11 or greater
* btrfs-progs
* python-treelib
* python-rich

If you have pip installed you can grab btrview from the python package index with `pip install btrview`. Using pip to install btrview will also install the required python dependencies. In addition installing via pip will add the `btrview` command to your path allowing you to run the command from anywhere on the system. 

If you don't feel like installing via pip 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.

## Some Qs and As:

### Q: What is btrfs?

In 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.

### Q: What does btrview do?

It produces a view of the btrfs filesystems, mounts, as well as the subvolume tree or snapshot tree on your system.

### Q: What's the difference between the subvolume tree and the snapshot tree?

The 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.

If that's a little obscure here's a visual example of the difference.

If you run these commands:

```
btrfs subvolume create subvol
btrfs subvolume create subvol/nested_subvol
btrfs subvolume snapshot subvol subvol/subvol-snap
btrfs subvolume snapshot subvol subvol/subvol-snap2
btrfs subvolume snapshot subvol/nested_subvol subvol/nested_subvol-snap
```

The subvolume tree would look like:

```
subvol
├── nested_subvol
├── subvol-snap
├── subvol-snap2
└── nested_subvol-snap
```

The snapshot tree would look like:

```
subvol
├── subvol-snap
└── subvol-snap2
nested_subvol
└── nested_subvol-snap
```

### Q: What's the point of this program?

The 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.

### Q: What's not the point of this program?

This is in no way shape or form a backup solution. Use something like [btrbk](https://github.com/digint/btrbk) for that. 

This 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).

To put it plainly, btrview merely shows the state of things as they are, it doesn't actually "do" anything.

### Q: How is the "btr" part of btrview pronounced?

The same as the "btr" part of btrfs.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "btrview",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "btrfs",
    "author": "Chris Copley",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/54/f6/112b82413ecfabc3049a1ee0d5e8e26e83a3866fdc27182bd4f4859fb013/btrview-0.6.2.tar.gz",
    "platform": null,
    "description": "# 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> 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\n* btrfs-progs\n* python-treelib\n* python-rich\n\nIf you have pip installed you can grab btrview from the python package index with `pip install btrview`. Using pip to install btrview will also install the required python dependencies. In addition installing via pip will 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 pip 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## 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\u251c\u2500\u2500 nested_subvol\n\u251c\u2500\u2500 subvol-snap\n\u251c\u2500\u2500 subvol-snap2\n\u2514\u2500\u2500 nested_subvol-snap\n```\n\nThe snapshot tree would look like:\n\n```\nsubvol\n\u251c\u2500\u2500 subvol-snap\n\u2514\u2500\u2500 subvol-snap2\nnested_subvol\n\u2514\u2500\u2500 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",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Chris Copley  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "View btrfs snapshot trees",
    "version": "0.6.2",
    "project_urls": {
        "Issues": "https://github.com/CopOnTheRun/btrview/issues",
        "Repository": "https://github.com/CopOnTheRun/btrview"
    },
    "split_keywords": [
        "btrfs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a636d73f5e86e365fbdf3a184f2d7e7b03aa05c43bbc9ea6f0835cdb60d5c47c",
                "md5": "a4c10fa0f0a6343bb7150ee25a7ed81e",
                "sha256": "8df2ae60d15c741f368cf51a557d01f59ff58f27a970bf45f066dcd33358b835"
            },
            "downloads": -1,
            "filename": "btrview-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a4c10fa0f0a6343bb7150ee25a7ed81e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 14588,
            "upload_time": "2024-05-03T19:17:34",
            "upload_time_iso_8601": "2024-05-03T19:17:34.392821Z",
            "url": "https://files.pythonhosted.org/packages/a6/36/d73f5e86e365fbdf3a184f2d7e7b03aa05c43bbc9ea6f0835cdb60d5c47c/btrview-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54f6112b82413ecfabc3049a1ee0d5e8e26e83a3866fdc27182bd4f4859fb013",
                "md5": "de8396a6562cb768079d3f6d15a7979f",
                "sha256": "641050ec8be84e967cb4719cf3c9aaf38b09866fa918033db74ee23276c0517b"
            },
            "downloads": -1,
            "filename": "btrview-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "de8396a6562cb768079d3f6d15a7979f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 14691,
            "upload_time": "2024-05-03T19:17:37",
            "upload_time_iso_8601": "2024-05-03T19:17:37.034919Z",
            "url": "https://files.pythonhosted.org/packages/54/f6/112b82413ecfabc3049a1ee0d5e8e26e83a3866fdc27182bd4f4859fb013/btrview-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 19:17:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CopOnTheRun",
    "github_project": "btrview",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "btrview"
}
        
Elapsed time: 0.70306s