42 Commits

Author SHA1 Message Date
dependabot[bot]
29efee9147 Bump sigstore/cosign-installer from 3.8.2 to 4.0.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.2 to 4.0.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.2...v4.0.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 04:14:14 +00:00
Max Konrädi
47d29529e9 chore: Changelog 2025-08-13 15:19:14 +02:00
Max Konrädi
97c74a94a7 Revert "feat: add restic check after forget with prune"
This reverts commit 5f2b322e54.
2025-08-13 15:15:37 +02:00
Max Konrädi
901cd5487f chore: Changelog 2025-08-13 14:58:23 +02:00
Max Konrädi
a66e72cb7e Merge pull request #103 from lobaro/feat/check_after_forget_prune
feat: add restic check after forget with prune
2025-08-13 14:56:17 +02:00
Max Konrädi
5f2b322e54 feat: add restic check after forget with prune 2025-08-13 13:43:48 +02:00
Max Konrädi
50e6fdbdf2 chore: Update CHANGELOG.md
v1.4.0
2025-04-23 15:04:50 +02:00
Max Konrädi
281c77f000 Merge pull request #88 from modem/patch-1
Update README.md
2025-04-23 14:54:58 +02:00
Max Konrädi
2dd2b9ec2f Merge pull request #94 from lobaro/dependabot/github_actions/sigstore/cosign-installer-3.8.2
Bump sigstore/cosign-installer from 3.8.1 to 3.8.2
2025-04-23 14:53:11 +02:00
Max Konrädi
d864717eca Merge pull request #95 from lobaro/chore/restic_upgrade
chore: remove arm64 specific dockerfile - platform target now impleme…
2025-04-23 14:52:04 +02:00
dependabot[bot]
5b057f7554 Bump sigstore/cosign-installer from 3.8.1 to 3.8.2
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.1...v3.8.2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-23 12:51:07 +00:00
Max Konrädi
aac1a371e1 Merge pull request #90 from krombel/master
Update restic, rclone and workflow dependencies
2025-04-23 14:50:28 +02:00
Max Konrädi
ff27b6e0c4 Merge branch 'master' into master 2025-04-23 14:48:20 +02:00
Max Konrädi
424d4552cc Update dependabot.yml 2025-04-23 14:47:22 +02:00
Max Konrädi
30df2e301a chore: remove arm64 specific dockerfile - platform target now implemented in main dockerfile 2025-04-23 14:38:57 +02:00
Max Konrädi
4a3487bc1a Merge pull request #87 from zimbres/master
Multiarch Docker images / Backup_Sources Folder option
2025-04-23 14:31:28 +02:00
Max Konrädi
61e741240d Merge branch 'master' into master 2025-04-23 14:31:04 +02:00
Max Konrädi
646a4ffc40 Merge pull request #93 from lobaro/chore/restic_upgrade
Chore/restic upgrade
2025-04-22 11:16:36 +02:00
Max Konrädi
db48b9982a Merge branch 'master' into chore/restic_upgrade 2025-04-22 11:15:58 +02:00
Max Konrädi
3c113ab2f4 feat: add shadow package for simple user management 2025-04-22 11:14:25 +02:00
Max Konrädi
f695ea5253 Chore/restic upgrade (#92)
* chore: update restic to 0.18.0

* feat: add arm64 specific dockerfile

* fix: for podman compatibility prefix image with'docker.io/'
2025-04-16 18:13:33 +02:00
Max Konrädi
e38f19c6d2 fix: default dockerfile uses amd64 arch 2025-04-16 18:12:21 +02:00
Max Konrädi
214edc2721 fix: for podman compatibility prefix image with'docker.io/' 2025-04-16 15:25:17 +02:00
Max Konrädi
e75e026e92 feat: add arm64 specific dockerfile 2025-04-16 15:03:33 +02:00
Max Konrädi
740b897581 chore: update restic to 0.18.0 2025-04-16 13:35:23 +02:00
Matthias Kesler
e7b7efa431 Merge pull request #2 from krombel/dependabot/docker/restic/restic-0.18.0
Bump restic/restic from 0.17.3 to 0.18.0
2025-04-01 14:58:28 +02:00
dependabot[bot]
53aba762e2 Bump restic/restic from 0.17.3 to 0.18.0
Bumps restic/restic from 0.17.3 to 0.18.0.

---
updated-dependencies:
- dependency-name: restic/restic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 10:38:59 +00:00
Matthias Kesler
dbd3e9c459 Merge pull request #1 from krombel/dependabot/github_actions/sigstore/cosign-installer-3.8.1
Bump sigstore/cosign-installer from 3.7.0 to 3.8.1
2025-03-05 14:16:49 +01:00
Matthias Kesler
36e90b55e1 Update cosign version accordingly 2025-03-05 14:15:49 +01:00
dependabot[bot]
04fa95a5be Bump sigstore/cosign-installer from 3.7.0 to 3.8.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 10:29:46 +00:00
Matthias Kesler
0fd1e1da91 Create dependabot.yml 2025-01-16 18:52:25 +01:00
Matthias Kesler
157bc07533 Update to restic 0.17.3 2024-11-15 18:51:46 +01:00
Matthias Kesler
1b7d44a85e update github workflow dependencies 2024-10-07 17:58:08 +02:00
Matthias Kesler
b2c209cbc0 update restic 2024-10-07 17:48:42 +02:00
modem
9967b3fb2a Update README.md
Fix image in docker compose example
2024-04-17 14:54:16 +01:00
Marcio Zimbres
2f0ce618b8 Adjust file name of rclone zip in Dockerfile 2023-12-07 20:23:09 -03:00
Marcio Zimbres
b2616ef2dc Adjust Dockerfile in order to download rclone that matches container architecture 2023-12-07 19:55:23 -03:00
Marcio Zimbres
9b829f90e0 Change Action to add multi-platform image build 2023-12-07 19:25:36 -03:00
Marcio Zimbres
bf2dabd2c7 Added option to set the target folder backup 2023-12-07 14:02:36 -03:00
Tobias Kaupat
c2ae895ed8 Update README.md 2023-08-06 00:02:38 +02:00
Tobias Kaupat
47b30e90b1 Update CHANGELOG.md 2023-08-06 00:00:45 +02:00
Tobias Kaupat
e25f09d0ce Update README.md 2023-08-06 00:00:18 +02:00
6 changed files with 64 additions and 22 deletions

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Docs: <https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/customizing-dependency-updates>
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule: {interval: monthly}
- package-ecosystem: docker
directory: /
schedule: {interval: monthly}

View File

@@ -33,25 +33,25 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
uses: sigstore/cosign-installer@v4.0.0
with:
cosign-release: 'v2.1.1'
cosign-release: 'v2.4.3'
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
uses: docker/setup-buildx-action@v3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -61,7 +61,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@@ -69,9 +69,10 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -1,12 +1,25 @@
# Changelog
## Unreleased
## v1.4.2
### Removed
* Execute a repository check after prune was passed as a parameter in the forget call - use RESTIC_CHECK_CRON Var instead
## v1.3.2+restic-0-16-0
## v1.4.1
### Changed
* Execute a repository check after prune was passed as a parameter in the forget call
## v1.4.0
### Added
* Option to set the target folder backup
* Multi-platform image build
## v1.3.2 (restic 0.16.0)
### Changed
* Base image directly on official restic image
* [Semver](https://semver.org/) aligned version naming including restic version
* Updated to restic 0.16.0
### Added
* rclone to docker image

View File

@@ -1,12 +1,21 @@
FROM alpine:latest as rclone
FROM --platform=$TARGETPLATFORM docker.io/alpine:latest as rclone
ARG TARGETPLATFORM
RUN apk add wget
# Get rclone executable
ADD https://downloads.rclone.org/rclone-current-linux-amd64.zip /
RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/rclone && chmod +x /bin/rclone
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
wget https://downloads.rclone.org/rclone-current-linux-amd64.zip && unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/rclone && chmod +x /bin/rclone; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
wget https://downloads.rclone.org/rclone-current-linux-arm64.zip && unzip rclone-current-linux-arm64.zip && mv rclone-*-linux-arm64/rclone /bin/rclone && chmod +x /bin/rclone; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
wget https://downloads.rclone.org/rclone-current-linux-arm-v7.zip && unzip rclone-current-linux-arm-v7.zip && mv rclone-*-linux-arm-v7/rclone /bin/rclone && chmod +x /bin/rclone; \
fi
FROM restic/restic:0.16.0
RUN apk add --update --no-cache curl mailx
FROM docker.io/restic/restic:0.18.0
RUN apk add --update --no-cache curl mailx shadow
COPY --from=rclone /bin/rclone /bin/rclone
@@ -35,6 +44,7 @@ ENV OS_PASSWORD=""
ENV OS_REGION_NAME=""
ENV OS_INTERFACE=""
ENV OS_IDENTITY_API_VERSION=3
ENV BACKUP_SOURCES=""
# openshift fix
RUN mkdir /.cache && \

View File

@@ -11,11 +11,16 @@ This container runs restic backups in regular intervals.
* [ghcr.io/lobaro/restic-backup-docker](https://github.com/lobaro/restic-backup-docker/pkgs/container/restic-backup-docker)
* Old: [lobaro/restic-backup-docker](https://hub.docker.com/r/lobaro/restic-backup-docker/)
Latest (experimental):
Latest master (experimental):
```
docker pull ghcr.io/lobaro/restic-backup-docker:master
```
Latest release:
```
docker pull ghcr.io/lobaro/restic-backup-docker:latest
```
# Contributing
Pull Requests to improve the image are always wellcome. Please create an issue about the PR first.
@@ -137,6 +142,7 @@ The container is set up by setting [environment variables](https://docs.docker.c
* `OS_REGION_NAME` - Optional. When using restic with OpenStack Swift container.
* `OS_INTERFACE` - Optional. When using restic with OpenStack Swift container.
* `OS_IDENTITY_API_VERSION` - Optional. When using restic with OpenStack Swift container.
* `BACKUP_SOURCES` - Optional. Set the folder that will be backed up.
## Volumes
@@ -196,7 +202,7 @@ version: '3'
services:
restic:
image: lobaro/restic-backup-docker:latest
image: ghcr.io/lobaro/restic-backup-docker:latest
hostname: nas # This will be visible in restic snapshot list
restart: always
privileged: true
@@ -216,10 +222,5 @@ services:
```
# Versioning
Starting from v1.3.0 versioning follows [Semantic versioning](http://semver.org/)
Build metadata is used to declare the Restic version.
**Example:** v1.3.2+restic-0-16-0 (includes Restic 0.16.0)

View File

@@ -4,6 +4,12 @@ lastLogfile="/var/log/backup-last.log"
lastMailLogfile="/var/log/mail-last.log"
lastMicrosoftTeamsLogfile="/var/log/microsoft-teams-last.log"
if [ -n "$BACKUP_SOURCES" ]; then
backupSources="$BACKUP_SOURCES"
else
backupSources="/data"
fi
copyErrorLog() {
cp ${lastLogfile} /var/log/backup-error-last.log
}
@@ -31,7 +37,7 @@ logLast "RESTIC_REPOSITORY: ${RESTIC_REPOSITORY}"
logLast "AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}"
# Do not save full backup log to logfile but to backup-last.log
restic backup /data ${RESTIC_JOB_ARGS} --tag=${RESTIC_TAG?"Missing environment variable RESTIC_TAG"} >> ${lastLogfile} 2>&1
restic backup ${backupSources} ${RESTIC_JOB_ARGS} --tag=${RESTIC_TAG?"Missing environment variable RESTIC_TAG"} >> ${lastLogfile} 2>&1
backupRC=$?
logLast "Finished backup at $(date)"
if [[ $backupRC == 0 ]]; then