kopia lustrzana https://github.com/modem7/docker-borgmatic
Added docker cli install ability
rodzic
87d2608b53
commit
1d3c101a3f
|
@ -31,6 +31,14 @@ It uses cron to run the backups at a time you can configure in `data/borgmatic.d
|
|||
| dockercli | Borgmatic with Docker-CLI baked in. |
|
||||
| 1.6.xx-1.2.x | Specific versions of Borgmatic |
|
||||
|
||||
# Environment Variables
|
||||
| Variable | Description | Possible Values | Default |
|
||||
| :----: | --- | --- | --- |
|
||||
| DOCKERCLI | Install DockerCLI | true | Empty |
|
||||
| CRON | Cron times | cron time, disabled | 0 1 * * * |
|
||||
| CRON_COMMAND | Command cron will run | borgmatic --stats -v 0 2>&1 | borgmatic --stats -v 0 2>&1 |
|
||||
| EXTRA_CRON | Extra cron lines | 0 5 2 * * command1 | Empty |
|
||||
|
||||
### Usage
|
||||
|
||||
Please look at this [guide](https://www.modem7.com/books/docker-backup/page/backup-docker-using-borgmatic) to help you run this container.
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Install DockerCLI if true
|
||||
if [ "${DOCKERCLI:-}" == "true" ]; then
|
||||
echo "Installing Docker CLI..."
|
||||
apk add -U --quiet docker-cli
|
||||
dockerver=$(docker --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
|
||||
else
|
||||
dockerver="not installed"
|
||||
fi
|
||||
|
||||
# Version variables
|
||||
borgver=$(borg --version)
|
||||
borgmaticver=$(borgmatic --version)
|
||||
|
@ -9,9 +18,10 @@ pythonver=$(python3 --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
|
|||
# Software versions
|
||||
echo "Software Versions:
|
||||
-----------------------------------
|
||||
borgmatic $borgmaticver
|
||||
$borgver
|
||||
apprise $apprisever
|
||||
$borgver
|
||||
borgmatic $borgmaticver
|
||||
docker $dockerver
|
||||
python $pythonver
|
||||
-----------------------------------
|
||||
Time Zone: $TZ
|
||||
|
@ -50,5 +60,4 @@ crontab=$(crontab -l)
|
|||
printf "Cron job set as: \n$crontab\n"
|
||||
|
||||
# Start Cron
|
||||
# exec supercronic -passthrough-logs /etc/crontabs/root
|
||||
exec /usr/sbin/crond -f -L /dev/stdout
|
||||
|
|
Ładowanie…
Reference in New Issue