Skip to content

rewrite -n and find finds different results #1715

@catap

Description

@catap

Probably I don't understand something, but anyway, let start with rewrite:

$ doas /usr/local/bin/rustic rewrite -n --glob '!var/vmail/*.mbox' latest~5      
[INFO] using config /etc/rustic/rustic.toml
[INFO] repository opendal:webdav:: password is correct.
[INFO] using cache at /var/cache/rustic/a187dbe7296bbeb1df302cd09bdadacef1bd36daa53c3ba7a64240455213ea3d
[00:00:02] reading index...               ████████████████████████████████████████        144/144                                                            [00:00:00] getting snapshots...           ████████████████████████████████████████        476/476                                                            Would have rewritten the following snapshots:
| ID       | Time                | Host          | Label | Tags | Paths            | Files | Dirs |      Size |
|----------|---------------------|---------------|-------|------|------------------|-------|------|-----------|
| c640ebd6 | 2026-03-26 22:16:11 | mx0.catap.net |       |      | /etc             |  1518 |  764 | 156.0 MiB |
|          |                     |               |       |      | /home            |       |      |           |
|          |                     |               |       |      | /root            |       |      |           |
|          |                     |               |       |      | /var/backups     |       |      |           |
|          |                     |               |       |      | /var/cron/tabs   |       |      |           |
|          |                     |               |       |      | /var/db/ejabberd |       |      |           |
|          |                     |               |       |      | /var/spool/smtpd |       |      |           |
|          |                     |               |       |      | /var/unbound     |       |      |           |
|          |                     |               |       |      | /var/vmail       |       |      |           |
|          |                     |               |       |      | /var/www/htdocs  |       |      |           |
1 snapshot(s)

So, it will rewrite snapshot c640ebd6 because it thinks that without !var/vmail/*.mbox it will be different. Ok, now I run find against that snapshot:

$ doas /usr/local/bin/rustic find --glob 'var/vmail/*.mbox' c640ebd6             
[00:00:02] reading index...               ████████████████████████████████████████        144/144                                                            [00:00:00] getting snapshots...           ████████████████████████████████████████          1/1                                                              
searching in snapshots group (host [mx0.catap.net], label [], paths [/etc,/home,/root,/var/backups,/var/cron/tabs,/var/db/ejabberd,/var/spool/smtpd,/var/unbound,/var/vmail,/var/www/htdocs])...
$

...and it return nothing, because that snapshot, indeed, do not contains it.

What actually rewrite decided to skip? How can I see it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-triageStatus: Waiting for a maintainer to triage this issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions