[GH-ISSUE #1269] Alpine image doesn't contain sqllite3 command to perform backup #888

Closed
opened 2026-03-03 02:04:24 +03:00 by kerem · 5 comments
Owner

Originally created by @80dB on GitHub (Dec 16, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1269

Subject of the issue

It's suggested to run a cron job to backup sqlite3 with the sqlite3 command, however this command isn't installed in the alpine image.

Your environment

  • Bitwarden_rs version: bitwardenrs/server:1.17.0-alpine

Steps to reproduce

Start image and open shell and execute "sqlite3" or "find | grep sql".

Expected behaviour

The sqlite3 command should execute normally.

Actual behaviour

It'll report sqlite3 isn't found.

Work-around

Use the non-alpine image for sqlite3 actions.

Originally created by @80dB on GitHub (Dec 16, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1269 ### Subject of the issue It's suggested to run a cron job to backup sqlite3 with the sqlite3 command, however this command isn't installed in the alpine image. ### Your environment * Bitwarden_rs version: bitwardenrs/server:1.17.0-alpine ### Steps to reproduce Start image and open shell and execute "sqlite3" or "find | grep sql". ### Expected behaviour The sqlite3 command should execute normally. ### Actual behaviour It'll report sqlite3 isn't found. ### Work-around Use the non-alpine image for sqlite3 actions.
kerem 2026-03-03 02:04:24 +03:00
Author
Owner

@jjlin commented on GitHub (Dec 16, 2020):

Presumably your cron job is running directly on your host system; you should run sqlite3 directly from there as well, installing it if needed,

I don't think the sqlite3 package is needed in the Debian-based image, so it should probably be removed.

<!-- gh-comment-id:745948234 --> @jjlin commented on GitHub (Dec 16, 2020): Presumably your cron job is running directly on your host system; you should run `sqlite3` directly from there as well, installing it if needed, I don't think the `sqlite3` package is needed in the Debian-based image, so it should probably be removed.
Author
Owner

@BlackDex commented on GitHub (Dec 16, 2020):

@jjlin, no, i rather think we need to add it to the alpine image. Or we need to remove the feature from the admin to create a backup. I'm in favor of the first with adding sqlite3 command.

<!-- gh-comment-id:745968813 --> @BlackDex commented on GitHub (Dec 16, 2020): @jjlin, no, i rather think we need to add it to the alpine image. Or we need to remove the feature from the admin to create a backup. I'm in favor of the first with adding sqlite3 command.
Author
Owner

@BlackDex commented on GitHub (Dec 16, 2020):

Though, if creating a cronjob, that job should be on the host though, not within the container.
And it's better to have sqlite3 on the host also to just create a backup via the mapped volume folder.

If you would create a cronjob within the container (which i think isn't possible without installing more software), it will be lost after a new version is being installed.

<!-- gh-comment-id:745974981 --> @BlackDex commented on GitHub (Dec 16, 2020): Though, if creating a cronjob, that job should be on the host though, not within the container. And it's better to have sqlite3 on the host also to just create a backup via the mapped volume folder. If you would create a cronjob within the container (which i think isn't possible without installing more software), it will be lost after a new version is being installed.
Author
Owner

@jjlin commented on GitHub (Dec 16, 2020):

Ah, I forgot there was a backup function in the admin page. I wonder how many people actually use that, though. Personally, I find it to be of questionable utility, given it doesn't do a complete job (no config, attachments, etc.), and most people would be better off automating it.

<!-- gh-comment-id:745981504 --> @jjlin commented on GitHub (Dec 16, 2020): Ah, I forgot there was a backup function in the admin page. I wonder how many people actually use that, though. Personally, I find it to be of questionable utility, given it doesn't do a complete job (no config, attachments, etc.), and most people would be better off automating it.
Author
Owner

@BlackDex commented on GitHub (Dec 18, 2020):

Dockerfiles have been updated to include the libraries.

<!-- gh-comment-id:747937006 --> @BlackDex commented on GitHub (Dec 18, 2020): Dockerfiles have been updated to include the libraries.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#888
No description provided.