From 7272f409430b1aed5b3d67511e8df6ccbdf7d934 Mon Sep 17 00:00:00 2001 From: Markus <2408212-1O@users.noreply.gitlab.com> Date: Sun, 26 May 2019 10:27:35 +0000 Subject: [PATCH] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce2d441..0f8f0aa 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,21 @@ docker run -d --restart=always --name bitwarden_backup --volumes-from=bitwarden ### Manual Backups You can use the crontab of your host to schedule the backup and the container will only be running during the backup process. -Example using the integrated Backup script. You can use Environment variables for database and backup location -```sh -docker run --rm --volumes-from=bitwarden bruceforce/bw_backup manual -``` - -If you want to run the sqlite commands manually you can use the following command ```sh docker run --rm --volumes-from=bitwarden --entrypoint sqlite3 bruceforce/bw_backup $DB_FILE ".backup $BACKUP_FILE" ``` +Keep in mind that the above command will be executed inside the container. So +- `$DB_FILE` is the path to the bitwarden database which is normally locatated at `/data/db.sqlite3` +- `$BACKUP_FILE` can be any place inside the container. Easiest would be to set it to `/data/backup.sqlite3` which will create the backup near the original database file. +If you want the backed up file to be stored outside the container you have to mount +a directory by adding `-v :`. The complete command could look like this + +```sh +docker run --rm --volumes-from=bitwarden -v /tmp/myBackup:/myBackup --entrypoint sqlite3 bruceforce/bw_backup /data/db.sqlite3 ".backup /myBackup/backup.sqlite3" +``` + + ## Environment variables | ENV | Description | | ----- | ----- |