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
+
1
7
## 3.9.6 2023-06-16 <dave at tiredofit dot ca >
2
8
3
9
### Changed
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ backup_mongo() {
216
216
print_notice "Dumping MongoDB database: '${DB_NAME}' ${compression_string}"
217
217
silent mongodump --archive=${TEMP_LOCATION}/${target} ${mongo_compression} ${mongo_backup_parameter}
218
218
exit_code=$?
219
- check_exit_code $target
219
+ check_exit_code backup $target
220
220
generate_checksum
221
221
move_dbbackup
222
222
check_exit_code move $target
@@ -289,7 +289,7 @@ backup_mysql() {
289
289
print_notice "Dumping all MySQL / MariaDB databases: '$(echo ${db_names} | xargs | tr ' ' ',')' ${compression_string}"
290
290
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}"
291
291
exit_code=$?
292
- check_exit_code $target
292
+ check_exit_code backup $target
293
293
generate_checksum
294
294
move_dbbackup
295
295
check_exit_code move $target
@@ -531,23 +531,12 @@ check_exit_code() {
531
531
print_debug "Moving of backup '${2}' completed successfully"
532
532
;;
533
533
* )
534
- print_error "Moving of backup '${1 }' reported errors"
534
+ print_error "Moving of backup '${2 }' reported errors"
535
535
master_exit_code=1
536
536
;;
537
537
esac
538
538
;;
539
539
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
551
540
}
552
541
553
542
cleanup_old_data() {
You can’t perform that action at this time.
0 commit comments