MariaDB: remove unused options and function from backup script
This PS removes some unused CLI options and functions from the backup script. Change-Id: Ie7abb3bda0689afa0d128552a85c985e1653552f Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
abc4af9920
commit
e582a7df66
@ -19,24 +19,10 @@ ARCHIVE_DIR=${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/archi
|
||||
|
||||
MYSQL="mysql \
|
||||
--defaults-file=/etc/mysql/admin_user.cnf \
|
||||
--host=$MARIADB_SERVER_SERVICE_HOST \
|
||||
--connect-timeout 10"
|
||||
|
||||
MYSQLDUMP="mysqldump \
|
||||
--defaults-file=/etc/mysql/admin_user.cnf \
|
||||
--host=$MARIADB_SERVER_SERVICE_HOST"
|
||||
|
||||
delete_files() {
|
||||
files_to_delete=("$@")
|
||||
for f in "${files_to_delete[@]}"
|
||||
do
|
||||
if [ -f $f ]
|
||||
then
|
||||
echo "Deleting file $f."
|
||||
rm -rf $f
|
||||
fi
|
||||
done
|
||||
}
|
||||
--defaults-file=/etc/mysql/admin_user.cnf"
|
||||
|
||||
days_difference() {
|
||||
archive_date=$( date --date="$1" +%s )
|
||||
|
@ -52,11 +52,11 @@ spec:
|
||||
- /tmp/backup_mariadb.sh
|
||||
env:
|
||||
- name: MARIADB_BACKUP_BASE_DIR
|
||||
value: {{ .Values.conf.backup.base_path }}
|
||||
value: {{ .Values.conf.backup.base_path | quote }}
|
||||
- name: MYSQL_BACKUP_MYSQLDUMP_OPTIONS
|
||||
value: {{ .Values.conf.backup.mysqldump_options }}
|
||||
value: {{ .Values.conf.backup.mysqldump_options | quote }}
|
||||
- name: MARIADB_BACKUP_DAYS_TO_KEEP
|
||||
value: "{{ .Values.conf.backup.days_of_backup_to_keep }}"
|
||||
value: {{ .Values.conf.backup.days_of_backup_to_keep | quote }}
|
||||
- name: MARIADB_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
|
Loading…
Reference in New Issue
Block a user