Skip to content

Commit c11cafb

Browse files
Merge pull request #380 from JarvusInnovations/develop
Release: v1.23.11
2 parents bb1b9d9 + 00f0c26 commit c11cafb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

helm-chart/templates/cronjob.backups.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ spec:
4444
{{- end }}
4545
4646
# install CLI dependencies
47-
hab pkg install jarvus/restic core/gzip core/curl
47+
hab pkg install core/gzip core/curl
48+
49+
if [ ! -f /bin/restic ]; then
50+
hab pkg exec core/curl curl -L https://github.com/restic/restic/releases/download/v0.18.1/restic_0.18.1_linux_amd64.bz2 | bunzip2 > /bin/restic
51+
chmod +x /bin/restic
52+
fi
4853
4954
# get composite service name
5055
composite_svc_name=\"\$(hab svc status | tail -n +2 | awk '{print \$1}' | grep -- "-composite/" | cut -d '/' -f 1,2)\"
@@ -66,7 +71,7 @@ spec:
6671
--ignore-table=\"\${database_name}.sessions\" \
6772
\"\${database_name}\" \
6873
| hab pkg exec core/gzip gzip --rsyncable \
69-
| hab pkg exec jarvus/restic restic backup \
74+
| restic backup \
7075
--host '{{ .Release.Name }}' \
7176
--stdin \
7277
--stdin-filename database.sql.gz
@@ -77,15 +82,15 @@ spec:
7782
7883
# snapshot data
7984
echo 'Snapshotting site data'
80-
hab pkg exec jarvus/restic restic backup \
85+
restic backup \
8186
/hab/svc/{{ .Values.site.svcName }}/data \
8287
--host '{{ .Release.Name }}' \
8388
--exclude='*.log' \
8489
--exclude='/hab/svc/{{ .Values.site.svcName }}/data/media/*x*/**'
8590
8691
# prune aged snapshots
8792
echo 'Pruning snapshots'
88-
hab pkg exec jarvus/restic restic forget \
93+
restic forget \
8994
--host '{{ .Release.Name }}' \
9095
--keep-last {{ .Values.backups.prune.keepLast }} \
9196
--keep-daily {{ .Values.backups.prune.keepDaily }} \

0 commit comments

Comments
 (0)