598fc6536f912525089439f20da5544c5da6d411
Some checks reported errors
continuous-integration/drone/push Build was killed
Restic Docker image
Restic image for various platforms.
Build
Just run make to build and push everything. Check ORG and PLATFORMS
variables to customize.
Usage
You can use this image as regular restic image or use built-in cron and backup.sh script which can be useful for example in statefulsets:
- name: backup
image: genunix/restic:latest
imagePullPolicy: Always
command:
- /bin/sh
- -cxe
- |
echo "0 3 * * * /bin/sh -e /usr/local/bin/backup.sh" > /var/spool/cron/crontabs/root;
crond -f
env:
- name: NODE
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: TAG
value: myapp
- name: INSTANCE
value: "${TAG}-${NODE}"
- name: BACKUP_PATH
value: /srv/mysvc
- name: RESTIC_REPOSITORY
value: "s3:https://s3.eu-central-1.wasabisys.com/backups/${INSTANCE}"
- name: RESTIC_PASSWORD
valueFrom:
secretKeyRef:
name: restic-rest-secret
key: RESTIC_PASSWORD
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: restic-rest-secret
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: restic-rest-secret
key: AWS_SECRET_ACCESS_KEY
volumeMounts:
- name: data
mountPath: /srv/mysvc
This image also sends metrics into prometheus-pushgateway service which needs to be configured properly.
Description
Languages
Shell
67.1%
Dockerfile
17.5%
Makefile
15.4%