Repository navigation
fix: stop treating restic auth failures as an uninitialized repository - #81
Merged
Merged
Conversation
Production backups stopped on 2026-11-04 because Google expired the rclone OAuth refresh token (consent screen in Testing status, 7-day token life). backup.sh misread the resulting restic failure as "repository not initialized", ran a doomed restic init and alerted without the cause. - Run restic init only on exit code 10 (repository does not exist). - Fail with a Telegram hint on invalid_grant, or the exit code otherwise. - Regression test via a RESTIC_SHIM_INVALID_GRANT restic shim. - Runbook for re-authorizing Google Drive and the new published minecraft-backup-rclone OAuth project. Closes #80
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.
Summary
backup.shrunsrestic initonly when restic exits 10 (repository does not exist); any other failure fails the backup.invalid_grantthe Telegram alert says to re-authorize rclone; otherwise it reports the restic exit code.expired Google OAuth token fails backup without restic init(restic shimRESTIC_SHIM_INVALID_GRANT=1).docs/BACKUP_RESTORE.mdand a note indocs/SECRETS.mdabout the 7-day token life of Testing OAuth apps.Production was already recovered on 2026-11-06: new published OAuth project
minecraft-backup-rclone, newrclone.confon the VPS and inYANDEX_RCLONE_CONFIG, snapshot0f160de4, healthcheck passed.Test plan
backup.shsimulated locally for invalid_grant / network error / fresh repo / normal run.test/localdocker suite and shellcheck in CI (Docker is not available locally).Closes #80