Commit Graph
178 Commits
Author SHA1 Message Date
Tobias KaupatandClaude Sonnet 5.5 e4016ef8fe test: print only the comment header for run.sh --help
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:39:03 +02:00
Tobias KaupatandClaude Sonnet 5.5 8607aa441c test: describe the structure suite fallback in the run.sh header
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:38:56 +02:00
Tobias KaupatandClaude Sonnet 5.5 c49d1810ca test: sabotage self test must fail the backup assertions by name
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:38:48 +02:00
Tobias KaupatandClaude Sonnet 5.5 abe01179de test: avoid GNU-only sed -i in the sabotage self test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:38:48 +02:00
Tobias KaupatandClaude Sonnet 5.5 66ca99bda3 test: make snapshot_count fail loudly on restic errors
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:36:37 +02:00
Tobias KaupatandClaude Sonnet 5.5 0d841ee98e test: make the failed-backup snapshot assertion target the repo the run used
Fail the backup via a nonexistent source on the initialised default repo
instead of a nonexistent repository, so snapshot_count can actually go red.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:36:11 +02:00
Tobias KaupatandClaude Sonnet 5.5 1c610aec4b test: match the snapshot hostname via restic --host in the stream test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:18:29 +02:00
Tobias KaupatandClaude Sonnet 5.5 6e06da89a3 test: assert the restic restore exit code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:18:04 +02:00
Tobias KaupatandClaude Sonnet 5.5 76975658a7 fix: reject --suite without a value instead of running all suites
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:16:59 +02:00
Tobias KaupatandClaude Sonnet 5.5 4a2b963fb5 ci: least-privilege permissions, concurrency cancel and job timeouts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:13:14 +02:00
Tobias KaupatandClaude Sonnet 5.5 aab8db6f89 test: cover CHECK_CRON cron line and pre/post-check hooks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 10:13:07 +02:00
Tobias KaupatandClaude Opus 5 c138bd24d3 test: prove RESTIC_JOB_ARGS reaches restic backup
The suite recorded RESTIC_JOB_ARGS only indirectly through backup-last.log,
which proves nothing about restic ever seeing the arguments. Removing
${RESTIC_JOB_ARGS} from the restic backup call in backup.sh left compat at
32 passed, 0 failed - exactly the failure class this PR is supposed to
catch, and exactly blocker 1 of PR #109.

compat.sh gets a section that runs a backup with
RESTIC_JOB_ARGS=--exclude=/data/skipme.txt and requires the excluded file
to be absent from the restore while the other file is restored intact, so
the arguments must have a visible effect.

features.sh gets the matching assertion inside the existing `stream`
feature gate (RESTIC_JOB_ARGS=--host=jobargshost must show up in the
snapshot metadata of a stdin backup). It is reported as SKIP until PR #109
is rebased, which is the point of the gate.

Verification on Git-Bash:
  bash test/run.sh -> structure 13/13, compat 39 passed 0 failed,
                      features 4 SKIP, exit 0
  sabotage (backup.sh:40 ${RESTIC_JOB_ARGS} removed), rebuilt image
  IMAGE=rbd-sab-jobargs bash test/compat.sh
    -> FAIL RESTIC_JOB_ARGS is passed to restic backup
       "the excluded file was backed up anyway"
    -> 38 passed, 1 failed, exit 1
backup.sh was restored with git checkout and the sabotage image removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Agent-Id: agent-4966d0e6-7f4d-4b37-be3d-0648ed56cb8a
2026-10-17 23:36:56 +02:00
Tobias KaupatandClaude Opus 5 0aced54891 test: prove restic check actually fails on a corrupted repository
compat.sh only grepped the check output for "Check Successful". check.sh
prints that string whenever restic exits 0, so a `restic check` that had
been turned into a no-op kept the suite green - the integrity check, half
the purpose of this image, was untested.

Adds a section that backs up, overwrites the first pack file under
/mnt/restic/data with garbage and then requires the failure path:
"Check Failed with Status", no "Check Successful", and
/var/log/check-error-last.log written. It uses its own throwaway container
so the later tests do not inherit the broken repository.

Verification on Git-Bash:
  bash test/compat.sh                    -> 36 passed, 0 failed
  sabotage (check.sh: restic check -> true), rebuilt image
  IMAGE=rbd-sab-check bash test/compat.sh -> 33 passed, 3 failed, exit 1
    - restic check detects a corrupted repository
    - a corrupted repository is not reported as successful
    - failing check writes check-error-last.log
check.sh was restored with git checkout and the sabotage image removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Agent-Id: agent-4966d0e6-7f4d-4b37-be3d-0648ed56cb8a
2026-10-17 23:30:57 +02:00
Tobias KaupatandClaude Opus 5 6cb2f72cf9 fix: make the test suites work on Windows/Git-Bash out of the box
MSYS rewrites POSIX-looking arguments before docker sees them, so
`docker exec <id> /usr/bin/backup` arrived as
`C:/Program Files/Git/usr/bin/backup` and the structure suite could not
read `--config /test/structure.yml`. 23 of 32 compat assertions and the
whole structure suite failed on Git-Bash, while test/lib.sh claimed the
suites behave identically on every platform.

test/lib.sh and test/run.sh now export MSYS_NO_PATHCONV=1 and
MSYS2_ARG_CONV_EXCL='*' themselves - lib.sh for the suites that source it,
run.sh for its own docker calls and the suites it starts as separate
processes. Both variables are ignored on Linux and macOS. README documents
that nothing has to be exported by hand.

Verified on Git-Bash without any variable set in the environment:
structure 13/13, compat 32/32, features 4 SKIP, exit 0, and
`bash test/run.sh --sabotage` still reports "sabotage check ok".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Agent-Id: agent-4966d0e6-7f4d-4b37-be3d-0648ed56cb8a
2026-10-17 23:27:02 +02:00
Tobias KaupatandClaude Opus 5 9f1c80951d ci: use the container-structure-test image instead of a pinned download
The pinned release URL returned 404. test/run.sh already falls back to the
official tool image when the binary is absent, so CI and local runs now take
the same path.

Also pin *.txt to LF and make the required-features lookup tolerate CRLF, so
the feature gate works on a Windows checkout too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Agent-Id: agent-7034f75b-1ddc-4aa1-a4ea-3a54b340e8d9
2026-10-17 22:50:15 +02:00
Tobias KaupatandClaude Opus 5 10b197f1f5 test: add container test suites and run them in CI
The repository had no tests: CI only built the image, and the old
container-structure-test setup was parked as config-broken.yml /
docker-compose.test.broken.yml. This adds suites that actually run the image.

- test/compat.sh: backup, restore, forget, check, hooks, failure handling and
  timezone behaviour against the default configuration. These describe what
  users depend on today, so a change that turns them red is a breaking change.
- test/features.sh: optional features, each guarded by a detection check
  against the built image. Absent features are reported as SKIP, so open pull
  requests do not turn master red, and their feature tests start running by
  themselves once the pull request is rebased. Covers #109 (RESTIC_STREAM),
  #99 (docker cli, bash) and #84 (msmtp).
- test/required-features.txt: once a feature is merged its gate is listed here
  and a missing feature becomes a failure instead of a skip.
- test/structure.yml: revived image layout checks, falls back to the official
  container-structure-test image when the tool is not installed.
- test/run.sh --sabotage: breaks the backup call on a throwaway copy of the
  tree and expects the suite to fail, so the tests cannot be watered down into
  always passing. CI runs this as its own step.
- .github/workflows/test.yml: shellcheck plus all suites on every pull request.

Also adds .gitattributes pinning shell scripts, the Dockerfile and YAML to LF.
With a Windows checkout (core.autocrlf=true) the scripts were checked out with
CRLF, and the resulting image failed to start with
"exec /entry.sh: no such file or directory".

No runtime file is touched, the image itself is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Agent-Id: agent-7034f75b-1ddc-4aa1-a4ea-3a54b340e8d9
2026-10-17 22:47:26 +02:00
Max Konrädi 47d29529e9 chore: Changelog v1.4.2 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 v1.4.1 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
v1.4.0
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