Cache corrupted after error in commands #1323
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1323
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Create backup using borgmatic docker version 2.1.6
Steps to reproduce
borgmatic --stats --verbosity 1Actual behavior
After the first password prompt (archive step) borgmatic throws stacktrace:
Expected behavior
Create backup finishes succesfuly.
Other notes / implementation ideas
After downgrading back to 2.1.5, backups run again with no issues.
borgmatic version
2.1.6
borgmatic installation method
docker compose
Borg version
1.4.4 (docker), 1.4.3 (remote ssh repo)
Python version
3.14.6
Database version (if applicable)
mariadb:11.8.6
Operating system and version
alpine3.24 (docker), Ubuntu 24.04.4 LTS for raspbery pi (base OS)
I've noticed I'm missing the volume mount of
/root/.local/state/borgmaticin the docker compose. But according to the stack trace the problem is with the .cache directory.Here my docker compose:
Edit:
Seems like the volume is already beeing added to the template docker-compose in https://github.com/borgmatic-collective/docker-borgmatic/pull/392
This stack trace is actually coming directly from Borg, and I'm not sure what's causing it. It's especially weird if a downgrade of the container fixes it, since I think both versions of the container contain the same version of Borg. But here are some ideas on things to try:
${VOLUMES_BASE_PATH}/.cache/*) to see if that "fixes" the problem. Your first backup afterwards will be slower though as Borg regenerates the cache.Writing patterns to ...line.--patterns-from ...portion though and replace it with all of your source directories directly on the command-line.Oh, and missing the state directory just means that borgmatic won't be able to record when checks last ran—and thereby won't be able to run checks at the frequency you're requesting (they'll run more frequently). So you should definitely add a volume for the state directory, but not having it shouldn't cause errors.
Backups do not work after updating from 2.1.5 to 2.1.6to Cache corrupted after error in commandsSeems like I misdiagnosed the issue. I checked the logs and the update to 2.1.6 was running fine. The real issue seems to be the messing with the commands the other day, to send notification when backup starts/stops. Some commands where not valid and threw errors, that probably corrupted the cache.
Sorry for the false reporting and thank you for the project, it really makes using borg easy.
I will change the issue title to represent the real problem.
The solution was probably not downgrading to 2.1.5, but just restarting the app / clearing the cache.
Glad to hear you've got it figured out and working now!