mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-23 14:13:43 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
428c313c7b | ||
|
|
210acb1e2a | ||
|
|
e50a8cb0ec |
@@ -1,3 +1,9 @@
|
|||||||
|
## 3.3.12 2022-08-15 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- arifer612@github contributed a fix for incorrect case of "filesize" variable when using post backup scripts
|
||||||
|
|
||||||
|
|
||||||
## 3.3.11 2022-07-22 <khoazero123@github>
|
## 3.3.11 2022-07-22 <khoazero123@github>
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -644,11 +644,11 @@ post_dbbackup() {
|
|||||||
### Post Script Support
|
### Post Script Support
|
||||||
if [ -n "${POST_SCRIPT}" ] ; then
|
if [ -n "${POST_SCRIPT}" ] ; then
|
||||||
if var_true "${POST_SCRIPT_SKIP_X_VERIFY}" ; then
|
if var_true "${POST_SCRIPT_SKIP_X_VERIFY}" ; then
|
||||||
eval "${POST_SCRIPT}" "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${FILESIZE}" "${checksum_value}"
|
eval "${POST_SCRIPT}" "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${filesize}" "${checksum_value}"
|
||||||
else
|
else
|
||||||
if [ -x "${POST_SCRIPT}" ] ; then
|
if [ -x "${POST_SCRIPT}" ] ; then
|
||||||
print_notice "Found POST_SCRIPT environment variable. Executing '${POST_SCRIPT}"
|
print_notice "Found POST_SCRIPT environment variable. Executing '${POST_SCRIPT}"
|
||||||
eval "${POST_SCRIPT}" "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${FILESIZE}" "${checksum_value}"
|
eval "${POST_SCRIPT}" "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${filesize}" "${checksum_value}"
|
||||||
else
|
else
|
||||||
print_error "Can't execute POST_SCRIPT environment variable '${POST_SCRIPT}' as its filesystem bit is not executible!"
|
print_error "Can't execute POST_SCRIPT environment variable '${POST_SCRIPT}' as its filesystem bit is not executible!"
|
||||||
fi
|
fi
|
||||||
@@ -659,12 +659,12 @@ post_dbbackup() {
|
|||||||
if [ -d "/assets/custom-scripts/" ] ; then
|
if [ -d "/assets/custom-scripts/" ] ; then
|
||||||
for f in $(find /assets/custom-scripts/ -name \*.sh -type f); do
|
for f in $(find /assets/custom-scripts/ -name \*.sh -type f); do
|
||||||
if var_true "${POST_SCRIPT_SKIP_X_VERIFY}" ; then
|
if var_true "${POST_SCRIPT_SKIP_X_VERIFY}" ; then
|
||||||
${f} "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${FILESIZE}" "${checksum_value}"
|
${f} "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${filesize}" "${checksum_value}"
|
||||||
else
|
else
|
||||||
if [ -x "${f}" ] ; then
|
if [ -x "${f}" ] ; then
|
||||||
print_notice "Executing post backup custom script : '${f}'"
|
print_notice "Executing post backup custom script : '${f}'"
|
||||||
## script EXIT_CODE DB_TYPE DB_HOST DB_NAME STARTEPOCH FINISHEPOCH DURATIONEPOCH BACKUP_FILENAME FILESIZE CHECKSUMVALUE
|
## script EXIT_CODE DB_TYPE DB_HOST DB_NAME STARTEPOCH FINISHEPOCH DURATIONEPOCH BACKUP_FILENAME FILESIZE CHECKSUMVALUE
|
||||||
${f} "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${FILESIZE}" "${checksum_value}"
|
${f} "${exit_code}" "${dbtype}" "${DB_HOST}" "${1}" "${dbbackup_start_time}" "${dbbackup_finish_time}" "${dbbackup_total_time}" "${target}" "${filesize}" "${checksum_value}"
|
||||||
else
|
else
|
||||||
print_error "Can't run post backup custom script: '${f}' as its filesystem bit is not executible!"
|
print_error "Can't run post backup custom script: '${f}' as its filesystem bit is not executible!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user