Sqlite backup fails #1290
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#1290
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
I have the same issue as is mentioned in the comments of #1276, but since that issue seems to originate from something else, I decided to write my own.
I try to backup sqlite databases on my docker host, by mounting a root folder into my borgmatic container.
This has worked for a long time, but got broken in a recent version
Steps to reproduce
regular sqlite database backup config in the configuration yaml
Actual behavior
external-disk: Command 'sqlite3 -bail /mnt/source/apps/mosquitto/data/mosquitto.db .dump > /tmp/borgmatic-ovsfb6j3/./borgmatic/sqlite_databases/localhost/mosquitto' returned non-zero exit status 1.
Expected behavior
Finish without errors
Other notes / implementation ideas
No response
borgmatic version
2.1.3
borgmatic installation method
docker
Borg version
borg 1.4.4
Python version
Python 3.14.3
Database version (if applicable)
3.51.2 2026-01-09 17:27:48 b270f8339eb13b504d0b2ba154ebca966b7dde08e40c3ed7d559749818cb2075 (64-bit)
Operating system and version
No response
Thanks for filing this as a separate ticket. A few thoughts:
execinto the borgmatic container and then run:sqlite3 -bail /mnt/source/apps/mosquitto/data/mosquitto.db .dumpand look for errors.I get for example this error from when running sqlite3 from within the container.
When downloading the .db file, I can open and query with e.g. DBeave
At the following versions, I too have this error:
borgmatic --version
2.1.2
borg --version
borg 1.4.3
Thanks for those additional details. If
sqlite3is unable to open/dump the database file even without borgmatic, then it sounds like the database file is missing, has permissions issues, or is corrupt at least from the perspective of the container. Some thoughts on things to try:execinto the container and usels -lto check that the database file exists at the path you expect and that you have permissions to read it.sqlite3available on your host, try running the dump command on the database file (probably at a different path on the host) to see if it works there.