Skip to content

Commit

Permalink
backup includes .env; versioning (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadatuputi authored Oct 25, 2023
1 parent 8175382 commit 552257c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
8 changes: 6 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ BACKUP_SCHEDULE=0 0 * * *
BACKUP_DAYS=30
# Directory to place backups in (& sync from in rclone)
BACKUP_DIR=/data/backups
# Optional encryption key for backup
# BACKUP_ENCRYPTION_KEY="<key to encrypt backup - optional, bw data is encrypted at rest>"
# Optional - encryption key for backup
# bitwarden data is encrypted at rest, but if your backup includes this env file <BACKUP_ENV=true>, your backup will include sensitive data
#BACKUP_ENCRYPTION_KEY="<key to encrypt backup>"
# Backup env file - set to true to include your .env (this file) in the backup\
# only use this when also encrypting the backup with BACKUP_ENCRYPTION_KEY
BACKUP_ENV=false
# Email address to send backup (BACKUP=email) or notifications (BACKUP_NOTIFY=true)
BACKUP_EMAIL_TO="<email to send the backup to>"
# Send email notification for rclone|local backup jobs
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

---

> __3 April 2023 Alert__: [Recent changes to Vaultwarden](https://github.com/dani-garcia/vaultwarden/commit/ca417d32578c3b6224c5aa8df56eb776712941b7) may cause Vaultwarden to fail to start due to default environmental variables. `.env.template` has been updated in this repo, however, if you are affected, you must also update `.env` and comment out all `YUBICO_*` variables, so that they appear as:
>
> ```
> #YUBICO_CLIENT_ID=
> #YUBICO_SECRET_KEY=
> #YUBICO_SERVER=
> ```
> Restart with `docker-compose`, and Vaultwarden should come up as normal. Credit to [@AySz88 for reporting this](https://github.com/dadatuputi/bitwarden_gcloud/issues/54).
---

## Features

* Bitwarden self-hosted (via Vaultwarden) on Google Cloud 'always free' e2-micro tier
Expand All @@ -24,3 +13,20 @@

## Installation
Follow the [guide in the wiki](https://github.com/dadatuputi/bitwarden_gcloud/wiki/Installation) to install and configure Bitwarden self-hosted on Google Cloud

## Changelog
2.0.1 - 25 October 2023

* Update backup option to include `.env` for full restoration. Off by default. Please encrypt your backup if including `.env`
* Starting new versioning/tagging system to keep track of changes. Arbitrarily starting after 2.0, which was the fully modular approach.

---

> __3 April 2023 Alert__: [Recent changes to Vaultwarden](https://github.com/dani-garcia/vaultwarden/commit/ca417d32578c3b6224c5aa8df56eb776712941b7) may cause Vaultwarden to fail to start due to default environmental variables. `.env.template` has been updated in this repo, however, if you are affected, you must also update `.env` and comment out all `YUBICO_*` variables, so that they appear as:
>
> ```
> #YUBICO_CLIENT_ID=
> #YUBICO_SECRET_KEY=
> #YUBICO_SERVER=
> ```
> Restart with `docker-compose`, and Vaultwarden should come up as normal. Credit to [@AySz88 for reporting this](https://github.com/dadatuputi/bitwarden_gcloud/issues/54).
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ x-logging: &default-logging
max-file: "10"
compress: "true"


services:
bitwarden:
# Standard Bitwarden is very resource-heavy and cannot run on micro cloud instances
Expand Down Expand Up @@ -54,6 +55,7 @@ services:
- bitwarden
<<: *default-logging
volumes:
- ${PWD}/.env:/.env:ro
- ${PWD}/bitwarden:/data:ro
- ${PWD}/bitwarden/rclone:/data/rclone
- ${PWD}/bitwarden/backups:/data/backups
Expand All @@ -67,6 +69,7 @@ services:
- BACKUP_EMAIL_NOTIFY
- BACKUP_RCLONE_CONF
- BACKUP_RCLONE_DEST
- BACKUP_ENV
- SMTP_HOST
- SMTP_FROM
- SMTP_FROM_NAME=Bitwarden Backup (${DOMAIN})
Expand Down
2 changes: 1 addition & 1 deletion docker/backup
Submodule backup updated 3 files
+1 −1 Dockerfile
+1 −0 README.md
+14 −12 scripts/backup.sh

0 comments on commit 552257c

Please sign in to comment.