Skip to content

Commit 7d11515

Browse files
Merge pull request #123 from CodeForPhilly/releases/k8s-manifests
Deploy releases/k8s-manifests 6b598f1
2 parents 9aafaa6 + 6b598f1 commit 7d11515

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

code-for-philly/CronJob/code-for-philly-backups.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ spec:
4444
export AWS_SECRET_ACCESS_KEY='$AWS_SECRET_ACCESS_KEY'
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 'code-for-philly' \
7176
--stdin \
7277
--stdin-filename database.sql.gz
@@ -75,15 +80,15 @@ spec:
7580
7681
# snapshot data
7782
echo 'Snapshotting site data'
78-
hab pkg exec jarvus/restic restic backup \
83+
restic backup \
7984
/hab/svc/site/data \
8085
--host 'code-for-philly' \
8186
--exclude='*.log' \
8287
--exclude='/hab/svc/site/data/media/*x*/**'
8388
8489
# prune aged snapshots
8590
echo 'Pruning snapshots'
86-
hab pkg exec jarvus/restic restic forget \
91+
restic forget \
8792
--host 'code-for-philly' \
8893
--keep-last 3 \
8994
--keep-daily 7 \

0 commit comments

Comments
 (0)