File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 1+ ## 3.9.7 2023-07-18 <dave at tiredofit dot ca >
2+
3+ ### Changed
4+ - Cleanup check_exit_code parameter and reduce duplicate output
5+
6+
17## 3.9.6 2023-06-16 <dave at tiredofit dot ca >
28
39 ### Changed
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ backup_mongo() {
216216 print_notice "Dumping MongoDB database: '${DB_NAME}' ${compression_string}"
217217 silent mongodump --archive=${TEMP_LOCATION}/${target} ${mongo_compression} ${mongo_backup_parameter}
218218 exit_code=$?
219- check_exit_code $target
219+ check_exit_code backup $target
220220 generate_checksum
221221 move_dbbackup
222222 check_exit_code move $target
@@ -289,7 +289,7 @@ backup_mysql() {
289289 print_notice "Dumping all MySQL / MariaDB databases: '$(echo ${db_names} | xargs | tr ' ' ',')' ${compression_string}"
290290 mysqldump --max-allowed-packet=${MYSQL_MAX_ALLOWED_PACKET} -h ${DB_HOST} -P ${DB_PORT} -u${DB_USER} ${single_transaction} ${stored_procedures} ${mysql_tls_args} ${EXTRA_OPTS} --databases $(echo ${db_names} | xargs) | $compress_cmd > "${TEMP_LOCATION}"/"${target}"
291291 exit_code=$?
292- check_exit_code $target
292+ check_exit_code backup $target
293293 generate_checksum
294294 move_dbbackup
295295 check_exit_code move $target
@@ -531,23 +531,12 @@ check_exit_code() {
531531 print_debug "Moving of backup '${2}' completed successfully"
532532 ;;
533533 * )
534- print_error "Moving of backup '${1 }' reported errors"
534+ print_error "Moving of backup '${2 }' reported errors"
535535 master_exit_code=1
536536 ;;
537537 esac
538538 ;;
539539 esac
540-
541-
542- case "${exit_code}" in
543- 0 )
544- print_info "DB Backup of '${1}' completed successfully"
545- ;;
546- * )
547- print_error "DB Backup of '${1}' reported errors"
548- master_exit_code=1
549- ;;
550- esac
551540}
552541
553542cleanup_old_data() {
You can’t perform that action at this time.
0 commit comments