Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does borg check without --repair wrongly report "healed" chunks? #8533

Open
ThomasWaldmann opened this issue Nov 9, 2024 · 0 comments
Open
Milestone

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Nov 9, 2024

borg 1.4.0

Since this is a continuation of some related testing just thought I'd note here for anyone interested some unexpected behavior from check's reporting when used without --repair following previously zeroed out chunks.

I found that after --repair had zeroed an intentionally corrupted chunk, then I ran a create backup successfully, that if I next ran check but without --repair it would report as having healed the missing chunks, when it actually hadn't.

Steps:

  • Removed the repo hints, index and integrity files as part of this test (was checking how Borg would respond to both missing repo metadata and a corrupted chunk file simultaneously).
  • Intentionally corrupted the largest data file in the repo. Since I have a PNG image in the source data larger than other files in the source data these larger data files have always contained the image data for these tests.
  • Ran check with --verify-data and --repair. This zeroed out the corrupted chunks.
  • Ran a successful backup with create.
  • Ran check with --verify-data but without --repair. And this is where it reported the PNG image as being healed in all backups (removed time values from the log):
...
{"type": "log_message", "message": "borg-backup-test-1: home/user/Documents/test-data/test.png: Healed previously missing file chunk! (Byte 0-475076, Chunk acd0521e02a47fde43e172300e6728268517a5676ebe7079007644aff35f1dac).", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-1: home/user/Documents/test-data/test.png: Completely healed previously damaged file!", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "Analyzing archive borg-backup-test-2 (5/8)", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-2: home/user/Documents/test-data/test.png: Healed previously missing file chunk! (Byte 0-475076, Chunk acd0521e02a47fde43e172300e6728268517a5676ebe7079007644aff35f1dac).", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-2: home/user/Documents/test-data/test.png: Completely healed previously damaged file!", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "Analyzing archive borg-backup-test-3 (6/8)", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-3: home/user/Documents/test-data/test.png: Healed previously missing file chunk! (Byte 0-475076, Chunk acd0521e02a47fde43e172300e6728268517a5676ebe7079007644aff35f1dac).", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-3: home/user/Documents/test-data/test.png: Completely healed previously damaged file!", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "Analyzing archive borg-backup-test-4 (7/8)", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-4: home/user/Documents/test-data/test.png: Healed previously missing file chunk! (Byte 0-475076, Chunk acd0521e02a47fde43e172300e6728268517a5676ebe7079007644aff35f1dac).", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "borg-backup-test-4: home/user/Documents/test-data/test.png: Completely healed previously damaged file!", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "Analyzing archive borg-backup-test-5 (8/8)", "levelname": "INFO", "name": "borg.archive"}
{"type": "log_message", "message": "Archive consistency check complete, no problems found.", "levelname": "INFO", "name": "borg.archive"}
  • However after using mount to check if it had actually healed I found only the latest backup contained the openable PNG image. While the prior backups all errored when opening it.
  • So I ran check with --repair and it reported the heals like the prior output but this time it actually worked for all the backups it reported (confirmed by re-mounting the backups).

Originally posted by @chocmake in #8527 (comment)

@ThomasWaldmann ThomasWaldmann added this to the 1.4.1 milestone Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant