mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-12-05 17:18:02 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5be3c36040 | ||
|
|
57afad5727 | ||
|
|
bafca7bb85 |
@@ -1,7 +1,7 @@
|
||||
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
FROM alpine:3.13
|
||||
FROM alpine:3.14
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -53,6 +53,16 @@ AWS_S3_BUCKET_NAME="<xxx>"
|
||||
|
||||
# GPG_PASSPHRASE="<xxx>"
|
||||
|
||||
########### STOPPING CONTAINERS DURING BACKUP
|
||||
|
||||
# Containers can be stopped by applying a
|
||||
# `docker-volume-backup.stop-during-backup` label. By default, all containers
|
||||
# that are labeled with `true` will be stopped. If you need more fine grained
|
||||
# control (e.g. when running multiple containers based on this image), you can
|
||||
# override this default by specifying a different value here.
|
||||
|
||||
# BACKUP_STOP_CONTAINER_LABEL="service1"
|
||||
|
||||
########### MINIO CLIENT CONFIGURATION
|
||||
|
||||
# Pass these additional flags to all MinIO client `mc` invocations.
|
||||
|
||||
@@ -19,7 +19,7 @@ if [ -S "$DOCKER_SOCK" ]; then
|
||||
TEMPFILE="$(mktemp)"
|
||||
docker ps \
|
||||
--format "{{.ID}}" \
|
||||
--filter "label=docker-volume-backup.stop-during-backup=true" \
|
||||
--filter "label=docker-volume-backup.stop-during-backup=$BACKUP_STOP_CONTAINER_LABEL" \
|
||||
> "$TEMPFILE"
|
||||
CONTAINERS_TO_STOP="$(cat $TEMPFILE | tr '\n' ' ')"
|
||||
CONTAINERS_TO_STOP_TOTAL="$(cat $TEMPFILE | wc -l)"
|
||||
|
||||
@@ -22,6 +22,8 @@ AWS_ENDPOINT="${AWS_ENDPOINT:-s3.amazonaws.com}"
|
||||
|
||||
GPG_PASSPHRASE="${GPG_PASSPHRASE:-}"
|
||||
|
||||
BACKUP_STOP_CONTAINER_LABEL="${BACKUP_STOP_CONTAINER_LABEL:-true}"
|
||||
|
||||
MC_GLOBAL_OPTIONS="${MC_GLOBAL_OPTIONS:-}"
|
||||
EOF
|
||||
chmod a+x env.sh
|
||||
|
||||
Reference in New Issue
Block a user