Closed jdchristensen closed 10 months ago
Did someone else except @horazont do practical testing with the current 1.2-maint code?
Guess it would be good to get more practical testing before 1.2.7 release, especially considering this issue here.
OK, guess I'll just close this as fixed (see https://github.com/borgbackup/borg/issues/6687#issuecomment-1785650521 ) until otherwise proven.
If somebody is seeing something that looks like this issue, please first do a borg check --repair
on the repo to rebuild the compaction info. Then try to reproduce.
Above mentioned fixes will be in borg 1.2.7 soon... (master branch is also fixed).
I think the Changelog should mention that users who have had problems with borg check
involving orphaned chunks should run borg check --repair
on the repo after upgrading to 1.2.7. I'm going to do that today, and am confident that my monthly checks will stop reporting orphaned chunks. Thanks for figuring this out!
Oh, I also just realized that the Changelog seems to mention an incorrect issue/PR:
check/compact: fix spurious reappearance of orphan chunks since borg 1.2, #6687 - this consists of 2 fixes:
for existing chunks: check --repair: recreate shadow index, #6687
for newly created chunks: update shadow index when doing a double-put, #5661
Should the "5661" be "7896"? And maybe the second "6687" should be "7897", to point to the PR instead of this issue?
@jdchristensen thanks for the feedback! some links for easier checking of these issues:
Updated the change log: https://github.com/borgbackup/borg/pull/7961
Usually I rather give the issue number than the PR number, but here I just gave both now. There was quite some back and forth here...
Thanks a lot. The effort you put in BorgBackup is amazing!
I have been using BorgBackup 1.1.15 for many years and love its functionality and reliability! I am using Debian Linux and my Borg repository is on an external HDD, which is attached via USB during the time of backup creation.
On 3rd November 2023, I decided to migrate to a newer version of BorgBackup. I followed the [Notes](https://borgbackup.readthedocs.io/en/1.2-maint/changes.html#important-notes) (excellent documentation, BTW!):
1. Upgrade to BorgBackup 1.1.18
2. `borg create`
3. `borg prune`
4. `borg check --verify-data`:
```
Completed repository check, no problems found.
Finished cryptographic data integrity verification, verified 528541 chunks with 0 integrity errors.
Archive consistency check complete, no problems found.
terminating with success status, rc 0
```
5. Upgrade to BorgBackup 1.2.6
6. address [1.2.5 TAM issue](https://borgbackup.readthedocs.io/en/1.2-maint/changes.html#pre-1-2-5-archives-spoofing-vulnerability-cve-2023-36811): All my 54 archives are already `tam:verified` :grinning:
7. `borg compact --cleanup-commits` (freed up 3 GB of disc space - thank you :+1: )
8. `borg check --verify-data`:
```
Finished full repository check, no problems found.
Finished cryptographic data integrity verification, verified 528541 chunks with 0 integrity errors.
Archive consistency check complete, no problems found.
terminating with success status, rc 0
```
9. run `borg info` to build the local pre12-meta cache
Did some `borg create` runs and tested the results. Everything looked good.
I happily created 65 further archives during the next days. (`borg create`)
On 30th November 2023 it was time for my monthly `borg prune` and since I am using BorgBackup 1.2.6 now, I also started a `borg compact` run. Both commands worked without problems.
Afterwards I did a `borg check --verify-data`, which gave me:
```
Starting repository check
finished segment check at segment 11882
Starting repository index check
Index object count mismatch.
committed index: 528960 objects
rebuilt index: 528965 objects
ID: 4bca288173b1b81cf3f0844369ee5d83ad6763e0b769c0b04fedf6b79be799cd rebuilt index: (10693, 162087387) committed index:
Do you think, this issue and its fix (install borg version >= 1.2.7 and run borg check --repair
once) should be added to
Upgrade Notes - borg 1.1.x to 1.2.x? To help other users (migrating from 1.1.x to 1.2.x) avoiding to run into this issue.
@palbr Guess if someone upgrades from 1.1.x to 1.2.7+, they might be never affected, so there is nothing to repair in that case.
But I already added it to the 1.2.7 changelog entry (after release though), see above.
Also, guess running borg check --repair
is the quite natural thing to do when encountering any issues.
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes.
Is this a BUG / ISSUE report or a QUESTION?
Possible bug.
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
1.2.0 on all clients and servers. Previous version was 1.1.17 (not 1.1.7, as I wrote on the mailing list).
Operating system (distribution) and version.
Debian buster and Ubuntu 20.04 on servers. Debian buster, Ubuntu 20.04 and Ubuntu 21.10 on clients.
Hardware / network configuration, and filesystems used.
Multiple local and remote clients accessing each repository. Repositories are on ext4, on RAID 1 mdadm devices, with spinning disks underlying them. The Debian server also uses lvm.
How much data is handled by borg?
The repos are all around 100GB in size, with up to 400 archives each. The repositories have been in use for many years.
Full borg commandline that lead to the problem (leave away excludes and passwords)
borg check /path/to/repo [more details below]
Describe the problem you're observing.
borg check shows errors on three different repositories on two different machines. See below for details.
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Yes, borg check shows the same errors when run again.
Include any warning/errors/backtraces from the system logs
I upgraded from borg 1.1.17 to 1.2.0 on several different systems on about April 9. On May 9, my monthly "borg check" runs gave errors on three repositories on two systems. Note that I use the setup where several clients do their backups into the same repositories. I don't have any non-shared repositories for comparison.
At the time of the upgrade from 1.1.17 to 1.2.0, I ran
borg compact --cleanup-commits ...
followed byborg check ...
on all repos. There were no errors then. After that, I runborg compact
without--cleanup-commits
followed byborg check
once per month. The errors occurred at the one month mark.System 1 runs Ubuntu 20.04. Two of the three repos on this machine now have errors:
System 2 runs Debian buster. One of the three repos on this machine now has errors:
I have used borg on these systems for years, and no hardware has changed recently. System 1 has the repos on a RAID 1 mdadm device with two SATA spinning disks. System 2 also has the repos on RAID 1 mdadm devices with two SATA disks, with lvm as a middle layer. In both cases, smartctl shows no issues for any of the drives, and memtester also shows no errors.
Since the errors have happened on different machines within a month of upgrading to 1.2.0, I am concerned that this is a borg issue rather than a hardware issue. It is also suspicious to me that the error is the same in all cases, with a committed index not found. Hardware errors tend to produce garbage.
I have not run repair yet. Is there anything I should do before running repair to try to figure out the issue?
Update: there is a bounty for finding/fixing this bug: https://app.bountysource.com/issues/108445140-borg-check-errors-after-upgrade-to-1-2-0