Compare commits

..

No commits in common. "3163150be54fb01aab718c9d03f2d98e5c4850b8" and "5e098f58e9a787acd8e5646118bcb9406f6cde18" have entirely different histories.

2 changed files with 7 additions and 11 deletions

View file

@ -1,5 +1,5 @@
ARG ALPINE_VERSION=3.18.3
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
@ -11,7 +11,7 @@ ENV SSH_SERVER ""
ENV SSH_USER root
ENV SSH_PORT 22
RUN apk add --no-cache borgbackup openssh-client zulip-client
RUN apk add --no-cache borgbackup openssh-client
COPY ./monit.conf /etc/monit.d/borg.conf
COPY ./backup.sh /usr/local/bin/backup

View file

@ -35,13 +35,9 @@ for signal in TERM QUIT HUP EXIT INT KILL; do
done
# It'll fail the second time
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}" 2>&1 | tee /tmp/backup.log
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}" 2>&1 | tee -a /tmp/backup.log
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}" 2>&1 | tee -a /tmp/backup.log
borg list "${SSH_ALIAS}:${DEST}" 2>&1 | tee -a /tmp/backup.log
if test -n "${ZULIP_KEY}"; then
cat /tmp/backup.log | zulip-client -u "${ZULIP_URL}" -b "${ZULIP_BOT}" -s "${ZULIP_STREAM}" -t "${ZULIP_TOPIC}"
fi
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}"
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}"
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}"
borg list "${SSH_ALIAS}:${DEST}"
exit $?