From 2ccc867a754f228041f38435639f4bcfcf6f63ba Mon Sep 17 00:00:00 2001 From: Dave Conroy Date: Tue, 7 Nov 2023 12:13:04 -0800 Subject: [PATCH] Write Legacy vars to file instead --- install/assets/functions/10-db-backup | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index 544447c..638af0d 100644 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -112,33 +112,33 @@ bootstrap_variables() { if [ -n "${ENABLE_CHECKSUM}" ]; then print_warn "Deprecated and unsupported variable 'ENABLE_CHECKSUM' detected - Please upgrade your variables as they will be removed in version 4.3.0" if var_false "${ENABLE_CHECKSUM}" ; then - DEFAULT_CHECKSUM=NONE + echo "DEFAULT_CHECKSUM=NONE" >> "${backup_instance_vars}" fi fi if [ -n "${DB_DUMP_BEGIN}" ]; then print_warn "Deprecated and unsupported variable 'DB_DUMP_BEGIN' detected - Please upgrade your variables as they will be removed in version 4.3.0" - DEFAULT_BACKUP_BEGIN=${DB_DUMP_BEGIN} + echo "DEFAULT_BACKUP_BEGIN=${DB_DUMP_BEGIN}" >> "${backup_instance_vars}" fi if [ -n "${DB_DUMP_FREQ}" ]; then print_warn "Deprecated and unsupported variable 'DB_DUMP_FREQ' detected - Please upgrade your variables as they will be removed in version 4.3.0" - DEFAULT_BACKUP_INTERVAL=${DB_DUMP_INTERVAL} + echo "DEFAULT_BACKUP_INTERVAL=${DB_DUMP_INTERVAL}" >> "${backup_instance_vars}" fi if [ -n "${DB_DUMP_TARGET}" ]; then print_warn "Deprecated and unsupported variable 'DB_DUMP_TARGET' detected - Please upgrade your variables as they will be removed in version 4.3.0" - DEFAULT_FILESYSTEM_PATH="${DB_DUMP_TARGET}" + echo "DEFAULT_FILESYSTEM_PATH=${DB_DUMP_TARGET}" >> "${backup_instance_vars}" fi if [ -n "${DB_DUMP_TARGET_ARCHIVE}" ]; then print_warn "Deprecated and unsupported variable 'DB_DUMP_TARGET_ACRHIVE' detected - Please upgrade your variables as they will be removed in version 4.3.0" - DEFAULT_FILESYSTEM_ARCHIVE_PATH="${DB_DUMP_TARGET_ARCHIVE}" + echo "DEFAULT_FILESYSTEM_ARCHIVE_PATH=${DB_DUMP_TARGET_ARCHIVE}" >> "${backup_instance_vars}" fi if [ -n "${EXTRA_DUMP_OPTS}" ]; then print_warn "Deprecated and unsupported variable 'EXTRA_DUMP_OPTS' detected - Please upgrade your variables as they will be removed in version 4.3.0" - DEFAULT_EXTRA_BACKUP_OPTS="${EXTRA_DUMP_OPTS}" + echo "DEFAULT_EXTRA_BACKUP_OPTS=${EXTRA_DUMP_OPTS}" >> "${backup_instance_vars}" fi ## @@ -159,8 +159,10 @@ bootstrap_variables() { transform_backup_instance_variable "${backup_instance_number}" ARCHIVE_TIME backup_job_archive_time transform_backup_instance_variable "${backup_instance_number}" AUTH backup_job_db_auth + set -x transform_backup_instance_variable "${backup_instance_number}" BACKUP_BEGIN backup_job_backup_begin transform_backup_instance_variable "${backup_instance_number}" BACKUP_INTERVAL backup_job_backup_interval + set +x transform_backup_instance_variable "${backup_instance_number}" BACKUP_LOCATION backup_job_backup_location transform_backup_instance_variable "${backup_instance_number}" BLACKOUT_BEGIN backup_job_snapshot_blackout_start transform_backup_instance_variable "${backup_instance_number}" BLACKOUT_END backup_job_snapshot_blackout_finish