feat: undo a restore from the safety copy it took
- POST /refresh-runs accepts undo_of: restores the safety copy of a completed restore back onto the same target through the normal run engine (checks, countdown, progress, and a new safety copy so the undo can be undone); refused when something was restored after it or the copy is gone - a safety copy is accepted as a source only for the target it was taken from (hub and agent both check) - run views carry undo and undo_available; audited as refresh.undo_started - the modal offers Undo last restore and, after a restore, Undo this restore - proven with a real agent and PostgreSQL: restore, undo back to the original contents, undo of the undo Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,10 @@ pub struct RestoreArtifact {
|
||||
pub format: CaptureFormat,
|
||||
pub identity: DatabaseIdentity,
|
||||
pub sha256: String,
|
||||
/// The artifact is the safety copy a restore took of the very target it is now restored onto (an undo).
|
||||
/// Its source identity is then the target's own, so the "target is the source" refusal does not apply.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub rollback: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user