From 2213a48c184b9419da903ffc843a274c7e1e0a30 Mon Sep 17 00:00:00 2001 From: Andreas Neumeier Date: Fri, 10 Jun 2022 09:11:48 +0000 Subject: [PATCH] #118 Changing the date format when creating the backup file --- controllers/spec/template/yaml/Templates.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/spec/template/yaml/Templates.go b/controllers/spec/template/yaml/Templates.go index fbc0fef9..d55151ea 100644 --- a/controllers/spec/template/yaml/Templates.go +++ b/controllers/spec/template/yaml/Templates.go @@ -1,7 +1,7 @@ -package yaml +package yaml - // This file is auto generated by the script in 'WriteYamlTemplatesInGoFile.go'. - // Any manual modification to this file will be lost during next compilation. + // This file is auto generated by the script in 'WriteYamlTemplatesInGoFile.go'. + // Any manual modification to this file will be lost during next compilation. const ( BackUpCronJobTemplate = `apiVersion: batch/v1beta1 @@ -181,8 +181,8 @@ data: #!/bin/bash set -e - dt=$(date '+%d/%m/%Y %H:%M:%S'); - fileDt=$(date '+%d_%m_%Y_%H_%M_%S'); + dt=$(date '+%Y/%m/%d %H:%M:%S'); + fileDt=$(date '+%Y_%m_%d_%H_%M_%S'); backUpFileName="$KUBEGRES_RESOURCE_NAME-backup-$fileDt.gz" backUpFilePath="$BACKUP_DESTINATION_FOLDER/$backUpFileName"