Repository navigation
fix: a backup copy directory holds one installation's backups - #116
Conversation
A new server set up to replace a lost one copied its own empty database into the share as the newest backup, so restoring "the newest copy" (as the install guide said) brought back nothing; the #97 restore drill hit it against the v0.1.0 release. - copy_snapshot refuses a snapshot whose installation differs from the newest readable copy's, both read from the files read-only and immutable, so shares written by 0.1.0 are protected too. - Catch-up and copy status consider only the installation's own backups: never the database a restore set aside. - restore ends with a backup of the restored database, so copies resume from it at once; the set-aside goes through the same snapshot owner, and a snapshot within a second of the last waits for a new name. Closes #115 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
|
@codex review Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62e8f6573e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd4c5bc085
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…y pre-restore copies Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0467756fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A database a restore set aside no longer postpones the next backup or makes old backups look fresh to doctor and the health read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0691a7546e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a609ab53b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Primary Issue
Closes #115 (found by the #97 restore drill)
Problem And Outcome
Following
docs/install.md's "server's disk is gone" procedure literally restored an empty database. The new server's scheduler copied its own blank snapshot into the share, where it became the newest file, and "restore the newest file" restored it. A new server left running also pruned the real copies within 14 backups, and a restore's set-aside database was copied off the server too.After this PR, the same procedure, followed literally, brings the records back unchanged. This is proven against a share written by the published v0.1.0.
Changes
backup_copy::copy_snapshot, the one path for every copy (scheduler,backup --backup-copy-dir, pre-migration copy):storage::open_snapshot, which is read-only andimmutable, so no sidecar lands on the share;backup::own_backups_inreturns scheduled and pre-migration snapshots, neverprerestoreones. It is used by:doctor,/api/backups/status, home page);latest_snapshot_mtime, which drives the scheduler anddoctor);doctor'sbackupsline, which warns when only a set-aside database exists.restore:backup::run_after_restore, so the restored database is the newest backup and copying resumes at once;backup::set_aside_before_restore) instead of a duplicate path;.damaged, as the drill observed.docs/install.mdgives the step-by-step replacement-server procedure;Correction rungs:
copy_snapshot), making snapshots (take_snapshot), and the own-backup selection (own_backups_in);Verification
tests/copy_ownership.rs, 7 tests:doctor;a609ab5: passed, all 7 gates. The browser suite was 61/0/0. Receipt.proof/20261015T014618Z-a609ab53b7ce/receipt.json, sha2561c83d21be60f6f0318239f576000a3799045e2a44b6668d64d7407d1b4bf48fe. Earlier headscd4c5bc,f046775, and0691a75passed too.backup copy failed: … holds the backups of installation 67789a46-…;restorereported host A's id and backed up the restored database;doctorwas allokwith the copycurrent;export verify.current; and two concurrent same-second backups. Each needs an unsupported two-writer setup or same-second timing, and the outcomes are benign or self-reported.🤖 Generated with Claude Code
https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Generated by Claude Code