Repository navigation
SQLite Backup fails with readonly error #583
|
Just upgraded to v5.0.4 and am converting some legacy stuff. My config is: Mount point: I used to have the mount point as The mount point has these files: When I run How can I fix this? |
Replies: 1 comment 1 reply
|
Your Removing Unless db-backup is running as root, that file is still not writable by the process. There is a second SQLite-specific issue: mounting only the database file hides any adjacent Mount the database directory instead of the individual file: volumes:
- /bytestash/snippets:/source/bytestashThen change the job to: DB09_HOST=/source/bytestash/snippets.dbCheck which UID/GID db-backup actually uses: docker exec <db-backup-container> sh -c \
'id; ls -ld /source/bytestash; test -w /source/bytestash && echo writable'Adjust the host directory’s owner, group, or ACL for that UID/GID. I would avoid using For v5.0.4, keep this source-directory mount read-write and retry |
Your
DB09_HOSTvalue is shaped correctly. The problem appears to be the mount and filesystem permissions, not the db-backup configuration.Removing
:roonly makes the Docker mount read-write; it does not change Unix permissions. Your listing shows:Unless db-backup is running as root, that file is still not writable by the process.
There is a second SQLite-specific issue: mounting only the database file hides any adjacent
-wal,-shm, or-journalfiles and does not provide a writable parent directory. SQLite may need to create or access those files even when the main operation is a backup.Mount the database directory instead of the individual file:
v…