Skip to content

Commit

Permalink
fix: Fixed bash script for moving backups (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham030 authored Apr 17, 2023
1 parent f69a5a8 commit 60ecd34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/neo4j-backup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: neo4j-backup
description: Backup Neo4J databases to GCS
type: application
version: 0.1.4
version: 0.1.5
appVersion: "1.0.0"
7 changes: 6 additions & 1 deletion charts/neo4j-backup/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ spec:
fi
old_IFS=$IFS
IFS=','
echo {{ .Values.databases }}
db_names="{{- join "," .Values.databases }}"
echo db_names
for db in $db_names; do
neo4j-admin database backup \
--from={{ required "Backup service must be provided" .Values.service }} \
Expand All @@ -46,7 +48,10 @@ spec:
- |
echo {{ required "Service Account is required" .Values.serviceAccount }} | base64 -d > /etc/gcloud/service-account.json
gcsfuse {{ required "Bucket name must be provided" .Values.bucket }} /mnt/gcs
mv /mnt/backups/* /mnt/gcs/
if [ ! -d "/mnt/gcs/{{ .Values.name }}" ]; then
mkdir /mnt/gcs/{{ .Values.name }}
fi
mv /mnt/backups/{{ .Values.name }}/* /mnt/gcs/{{ .Values.name }}
volumeMounts:
- name: gcs-creds-volume
mountPath: /etc/gcloud
Expand Down

0 comments on commit 60ecd34

Please sign in to comment.