Hello
So I updated my docker image bitwarden_rs/server:latest (1.21.0 release) and I noticed my daily back-up cronjob started giving me an output error:
Task: Backup bitwarden_rs
Start time: Sat, 01 May 2021 11:12:09 GMT
Stop time: Sat, 01 May 2021 11:12:10 GMT
Current status: 126 (Interrupted)
Standard output/error:
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused “exec: "sqlite3": executable file not found in $PATH”: unknown
In the meantime I found out that the image had been deprecated and replaced my old image by vaultwarden/server. However still no luck in having working back-ups.
After some troubleshooting I found out the sqlite3 executable is missing in /usr/bin inside the docker image/container hence why my cronjob failed.
this is the script, found on the vaultwarden documentation page.
docker exec dockername sqlite3 data/db.sqlite3 “.backup ‘/path/to/backups/db-$(date ‘+%Y%m%d-%H%M’).sqlite3’”
So essentially this will run inside the docker container to dump the db.sqlite3 database to a seperate location.
Since the sqlite3 executable is missing (since 1.21.0?) my cronjob started failing.
For now I fixed the problem by installing sqlite3 inside the docker image:
docker exec -it dockername /bin/bash
apt update && apt install -y apt-transport-https ca-certificates sqlite3
I know when there’s a new update/reboot this won’t be persistent.
Thank you very much and I hope this explanation helps out some of my fellow Dockers.
EDIT: My permanent solution/workaround is posted in the comments