1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-10-23 01:44:51 +02:00
vaultwarden/src
Mathijs van Veluw e9acd8bd3c
Add a CLI feature to backup the SQLite DB (#4906)
* Add a CLI feature to backup the SQLite DB

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.

Signed-off-by: BlackDex <black.dex@gmail.com>

* Spelling and small adjustments

Signed-off-by: BlackDex <black.dex@gmail.com>

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2024-09-01 15:52:29 +02:00
..
api Add a CLI feature to backup the SQLite DB (#4906) 2024-09-01 15:52:29 +02:00
db Add a CLI feature to backup the SQLite DB (#4906) 2024-09-01 15:52:29 +02:00
static Fix Vaultwarden Admin page error messages (#4869) 2024-08-18 21:04:22 +02:00
auth.rs Fix for RSA Keys which are read only (#4744) 2024-07-17 12:59:22 +02:00
config.rs Allow enforcing Single Org with pw reset policy (#4903) 2024-08-30 21:37:59 +02:00
crypto.rs Remove get_random_64() 2022-11-13 10:03:06 +01:00
error.rs Improved HTTP client (#4740) 2024-07-12 22:33:11 +02:00
http_client.rs Improved HTTP client (#4740) 2024-07-12 22:33:11 +02:00
mail.rs Add Protected Actions Check (#4067) 2023-11-12 22:15:44 +01:00
main.rs Add a CLI feature to backup the SQLite DB (#4906) 2024-09-01 15:52:29 +02:00
ratelimit.rs Basic ratelimit for user login (including 2FA) and admin login 2021-12-22 21:48:49 +01:00
util.rs Add a CLI feature to backup the SQLite DB (#4906) 2024-09-01 15:52:29 +02:00