Skip to content

Commit

Permalink
Changed rdiff backup docker to take in params
Browse files Browse the repository at this point in the history
Added a cleanup cronjob
  • Loading branch information
gandazgul committed Nov 27, 2018
1 parent 73f97de commit a4326fc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions delete_jobs.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docker/rdiff-backup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ VOLUME /media/backup
# Docs: https://www.nongnu.org/rdiff-backup/docs.html
RUN apk update && apk add --no-cache rdiff-backup && rm -rf /tmp/* /var/tmp/*

CMD rdiff-backup -v5 /media/main /media/backup
ENTRYPOINT ["rdiff-backup", "-v5"]
36 changes: 33 additions & 3 deletions helmfile.d/60-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,41 @@ releases:
namespace: services
chart: ../charts/cronjob
values:
# Every hour
- schedule: "0 */1 * * *"
# Twice a day at midnight and midday
- schedule: "0 0,12 * * *"
- image:
repository: gandazgul/rdiff-backup
tag: v3
tag: v7
args:
- /media/main
- /media/backup
- volumes:
- name: main-volume
persistentVolumeClaim:
claimName: main-volume
- name: backup-volume
persistentVolumeClaim:
claimName: backup-volume
- volumeMounts:
- name: main-volume
mountPath: /media/main
- name: backup-volume
mountPath: /media/backup

- name: clean-incremental-backups
namespace: services
chart: ../charts/cronjob
values:
# Every day at midnight
- schedule: "0 0 * * *"
- image:
repository: gandazgul/rdiff-backup
tag: v7
args:
- --remove-older-than
- 4W
- --force
- /media/backup
- volumes:
- name: main-volume
persistentVolumeClaim:
Expand Down

0 comments on commit a4326fc

Please sign in to comment.