mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 13:23:12 +01:00
Release 2.12.0 - See CHANGELOG.md
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
## 2.12.0 2022-03-16 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Last release of 2.x series
|
||||||
|
- Fix timer for backups that take excessively long time, and allow it to start repetitively at the same time daily. What was happening is that if a backup took 30 minutes, time would shift by 30 minutes daily eventually taking backups mid day.
|
||||||
|
|
||||||
|
|
||||||
## 2.11.5 2022-03-15 <dave at tiredofit dot ca>
|
## 2.11.5 2022-03-15 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -455,6 +455,8 @@ print_debug "Backup routines Initialized on $(date)"
|
|||||||
mkdir -p $TEMP_LOCATION
|
mkdir -p $TEMP_LOCATION
|
||||||
|
|
||||||
### Define Target name
|
### Define Target name
|
||||||
|
backup_start_time=$(date +"%s")
|
||||||
|
print_debug "Backup start time: ${backup_start_time} - $(date -d @${backup_start_time} +"%Y-%m-%d %T %Z")"
|
||||||
now=$(date +"%Y%m%d-%H%M%S")
|
now=$(date +"%Y%m%d-%H%M%S")
|
||||||
now_time=$(date +"%H:%M:%S")
|
now_time=$(date +"%H:%M:%S")
|
||||||
now_date=$(date +"%Y-%m-%d")
|
now_date=$(date +"%Y-%m-%d")
|
||||||
@@ -529,9 +531,12 @@ print_debug "Backup routines Initialized on $(date)"
|
|||||||
if var_true $MANUAL ; then
|
if var_true $MANUAL ; then
|
||||||
exit 0;
|
exit 0;
|
||||||
else
|
else
|
||||||
print_debug "Sleeping until $(($DB_DUMP_FREQ*60))"
|
backup_finish_time=$(date +"%s")
|
||||||
sleep $(($DB_DUMP_FREQ*60))
|
backup_total_time=$(echo $((backup_finish_time-backup_start_time)))
|
||||||
|
print_debug "Backup finish time: ${backup_finish_time} - $(date -d @${backup_start_time} +"%Y-%m-%d %T %Z")"
|
||||||
|
print_debug "Backup time elapsed: $(echo ${backup_total_time} | awk '{printf "Hours: *%d* Minutes: *%02d* Seconds: *%02d*", $1/3600, ($1/60)%60, $1%60}')"
|
||||||
|
sleep $(($DB_DUMP_FREQ*60-backup_total_time))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user