mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 13:23:12 +01:00
Merge branch 'main' into 4.x
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## 4.0.3 2023-11-09 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Resolve issue with _MYSQL_TLS_CERT_FILE not being read
|
||||||
|
|
||||||
|
|
||||||
## 4.0.2 2023-11-09 <dave at tiredofit dot ca>
|
## 4.0.2 2023-11-09 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -74,12 +74,40 @@ EOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
control_c() {
|
control_c() {
|
||||||
#if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
|
if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
|
||||||
print_warn "User aborted"
|
print_warn "User aborted"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_filename() {
|
||||||
|
COLUMNS=12
|
||||||
|
prompt="Please select a file to restore:"
|
||||||
|
options=( $(find "${DEFAULT_FILESYSTEM_PATH}" -type f -maxdepth 2 -not -name '*.md5' -not -name '*.sha1' -print0 | sort -z | xargs -0) )
|
||||||
|
PS3="$prompt "
|
||||||
|
select opt in "${options[@]}" "Custom" "Quit" ; do
|
||||||
|
if (( REPLY == 2 + ${#options[@]} )) ; then
|
||||||
|
echo "Bye!"
|
||||||
|
exit 2
|
||||||
|
elif (( REPLY == 1 + ${#options[@]} )) ; then
|
||||||
|
while [ ! -f "${opt}" ] ; do
|
||||||
|
read -p "What path and filename to restore: " opt
|
||||||
|
if [ ! -f "${opt}" ] ; then
|
||||||
|
print_error "File not found. Please retry.."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
break
|
||||||
|
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Invalid option. Try another one."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
COLUMNS=$oldcolumns
|
||||||
|
r_filename=${opt}
|
||||||
|
}
|
||||||
|
|
||||||
get_dbhost() {
|
get_dbhost() {
|
||||||
p_dbhost=$(basename -- "${r_filename}" | cut -d _ -f 3)
|
p_dbhost=$(basename -- "${r_filename}" | cut -d _ -f 3)
|
||||||
if [ -n "${p_dbhost}" ]; then
|
if [ -n "${p_dbhost}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user