diff --git a/code-for-philly/CronJob/code-for-philly-backups.yaml b/code-for-philly/CronJob/code-for-philly-backups.yaml index 8dd6773..4f844b0 100644 --- a/code-for-philly/CronJob/code-for-philly-backups.yaml +++ b/code-for-philly/CronJob/code-for-philly-backups.yaml @@ -44,7 +44,12 @@ spec: export AWS_SECRET_ACCESS_KEY='$AWS_SECRET_ACCESS_KEY' # install CLI dependencies - hab pkg install jarvus/restic core/gzip core/curl + hab pkg install core/gzip core/curl + + if [ ! -f /bin/restic ]; then + 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 + chmod +x /bin/restic + fi # get composite service name composite_svc_name=\"\$(hab svc status | tail -n +2 | awk '{print \$1}' | grep -- "-composite/" | cut -d '/' -f 1,2)\" @@ -66,7 +71,7 @@ spec: --ignore-table=\"\${database_name}.sessions\" \ \"\${database_name}\" \ | hab pkg exec core/gzip gzip --rsyncable \ - | hab pkg exec jarvus/restic restic backup \ + | restic backup \ --host 'code-for-philly' \ --stdin \ --stdin-filename database.sql.gz @@ -75,7 +80,7 @@ spec: # snapshot data echo 'Snapshotting site data' - hab pkg exec jarvus/restic restic backup \ + restic backup \ /hab/svc/site/data \ --host 'code-for-philly' \ --exclude='*.log' \ @@ -83,7 +88,7 @@ spec: # prune aged snapshots echo 'Pruning snapshots' - hab pkg exec jarvus/restic restic forget \ + restic forget \ --host 'code-for-philly' \ --keep-last 3 \ --keep-daily 7 \