mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 13:23:12 +01:00
Release 3.3.2 - See CHANGELOG.md
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
## 3.3.2 2022-05-02 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
- Add POST_SCRIPT_SKIP_X_VERIFY environment variables to allow for more host compatibility for post scripts
|
||||
|
||||
|
||||
## 3.3.1 2022-04-30 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -261,6 +261,9 @@ Outputs the following on the console:
|
||||
|
||||
If you wish to change the size value from bytes to megabytes set environment variable `SIZE_VALUE=megabytes`
|
||||
|
||||
You must make your scripts executible otherwise there is an internal check that will skip trying to run it otherwise.
|
||||
If for some reason your filesystem or host is not detecting it right, use the environment variable `POST_SCRIPT_SKIP_X_VERIFY=TRUE` to bypass.
|
||||
|
||||
## Support
|
||||
|
||||
These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.
|
||||
|
||||
@@ -643,23 +643,31 @@ post_dbbackup() {
|
||||
|
||||
### Post Script Support
|
||||
if [ -n "${POST_SCRIPT}" ] ; then
|
||||
if [ -x "${POST_SCRIPT}" ] ; then
|
||||
print_notice "Found POST_SCRIPT environment variable. Executing '${POST_SCRIPT}"
|
||||
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}"
|
||||
else
|
||||
print_error "Can't execute POST_SCRIPT environment variable '${POST_SCRIPT}' as its filesystem bit is not executible!"
|
||||
if [ -x "${POST_SCRIPT}" ] ; then
|
||||
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}"
|
||||
else
|
||||
print_error "Can't execute POST_SCRIPT environment variable '${POST_SCRIPT}' as its filesystem bit is not executible!"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
### Post Backup Custom Script Support
|
||||
if [ -d "/assets/custom-scripts/" ] ; then
|
||||
for f in $(find /assets/custom-scripts/ -name \*.sh -type f); do
|
||||
if [ -x "${f}" ] ; then
|
||||
print_notice "Executing post backup custom script : '${f}'"
|
||||
## script EXIT_CODE DB_TYPE DB_HOST DB_NAME STARTEPOCH FINISHEPOCH DURATIONEPOCH BACKUP_FILENAME FILESIZE CHECKSUMVALUE
|
||||
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}"
|
||||
else
|
||||
print_error "Can't run post backup custom script: '${f}' as its filesystem bit is not executible!"
|
||||
if [ -x "${f}" ] ; then
|
||||
print_notice "Executing post backup custom script : '${f}'"
|
||||
## 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}"
|
||||
else
|
||||
print_error "Can't run post backup custom script: '${f}' as its filesystem bit is not executible!"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user