项目作者: rkapl

项目描述 :
Btrfs Snapshot Disk Usage Analyzer
高级语言: Rust
项目地址: git://github.com/rkapl/btsdu.git
创建时间: 2018-07-06T18:29:40Z
项目社区:https://github.com/rkapl/btsdu

开源协议:GNU General Public License v2.0

下载


Btrfs Snapshot Disk Usage Analyzer (btsdu)

This tool can show you what folders have the most changed data between
snapshots. Simply run:

  1. btsdu -p /snapshots/old_snapshot /snapshots/new_snapshot

You will get a navigable breakdown in a NCDu
interface.

  1. ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help
  2. --- /home/roman ---------------------------------------------------
  3. /..
  4. 42.5 MiB [##########] /.config
  5. 23.2 MiB [##### ] /.IdeaIC2017.2
  6. 12.3 MiB [## ] /.vscode
  7. 10.0 MiB [## ] /projects
  8. 9.5 MiB [## ] /.thunderbird
  9. 297.3 KiB [ ] /.local
  10. 20.0 KiB [ ] /.java
  11. e 8.0 KiB [ ] /.bash_history
  12. 4.0 KiB [ ] /.pulse
  13. e 293.0 B [ ] /.bashrc

Installation

Use the Rust package manager, cargo:

  1. cargo install btsdu

If the cargo bin directory is in your path, you can run `btsdu right away. You
will also need NCDu (should be packaged by your distribution) for proper display
of the results.

Limitations

  • Shows uncompressed size
  • Does not take into account reflinked files/extents and hardlinks
  • Does show disk usage, just the actual data (called apparent size in NCDu).
    The on-disk and apparent sizes shown will be equal.

Technical

The tools uses btrfs send to get difference between two snapshots and then
builds up file-by-file summary of the size of changed data. The output is
printed in format understood by the NCDu display tool.

Naturally it is possible to use a a btrfs send/receive stream dump from your own
source, see --help for that. It is also possible not to run NCDu and just show
the underlying data. It is in pretty reasonable JSON format that can be
processed further.