Skip to content

[...] does not exist when running prune #1613

@teidesu

Description

@teidesu

not sure how i can make an mcve for this nor debug any further, but i randomly started getting the above error when running rustic prune --instant-delete

on debug log level no additional output got printed, a portion of logs from TRACE level:

$ rustic prune --instant-delete --log-level TRACE
[...a bunch of similar log lines with different Index/Snapshot/Pack ids...]
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:469] cache reading tpe: Pack, id: 0698cdf5, offset: 1085301
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:520] cache hit!
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:469] cache reading tpe: Pack, id: 169877d1, offset: 0
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:520] cache hit!
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:469] cache reading tpe: Pack, id: 4f8c8934, offset: 0
[TRACE] (34) rustic_core::backend::cache: [/build/rustic-0.10.1-vendor/rustic_core-0.9.0/src/backend/cache.rs:520] cache hit!
[TRACE] (1) rustic_backend::local: [/build/rustic-0.10.1-vendor/rustic_backend-0.5.4/src/local.rs:247] listing tpe: Pack
error: `rustic_core` experienced an error related to `internal operations`.

Message:
Pack `65dcc0d3` does not exist.

We believe this is a bug, please report it by opening an issue at:
https://github.com/rustic-rs/rustic_core/issues/new

If you can, please attach an anonymized debug log to the issue.

Thank you for helping us improve rustic!


Some additional details ...

Backtrace:
   0: rustic_core::commands::prune::PrunePlan::check_existing_packs::{{closure}}
   1: rustic_rs::commands::prune::PruneCmd::inner_run
   2: rustic_rs::repository::AllRepositoryOptions::run_with_progress
   3: <rustic_rs::commands::prune::PruneCmd as abscissa_core::runnable::Runnable>::run
   4: <rustic_rs::commands::EntryPoint as abscissa_core::runnable::Runnable>::run

(the problematic Pack doesn't appear anywhere in the TRACE logs)

im running rustic 0.10.1 on NixOS 25.11, and i started getting this issue very soon after updating, so might be a regression?


running rustic check yields:

[INFO] using no config file, none of these exist: /home/teidesu/.config/rustic/rustic.toml, /etc/rustic/rustic.toml, ./rustic.toml
[INFO] repository local:[...]: password is correct.
[INFO] using cache at /home/teidesu/.cache/rustic/7a21e2678196672aa76bd4639c4fac3876fe1f7caf258ac6e980f3d1f6391d71
[00:00:00] getting snapshots...           ████████████████████████████████████████        125/125                                                                                                               [00:00:00] checking Snapshot in cache...  ████████████████████████████████████████  71.50 KiB/71.50 KiB  95.57 MiB/s  (ETA -)                                                                                   [00:00:00] checking Index in cache...     ████████████████████████████████████████  14.47 MiB/14.47 MiB  4.54 GiB/s   (ETA -)                                                                                   [00:00:00] reading index...               ████████████████████████████████████████        431/431                                                                                                               [00:00:00] listing packs...               ⠁                                                                                                                                                                     [ERROR] pack 2bf44089 is referenced by the index but not present! To repair: 'rustic repair index'.
[ERROR] pack 65dcc0d3 is referenced by the index but not present! To repair: 'rustic repair index'.
[00:00:00] listing packs...                                                                                                                                                                                     [00:00:00] cleaning up packs from cache...                                                                                                                                                                      [00:00:00] checking packs in cache...     ████████████████████████████████████████ 161.48 MiB/161.48 MiB 3.99 GiB/s   (ETA -)                                                                                   [00:00:01] checking trees...              ████████████████████████████████████████        125/125                                                                                                               error: `rustic_core` experienced an error related to `the repository`.

Message:
check found errors!


Some additional details ...

Backtrace:
disabled backtrace (set 'RUST_BACKTRACE="1"' environment variable to enable)

running rustic repare index removes the missing packs from the index, but rustic prune still doesn't work with a similar error

Message:
Blob ID `001de8e9` is missing in index files.

and running rustic check now results in a lot of

[ERROR] file "some.db" blob e4bb11c3 is missing in index
[ERROR] file "some.db" blob 3714c965 is missing in index
[ERROR] file "some.db" blob 7e3774a7 is missing in index
[ERROR] file "some.db" blob 402a3d73 is missing in index
[...repeated like 50 more times with different blob ids but the same file...]

and sure enough 001de8e9 does appear there (multiple times even)

i'm not sure how to fix missing blobs since there isn't rustic repair blobs. removing cache files doesn't help.

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