mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-23 06:03:43 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0920b671cb | ||
|
|
28ed6c3bb8 | ||
|
|
c1bdf26598 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## 3.2.6 2022-04-25 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Stop throwing error trying to move blank file if checksums are not enabled
|
||||||
|
|
||||||
|
|
||||||
|
## 3.2.5 2022-04-23 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fix for restore still not working with DB_PORT variable
|
||||||
|
|
||||||
|
|
||||||
|
## 3.2.4 2022-04-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add -portable flag when backing up Influx
|
||||||
|
|
||||||
|
|
||||||
## 3.2.3 2022-04-21 <dave at tiredofit dot ca>
|
## 3.2.3 2022-04-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ backup_influx() {
|
|||||||
target=influx_${db}_${DB_HOST#*//}_${now}
|
target=influx_${db}_${DB_HOST#*//}_${now}
|
||||||
compression
|
compression
|
||||||
print_notice "Dumping Influx database: '${db}'"
|
print_notice "Dumping Influx database: '${db}'"
|
||||||
influxd backup ${influx_compression} ${bucket} -host ${DB_HOST}:${DB_PORT} ${EXTRA_OPTS} "${TEMP_LOCATION}"/"${target_dir}"
|
influxd backup ${influx_compression} ${bucket} -portable -host ${DB_HOST}:${DB_PORT} ${EXTRA_OPTS} "${TEMP_LOCATION}"/"${target_dir}"
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
check_exit_code $target_dir
|
check_exit_code $target_dir
|
||||||
print_notice "Creating archive file of '${target_dir}' with tar ${compresion_string}"
|
print_notice "Creating archive file of '${target_dir}' with tar ${compresion_string}"
|
||||||
@@ -560,7 +560,9 @@ move_dbbackup() {
|
|||||||
"file" | "filesystem" )
|
"file" | "filesystem" )
|
||||||
print_debug "Moving backup to filesystem"
|
print_debug "Moving backup to filesystem"
|
||||||
mkdir -p "${DB_DUMP_TARGET}"
|
mkdir -p "${DB_DUMP_TARGET}"
|
||||||
mv "${TEMP_LOCATION}"/*."${checksum_extension}" "${DB_DUMP_TARGET}"/
|
if var_true "${ENABLE_CHECKSUM}" ;then
|
||||||
|
mv "${TEMP_LOCATION}"/*."${checksum_extension}" "${DB_DUMP_TARGET}"/
|
||||||
|
fi
|
||||||
mv "${TEMP_LOCATION}"/"${target}" "${DB_DUMP_TARGET}"/"${target}"
|
mv "${TEMP_LOCATION}"/"${target}" "${DB_DUMP_TARGET}"/"${target}"
|
||||||
;;
|
;;
|
||||||
"s3" | "minio" )
|
"s3" | "minio" )
|
||||||
@@ -582,7 +584,9 @@ move_dbbackup() {
|
|||||||
aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${TEMP_LOCATION}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target} ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS}
|
aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${TEMP_LOCATION}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target} ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS}
|
||||||
unset s3_ssl
|
unset s3_ssl
|
||||||
unset s3_ca_cert
|
unset s3_ca_cert
|
||||||
rm -rf "${TEMP_LOCATION}"/*."${checksum_extension}"
|
if var_true "${ENABLE_CHECKSUM}" ;then
|
||||||
|
rm -rf "${TEMP_LOCATION}"/*."${checksum_extension}"
|
||||||
|
fi
|
||||||
rm -rf "${TEMP_LOCATION}"/"${target}"
|
rm -rf "${TEMP_LOCATION}"/"${target}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ EOF
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"-i" )
|
"-i" )
|
||||||
echo "interactive mode"
|
|
||||||
interactive_mode=true
|
interactive_mode=true
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
@@ -641,7 +640,7 @@ EOF
|
|||||||
2 )
|
2 )
|
||||||
while true; do
|
while true; do
|
||||||
read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}C${cdgy}\) \| \(${cwh}E${cdgy}\) : ${cwh}${coff}) " q_dbport_menu
|
read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}C${cdgy}\) \| \(${cwh}E${cdgy}\) : ${cwh}${coff}) " q_dbport_menu
|
||||||
case "${q_dbname_menu,,}" in
|
case "${q_dbport_menu,,}" in
|
||||||
c* )
|
c* )
|
||||||
counter=1
|
counter=1
|
||||||
q_dbport=" "
|
q_dbport=" "
|
||||||
|
|||||||
Reference in New Issue
Block a user