diff --git a/k8s/jobs/singleWikiBackup.sh b/k8s/jobs/singleWikiBackup.sh index ef6be4663..d35586bb6 100755 --- a/k8s/jobs/singleWikiBackup.sh +++ b/k8s/jobs/singleWikiBackup.sh @@ -9,8 +9,8 @@ fi # This creates the PVC (if it doesn't exist) for backups to be saved to # It will not be automatically deleted so you may need to clean this up when you are done -kubectl apply -f backUpSingleWikiPvc.yaml +kubectl apply -f singleWikiBackupPvc.yaml -kubectl create -f backUpSingleWiki.yaml -o=json --dry-run=client |\ +kubectl create -f singleWikiBackup.yaml -o=json --dry-run=client |\ jq ".spec.template.spec.containers[0].env += [{\"name\": \"DATABASE_NAME\", \"value\": \"${DATABASE_NAME}\"}]" |\ kubectl create -f - diff --git a/k8s/jobs/singleWikiRestore.sh b/k8s/jobs/singleWikiRestore.sh index ec6476f3c..7b0092a30 100755 --- a/k8s/jobs/singleWikiRestore.sh +++ b/k8s/jobs/singleWikiRestore.sh @@ -7,6 +7,6 @@ if [[ -z "$DATABASE_NAME" ]]; then exit 1 fi -kubectl create -f restoreSingleWiki.yaml -o=json --dry-run=client |\ +kubectl create -f singleWikiRestore.yaml -o=json --dry-run=client |\ jq ".spec.template.spec.containers[0].env += [{\"name\": \"DATABASE_NAME\", \"value\": \"${DATABASE_NAME}\"}]" |\ kubectl create -f - diff --git a/k8s/jobs/singleWikiRestore.yaml b/k8s/jobs/singleWikiRestore.yaml index bf5222119..248f39909 100644 --- a/k8s/jobs/singleWikiRestore.yaml +++ b/k8s/jobs/singleWikiRestore.yaml @@ -27,7 +27,7 @@ spec: - 'bash' - '-c' - | - mysql --host sql-mariadb-secondary.default.svc.cluster.local ${DATABASE_NAME} < /backup/${DATABASE_NAME}.sql + mysql --host sql-mariadb-primary.default.svc.cluster.local ${DATABASE_NAME} < /backup/${DATABASE_NAME}.sql volumeMounts: - name: temporary-backup-pvc mountPath: "/backup/"