Repository navigation
Conversation
…heck restic exits with 10 only when the repository does not exist. Using that instead of matching stderr fixes control never creating `_control` on a rest-server destination, and stops a mistyped S3 bucket from being created by `restic init`. - `tug backup destination check` probes `_control` and every project with backup targets from control's host, creating missing repositories, and stores the result; `destination set` runs it unless `--no-check` - destinations accept b2:, azure:, gs: and swift:; sftp: and rclone: are rejected with the reason - `tug backup password` works before the first deploy and warns when the project is not deployed - docs for REST servers, the other backends, the check and migrating from an existing restic setup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the old-restic hint needs a known restic version below 0.17, since 0.19 adds the same stderr line to every failure - a failed `_control` skips the project repositories and the check stops after 4 minutes, under the CLI's 300 s limit - `destination set` exits 0 after a successful save and warns on a failed check or a control without the check route - per-repository wording says where the check ran and calls a created repository new and empty - the check and control's own backup never run together; a result is stored only for the destination it checked - changesets and migration docs spell out the restic 0.17 floor, rejected sftp/rclone and copying old snapshots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the backup findings from a real migration to a restic
rest-serverdestination over WireGuard.What was wrong
_controlwas never created on a REST destination. Control's backup only ranrestic initwhen stderr matched a regex that does not cover the REST wording (<config/> does not exist), so the nightly control backup failed forever.does not exist) that also matchesbucket does not exist, andrestic initcreates the bucket.Both now use one classifier based on restic's exit code: 10 means the repository does not exist (restic 0.17+), and anything else is an error. I checked this against real backends with restic 0.19.1. A rest-server missing repository and an S3 missing key both exit 10. An S3 missing bucket keeps retrying and never exits 10.
Changes
src/backup/repository-probe.ts: the shared classifier and failure wording (wrong password, restic older than 0.17).tug backup destination check(POST /api/v1/backup/destination/check, admin). From control's host it probes_controland every project with enabled backup targets, creates missing repositories (which proves write access), and stores the result in the existingchecked_at/check_result_jsoncolumns.destination setruns it unless you pass--no-check.backup.checkjob is now read-only and reportsmissinginstead of initializing. This is an additive protocol value.b2:,azure:,gs:andswift:.sftp:andrclone:are rejected with the reason.tug backup passwordworks before the first deploy (the password is derived from the name) and warns when the project is not deployed.backup runexplains that targets come from the deployed Compose file.backup list --check.Verification
npm run typecheck,npm run lint(0 errors) andnpm test: 1207 of 1207 pass.checkRepositoryrun against a realrest-server --no-authwith restic 0.19.1: an empty_controlreturnsinitialized, a second run returnsok, and a wrong password returnswrong repository password (restic exit code 12).🤖 Generated with Claude Code