ditto stats¶
Show the snapshot count, size and recorders of each target under PATH.
By default reads local snapshots from disk and remote snapshots from ditto.lock (credential-free); pass --live to read live backends.
Usage:
Options:
--live Read live backends via a pytest pass (needs credentials) instead of
the credential-free filesystem + ditto.lock inventory.
--help Show this message and exit.
Examples¶
Output¶
Displays a table with columns:
| Column | Description |
|---|---|
| Directory | The target: a .ditto/ directory, or a remote URI |
| Snapshots | Number of snapshots in the target |
| Size | Their total size (— when unknown, for remote snapshots read from the lock) |
| Recorders | How many snapshots each recorder wrote, e.g. json×2 |
A TOTAL row sums the snapshots and sizes across targets.
Data source¶
By default this command is credential-free: local snapshots are read from the
filesystem (real size and modified date, including on-disk orphans) and remote
snapshots are read from ditto.lock (shown with — for size and modified, since
physical metadata needs a live connection). No test modules are imported and no
credentials are needed.
Pass --live to read the live backends instead, via an internal
pytest --setup-only pass — authoritative physical state for every target, at the
cost of importing your tests and needing their credentials.
Totals cover only snapshots with a known size; remote (lock-derived) snapshots are reported separately as "size unknown (use --live)".
See The Lock File.