Skip to content

The file count is inconsistent between different command #1649

@s-leroux

Description

@s-leroux

While testing the rewrite command, I noticed the file count displayed in the snapshot table appears unreliable:

$ rustic $ rustic snapshots

snapshots for (host [kasimir], label [], paths [Project])
| ID       | Time                | Host    | Label | Tags | Paths   | Files | Dirs |      Size |
|----------|---------------------|---------|-------|------|---------|-------|------|-----------|
| edc721e3 | 2026-01-23 13:00:27 | kasimir |       |      | Project |  1191 |   88 | 120.3 MiB |
1 snapshot(s)

$ rustic rewrite --glob '*' edc721e3

$ rustic snapshots --all

snapshots for (host [kasimir], label [], paths [Project])
| ID       | Time                | Host    | Label | Tags | Paths   | Files | Dirs |      Size |
|----------|---------------------|---------|-------|------|---------|-------|------|-----------|
| edc721e3 | 2026-01-23 13:00:27 | kasimir |       |      | Project |  1191 |   88 | 120.3 MiB |
| 449c77ad | 2026-01-23 13:00:27 | kasimir |       |      | Project |   654 |   88 | 120.3 MiB |
2 snapshot(s)

total: 2 snapshot(s)

In the example above, the original snapshot (edc721e3) lists 1191 files, whereas the rewritten snapshot (449c77ad) lists 654.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Something isn't working as expectedC-questionCategory: Further information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions