1
0
mirror of https://github.com/xzeldon/vwdump.git synced 2025-06-28 06:18:15 +03:00

Merge branch 'dev'

Fixes #13
This commit is contained in:
10 2021-01-18 19:35:32 +01:00
commit 95b93917c6
3 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@ docker run -d --restart=always --name bitwarden_backup --volumes-from=bitwarden
You can use the crontab of your host to schedule the backup and the container will only be running during the backup process.
```sh
docker run --rm --volumes-from=bitwarden --entrypoint sqlite3 bruceforce/bw_backup $DB_FILE ".backup $BACKUP_FILE"
docker run --rm --volumes-from=bitwarden bruceforce/bw_backup manual
```
Keep in mind that the above command will be executed inside the container. So
@ -36,7 +36,7 @@ If you want the backed up file to be stored outside the container you have to mo
a directory by adding `-v <PATH_ON_YOUR_HOST>:<PATH_INSIDE_CONTAINER>`. 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"
docker run --rm --volumes-from=bitwarden -e UID=0 -e BACKUP_FILE=/myBackup/backup.sqlite3 -e TIMESTAMP=true -v /tmp/myBackup:/myBackup bruceforce/bw_backup manual
```
## Environment variables

View File

@ -17,7 +17,7 @@ fi
/usr/bin/sqlite3 $DB_FILE ".backup $FINAL_BACKUP_FILE"
if [ $? -eq 0 ]
then
echo "$(date "+%F %T") - Backup successfull"
echo "$(date "+%F %T") - Backup successfull to $FINAL_BACKUP_FILE"
else
echo "$(date "+%F %T") - Backup unsuccessfull"
fi

View File

@ -24,6 +24,7 @@ fi
# Just run the backup script
if [ "$1" = "manual" ]; then
$BACKUP_CMD
exit 0
fi
# Initialize cron