mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 05:33:53 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28ed6c3bb8 | ||
|
|
c1bdf26598 | ||
|
|
5a4cac2cee | ||
|
|
c04eec7661 | ||
|
|
32f1959a07 | ||
|
|
d384d5a529 |
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,3 +1,22 @@
|
||||
## 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>
|
||||
|
||||
### Changed
|
||||
- Fix for bucket / db name InfluxDB 1.xx
|
||||
- Minor aesthetics, spacing, spelling
|
||||
|
||||
|
||||
## 3.2.2 2022-04-21 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -102,11 +102,11 @@ backup_influx() {
|
||||
1 )
|
||||
for db in ${db_names}; do
|
||||
pre_dbbackup
|
||||
if [ "${db}" != "justbackupeverything" ] ; then bucket="-bucket $db" ; else db=all ; fi
|
||||
if [ "${db}" != "justbackupeverything" ] ; then bucket="-db ${db}" ; else db=all ; fi
|
||||
target=influx_${db}_${DB_HOST#*//}_${now}
|
||||
compression
|
||||
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=$?
|
||||
check_exit_code $target_dir
|
||||
print_notice "Creating archive file of '${target_dir}' with tar ${compresion_string}"
|
||||
@@ -470,7 +470,7 @@ compression() {
|
||||
target=${target}.xz
|
||||
;;
|
||||
zst* )
|
||||
compress_cmd="zstd --rm -${COMPRESSION_LEVEL} -T${PARALLEL_COMPRESSION_THREADS}"
|
||||
compress_cmd="zstd --rm -${COMPRESSION_LEVEL} -T${PARALLEL_COMPRESSION_THREADS} "
|
||||
compression_type="zstd"
|
||||
dir_compress_cmd=${compress_cmd}
|
||||
extension=".zst"
|
||||
@@ -478,9 +478,9 @@ compression() {
|
||||
target=${target}.zst
|
||||
;;
|
||||
"none" | "false")
|
||||
compress_cmd="cat"
|
||||
compress_cmd="cat "
|
||||
compression_type="none"
|
||||
dir_compress_cmd="cat"
|
||||
dir_compress_cmd="cat "
|
||||
target_dir=${target}
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -80,7 +80,7 @@ while true; do
|
||||
cleanup_old_data
|
||||
|
||||
if var_true "${manual}" ; then
|
||||
print_debug "Exitting due to manual mode"
|
||||
print_debug "Exiting due to manual mode"
|
||||
exit ${master_exit_code};
|
||||
else
|
||||
print_notice "Sleeping for another $(($DB_DUMP_FREQ*60-backup_total_time)) seconds. Waking up at $(date -d@"$(( $(date +%s)+$(($DB_DUMP_FREQ*60-backup_total_time))))" +"%Y-%m-%d %T %Z") "
|
||||
|
||||
@@ -66,7 +66,6 @@ EOF
|
||||
exit 0
|
||||
;;
|
||||
"-i" )
|
||||
echo "interactive mode"
|
||||
interactive_mode=true
|
||||
;;
|
||||
* )
|
||||
@@ -641,7 +640,7 @@ EOF
|
||||
2 )
|
||||
while true; do
|
||||
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* )
|
||||
counter=1
|
||||
q_dbport=" "
|
||||
|
||||
Reference in New Issue
Block a user