Configuring SQLite3 backup #2310

Closed
opened 2025-10-09 17:58:40 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @jaapvdv on GitHub.

(using mprasil/bitwarden:latest)

I am trying to setup a cronjob to automate a daily backup of the bitwarden-rs data-folder. For that purpose I have added two volumes to the docker run command:

-v /mnt/data/:/data/
-v /mnt/backup/:/backup/

Both are visible when executing the shell inside the container.

When I try to test the backup command:

sqlite3 /$DATA_FOLDER/db.sqlite3 ".backup '/backup/backup.sq3'"

I get the error:

bash: sqlite3: command not found

How can I backup my database if (apparently) sqlite3 is not installed/available in the container?

BTW: I also tried crontab -e :
bash: crontab: command not found

Originally created by @jaapvdv on GitHub. (using mprasil/bitwarden:latest) I am trying to setup a cronjob to automate a daily backup of the bitwarden-rs data-folder. For that purpose I have added two volumes to the docker run command: -v /mnt/data/:/data/ -v /mnt/backup/:/backup/ Both are visible when executing the shell inside the container. When I try to test the backup command: sqlite3 /$DATA_FOLDER/db.sqlite3 ".backup '/backup/backup.sq3'" I get the error: bash: sqlite3: command not found How can I backup my database if (apparently) sqlite3 is not installed/available in the container? BTW: I also tried crontab -e : bash: crontab: command not found
OVERLORD added the question label 2025-10-09 17:58:40 +03:00
Author
Owner

@jaapvdv commented on GitHub:

Will do. Thanks.

@jaapvdv commented on GitHub: Will do. Thanks.
Author
Owner

@shauder commented on GitHub:

Are you running the command from inside the container or your host system?

The error message you show says that it cannot find the sqlite3 binary. Make sure you have sqlite3 installed.

@shauder commented on GitHub: Are you running the command from inside the container or your host system? The error message you show says that it cannot find the sqlite3 binary. Make sure you have sqlite3 installed.
Author
Owner

@jaapvdv commented on GitHub:

Yes, I am trying to run it from inside the container. Should I run it on the Docker host?

@jaapvdv commented on GitHub: Yes, I am trying to run it from inside the container. Should I run it on the Docker host?
Author
Owner

@fbartels commented on GitHub:

Yes, you can safely run it from outside the container.

@fbartels commented on GitHub: Yes, you can safely run it from outside the container.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2310