refactor: Use -db as Indicator for Backups
This commit is contained in:
parent
a37bf79c03
commit
98afeac701
|
@ -112,7 +112,8 @@ if [ -z "${BACKUP_DIRECTORY}" ]; then
|
||||||
chown -R "$BACKUP_DIRECTORY" bridgehead;
|
chown -R "$BACKUP_DIRECTORY" bridgehead;
|
||||||
fi
|
fi
|
||||||
checkOwner "$BACKUP_DIRECTORY" bridgehead || fail_and_report 1 "Automatic maintenance failed: Wrong permissions for backup directory $(pwd)"
|
checkOwner "$BACKUP_DIRECTORY" bridgehead || fail_and_report 1 "Automatic maintenance failed: Wrong permissions for backup directory $(pwd)"
|
||||||
BACKUP_SERVICES="$(docker ps --filter ancestor=postgres:14-alpine --format "{{.Names}}" | tr "\n" "\ ")"
|
# Collect all container names that contain '-db'
|
||||||
|
BACKUP_SERVICES="$(docker ps --filter name=-db --format "{{.Names}}" | tr "\n" "\ ")"
|
||||||
log INFO "Performing automatic maintenance: Creating Backups for $BACKUP_SERVICES";
|
log INFO "Performing automatic maintenance: Creating Backups for $BACKUP_SERVICES";
|
||||||
for service in $BACKUP_SERVICES; do
|
for service in $BACKUP_SERVICES; do
|
||||||
if [ ! -d "$BACKUP_DIRECTORY/$service" ]; then
|
if [ ! -d "$BACKUP_DIRECTORY/$service" ]; then
|
||||||
|
|
Loading…
Reference in New Issue