Add a CLI feature to backup the SQLite DB #958

Closed
opened 2026-04-06 01:18:20 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @BlackDex on 8/30/2024

Many users request to add the sqlite3 binary to the container image. This isn't really ideal as that might bring in other dependencies and will only bloat the image. There main reason is to create a backup of the database.

While there already was a feature within the admin interface to do so (or by using the admin API call), this might not be easy.

This PR adds several ways to generate a backup.

  1. By calling the Vaultwarden binary with the backup command like:
  • /vaultwarden backup
  • docker exec -it vaultwarden /vaultwarden backup
  1. By sending the USR1 signal to the running process like:
  • kill -s USR1 $(pidof vaultwarden)
  • killall -s USR1 vaultwarden

This should help users to more easily create backups of there SQLite database.

Also added the Web-Vault version number when using -v/--version to the output.

*Originally created by @BlackDex on 8/30/2024* Many users request to add the sqlite3 binary to the container image. This isn't really ideal as that might bring in other dependencies and will only bloat the image. There main reason is to create a backup of the database. While there already was a feature within the admin interface to do so (or by using the admin API call), this might not be easy. This PR adds several ways to generate a backup. 1. By calling the Vaultwarden binary with the `backup` command like: - `/vaultwarden backup` - `docker exec -it vaultwarden /vaultwarden backup` 2. By sending the USR1 signal to the running process like: - `kill -s USR1 $(pidof vaultwarden)` - `killall -s USR1 vaultwarden` This should help users to more easily create backups of there SQLite database. Also added the Web-Vault version number when using `-v/--version` to the output.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#958