mirror of
https://github.com/xzeldon/vwdump.git
synced 2025-06-28 06:58:15 +03:00
fixed manual mode
This commit is contained in:
parent
bee3bcdb17
commit
6621785c90
@ -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.
|
You can use the crontab of your host to schedule the backup and the container will only be running during the backup process.
|
||||||
|
|
||||||
```sh
|
```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
|
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
|
a directory by adding `-v <PATH_ON_YOUR_HOST>:<PATH_INSIDE_CONTAINER>`. The complete command could look like this
|
||||||
|
|
||||||
```sh
|
```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
|
## Environment variables
|
||||||
|
@ -17,7 +17,7 @@ fi
|
|||||||
/usr/bin/sqlite3 $DB_FILE ".backup $FINAL_BACKUP_FILE"
|
/usr/bin/sqlite3 $DB_FILE ".backup $FINAL_BACKUP_FILE"
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "$(date "+%F %T") - Backup successfull"
|
echo "$(date "+%F %T") - Backup successfull to $FINAL_BACKUP_FILE"
|
||||||
else
|
else
|
||||||
echo "$(date "+%F %T") - Backup unsuccessfull"
|
echo "$(date "+%F %T") - Backup unsuccessfull"
|
||||||
fi
|
fi
|
||||||
|
@ -24,6 +24,7 @@ fi
|
|||||||
# Just run the backup script
|
# Just run the backup script
|
||||||
if [ "$1" = "manual" ]; then
|
if [ "$1" = "manual" ]; then
|
||||||
$BACKUP_CMD
|
$BACKUP_CMD
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize cron
|
# Initialize cron
|
||||||
|
Loading…
x
Reference in New Issue
Block a user