Store health

This commit is contained in:
Andras Schmelczer 2025-08-07 19:48:55 +01:00
parent 362b85a20d
commit 8261031e11
2 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,6 @@ COPY config/exclude.conf /exclude.conf
# Add healthcheck to verify backup completed within allowed time
ENV MAX_BACKUP_AGE_SECONDS=86400
HEALTHCHECK --interval=10s --timeout=10s --start-period=1h CMD /src/healthcheck.sh
HEALTHCHECK --interval=10s --timeout=10s CMD /src/healthcheck.sh
ENTRYPOINT ["sh", "-c", "/src/schedule.sh"]

View file

@ -31,6 +31,8 @@ services:
- /volumes/backup/logs:/backup-logs # we will store the output of the backup commands in this folder
- borg-cache:/root/.cache/borg # speed up subsequent backups
- health-flag:/backup_completion_time.log # this is used to determine if the backup was successful and when it was last run
- /bulk/backup:/local-backup # this is an example target backup path for BORG_REPO_1 from above
- /volumes/backup/config/id_rsa:/root/.ssh/id_rsa # this is an example for mounting an ssh key for a remote repo (BORG_REPO_0 above)
@ -40,3 +42,4 @@ services:
volumes:
borg-cache:
health-flag: