Skip to content

Commit

Permalink
[vaultwarden] fix backup paths
Browse files Browse the repository at this point in the history
  • Loading branch information
knhash committed Jan 5, 2022
1 parent 3ba4d2d commit fa1f38a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/guide_bitwarden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,16 @@ You can create a backup of the database manually. ``cd`` to your project folder,

.. code-block:: console
[isabell@stardust ~]$ cd ~/vaultwarden/output/data
[isabell@stardust data]$ mkdir db-backup
[isabell@stardust data]$ sqlite3 ~/vaultwarden/data/db.sqlite3 ".backup '$HOME/vaultwarden/output/data/db-backup/backup.sqlite3'"
[isabell@stardust ~]$ mkdir ~/vaultwarden/output/data/db-backup
[isabell@stardust ~]$ sqlite3 ~/vaultwarden/output/data/db.sqlite3 ".backup '$HOME/vaultwarden/output/data/db-backup/backup.sqlite3'"
.. note :: You could run this command through a CRON job everyday - note that it will overwrite the same backup.sqlite3 file each time. If you want to save every version of the backup, please read further.
Alternatively, you can do the backup with a timestamp and it can be useful if you don't want that the CRON job overwrites the backup file. ``$(date +%Y-%m-%d)`` in the file name in the following command will generate a name with current year, month and day.

.. code-block:: console
[isabell@stardust data]$ sqlite3 ~/vaultwarden/data/db.sqlite3 ".backup '$HOME/vaultwarden/data/db-backup/$(date +%Y-%m-%d).sqlite3'"
[isabell@stardust ~]$ sqlite3 ~/vaultwarden/output/data/db.sqlite3 ".backup '$HOME/vaultwarden/output/data/db-backup/$(date +%Y-%m-%d).sqlite3'"
Restore up your vault manually
------------------------------
Expand Down

0 comments on commit fa1f38a

Please sign in to comment.