[Database] Remote backup should keep given number of backup days
Fixes minor issue with naming of variables which prevents the script to be compliant the backup retention policy. Change-Id: Ic241310a66af92ee423f5c762c413af7d6d53f0b
This commit is contained in:
parent
e568acf53d
commit
89d290d3da
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Helm-Toolkit
|
||||
name: helm-toolkit
|
||||
version: 0.2.41
|
||||
version: 0.2.42
|
||||
home: https://docs.openstack.org/openstack-helm
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png
|
||||
sources:
|
||||
|
@ -368,8 +368,8 @@ remove_old_remote_archives() {
|
||||
count=0
|
||||
SECONDS_TO_KEEP=$((${REMOTE_DAYS_TO_KEEP}*86400))
|
||||
log INFO "${DB_NAME}_backup" "Deleting backups older than ${REMOTE_DAYS_TO_KEEP} days (${SECONDS_TO_KEEP} seconds)"
|
||||
for INDEX in $(tr " " "\n" <<< ${!FILETABLE[@]} | sort -n -); do
|
||||
ARCHIVE_FILE=${FILETABLE[${INDEX}]}
|
||||
for INDEX in $(tr " " "\n" <<< ${!fileTable[@]} | sort -n -); do
|
||||
ARCHIVE_FILE=${fileTable[${INDEX}]}
|
||||
if [[ ${INDEX} -lt ${SECONDS_TO_KEEP} || ${count} -lt ${REMOTE_DAYS_TO_KEEP} ]]; then
|
||||
((count++))
|
||||
log INFO "${DB_NAME}_backup" "Keeping remote backup(s) ${ARCHIVE_FILE}."
|
||||
|
@ -48,4 +48,5 @@ helm-toolkit:
|
||||
- 0.2.39 Removed tillerVersion from Chart to pass helm3 linting
|
||||
- 0.2.40 Revert chart naming for subchart compatibility
|
||||
- 0.2.41 Database B/R - archive name parser added
|
||||
- 0.2.42 Database B/R - fix to make script compliant with a retention policy
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user