diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dcaea3..683e915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 4.0.12 2023-11-12 + + ### Changed + - Allow creating schedulers if _MONGO_CUSTOM_URI is set and _DB_HOST blank + + ## 4.0.11 2023-11-11 ### Changed diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index 33ea3de..b3799a6 100644 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -1141,10 +1141,11 @@ create_archive() { create_schedulers() { if var_true "${DEBUG_CREATE_SCHEDULERS}" ; then debug on; fi + backup() { - bootstrap_variables upgrade BACKUP - local backup_instances=$(printenv | sort | grep -c "^DB[0-9]._HOST") + local backup_instances=$(set -o posix ; set | grep -Pc "^(DB[0-9]._HOST=|.*MONGO_CUSTOM_URI=)") print_debug "[create_schedulers] Found '${backup_instances}' DB_HOST instances" + if [ -n "${DB_HOST}" ] && [ "${backup_instances}" ]; then backup_instances=1; print_debug "[create_schedulers] Detected using old DB_ variables"