File count spot check error #981

Closed
opened 2025-01-27 10:00:27 +00:00 by carl-westerlund · 5 comments

What I'm trying to do and why

I recently updated borgmatic to version 1.9.7, and then all my spot checks started failing. It seems that borgmatic doesn't find the files in the archive. However, if I extract the archive everything looks fine. Furthermore, if I use version 1.9.6 all the spot checks pass. So something seems to have happened between version 1.9.6 and 1.9.7.

Error message:

Spot check failed: 100.00% file count delta between source paths and latest archive (tolerance is 10%)

Steps to reproduce

Config file:

source_directories:
    - XXX

repositories:
    - path: XXX
      label: local

encryption_passcommand: "XXX"

archive_name_format: 'XXX'

keep_daily: 30

checks:
    - name: spot
      count_tolerance_percentage: 10
      data_sample_percentage: 1
      data_tolerance_percentage: 0

Actual behavior

I can recreate the issue by creating a new repo using borgmatic repo-create --encryption repokey-blake2 and then running borgmatic --verbosity 2.
I think the relevant section of the output is:

...
security: repository checks ok, allowing access
Archive authentication DISABLED.
TAM-verified archive
terminating with success status, rc 0
local: 0 total archive paths for spot check
local: Paths in source paths but not latest archive: ...

followed by a list of every file I'm trying to backup.

Then after that list it continues:

local: Paths in latest archive but not source paths: none
local: Error running actions for repository
Spot check failed: 100.00% file count delta between source paths and latest archive (tolerance is 10%)

Expected behavior

Since everything else seems to be working correctly and I can extract the archive, I would expect the file count spot check to pass.

Other notes / implementation ideas

No response

borgmatic version

1.9.7

borgmatic installation method

pipx

Borg version

1.4.0

Python version

3.13.1

Database version (if applicable)

No response

Operating system and version

macOS Sonoma 14.6.1

### What I'm trying to do and why I recently updated borgmatic to version 1.9.7, and then all my spot checks started failing. It seems that borgmatic doesn't find the files in the archive. However, if I extract the archive everything looks fine. Furthermore, if I use version 1.9.6 all the spot checks pass. So something seems to have happened between version 1.9.6 and 1.9.7. Error message: ``` Spot check failed: 100.00% file count delta between source paths and latest archive (tolerance is 10%) ``` ### Steps to reproduce Config file: ``` source_directories: - XXX repositories: - path: XXX label: local encryption_passcommand: "XXX" archive_name_format: 'XXX' keep_daily: 30 checks: - name: spot count_tolerance_percentage: 10 data_sample_percentage: 1 data_tolerance_percentage: 0 ``` ### Actual behavior I can recreate the issue by creating a new repo using `borgmatic repo-create --encryption repokey-blake2` and then running `borgmatic --verbosity 2`. I think the relevant section of the output is: ``` ... security: repository checks ok, allowing access Archive authentication DISABLED. TAM-verified archive terminating with success status, rc 0 local: 0 total archive paths for spot check local: Paths in source paths but not latest archive: ... ``` followed by a list of every file I'm trying to backup. Then after that list it continues: ``` local: Paths in latest archive but not source paths: none local: Error running actions for repository Spot check failed: 100.00% file count delta between source paths and latest archive (tolerance is 10%) ``` ### Expected behavior Since everything else seems to be working correctly and I can extract the archive, I would expect the file count spot check to pass. ### Other notes / implementation ideas _No response_ ### borgmatic version 1.9.7 ### borgmatic installation method pipx ### Borg version 1.4.0 ### Python version 3.13.1 ### Database version (if applicable) _No response_ ### Operating system and version macOS Sonoma 14.6.1
Owner

Thanks for the detailed bug report! Please try upgrading to 1.9.8 and give your repro steps another shot. While 1.9.7 fixed several bugs, it also created others (fixed by #979). I believe 1.9.8 may solve the problem for you.

Thanks for the detailed bug report! Please try upgrading to 1.9.8 and give your repro steps another shot. While 1.9.7 fixed several bugs, it also created others (fixed by #979). I believe 1.9.8 may solve the problem for you.
witten added the question / support label 2025-01-27 17:24:23 +00:00

Sorry, same issue with 1.9.8

It was actually when I upgraded from some older version (<=1.9.6) to 1.9.8 that encountered this issue, and then in the debugging process discovered that it was between 1.9.6 and 1.9.7 that it appeared.

Sorry, same issue with 1.9.8 It was actually when I upgraded from some older version (<=1.9.6) to 1.9.8 that encountered this issue, and then in the debugging process discovered that it was between 1.9.6 and 1.9.7 that it appeared.
Owner

Okay, thanks for checking. Looks like I have a repro locally, so I'll dig into what exactly went wrong.

Okay, thanks for checking. Looks like I have a repro locally, so I'll dig into what exactly went wrong.
witten added bug and removed question / support labels 2025-01-27 18:13:02 +00:00
Owner

Okay, this was caused by the fix for #968, which internally changed archive listing captures to be null-separated instead of newline-separated. And it looks like the spot check wasn't updated accordingly. Now it is.

The fix is in main and will be part of the next release. Thanks again!

Okay, this was caused by the fix for #968, which internally changed archive listing captures to be null-separated instead of newline-separated. And it looks like the spot check wasn't updated accordingly. Now it is. The fix is in main and will be part of the next release. Thanks again!
Owner

Released in borgmatic 1.9.9!

Released in borgmatic 1.9.9!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#981