Skip to content

borg2: prune dies on non-existing archive #9416

@tve

Description

@tve

When I run borg prune (borg v2.0.0 b20) I get an error:

borg prune --show-rc -v --list -a daily-full -a host:tekke --keep-within 2d -w 4 -m 6 -y 50
Connected (version 2.0, client OpenSSH_10.0p2)
Authentication (publickey) successful!
[chan 0] Opened sftp connection (server version 3)
Keeping archive (rule: within #1):           tekke         daily-full 2026-02-26 17:27:16 
Keeping archive (rule: within #2):           tekke         daily-full 2026-02-25 17:45:14 
[chan 0] sftp session closed.
Archive b'\xc0\xad\xef\xd8Z\xeauV?\xca5\xa4\xc6(\xf7\x8f\x827"\r\\c\x90\xfe/*\xff(D\xfe\xd9`' does not exist
terminating with error status, rc 31

If I run a borg check there is no problem reported:

borg check --show-rc --archives-only -v
Connected (version 2.0, client OpenSSH_10.0p2)
Authentication (publickey) successful!
[chan 0] Opened sftp connection (server version 3)
Starting archive consistency check...
Analyzing archive daily-full 2026-02-22 17:01:01+00:00 25fb4049931884edfba23f31fb95eaf595987f2c521d3fe11207c818adc6ce38 (1/4)
Analyzing archive daily-full 2026-02-22 17:01:01.359832+00:00 2ca9d22f35cca98972a1cd12909a9e8482bb08833706324133077319521d9eb0 (2/4)
Analyzing archive daily-full 2026-02-25 17:45:14+00:00 f5fc4e4c5b583bcbc4790e864980b80771db1a562d58f741501d9e5ead227862 (3/4)
Analyzing archive daily-full 2026-02-26 17:27:16+00:00 5559c1305af68081fa0e542ecb9440cf6c5e7b7150e61052267234b14097dbb5 (4/4)
Archive consistency check complete, no problems found.
[chan 0] sftp session closed.
terminating with success status, rc 0

Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions