T-7PT3-backup-restore-file
State: closed/done · Impact: medium · Complexity: medium
Backups can be made and browsed, but nothing can be put back. Restoring a file is the core missing capability.
Proposed
Section titled “Proposed”BackupPortgainsrestore_file(vault_id, sha, path), implemented incrates/determined-backupand exposed as an addressed POST inapi/v1/backup.rs, so ontogen generates the route, IPC command and client.- Restore takes a snapshot first, then writes the file’s content at
shainto the live vault through an atomic write. A path absent from the live vault is recreated. BackupFilePreviewand the changes list offer “Restore this version”. A confirmation names the file and the snapshot time. After restore, the page says which snapshot holds the replaced version.
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: Restoring a modified file makes its content match the snapshot byte for byte.
- AC-2: Restoring a file deleted since the snapshot recreates it.
- AC-3: When restore replaces an existing file, the pre-restore snapshot holds its replaced content, so that replacement can be undone by restoring from it. A restore that recreates a deleted file has no replaced version to undo.
- AC-4: A path that escapes the vault or does not exist at
shais refused with a clear error. - AC-5: Integration and end-to-end coverage exercise the restore control and its confirmation. Storybook enrollment is out of scope until this experience has a Storybook host.
Out of scope
Section titled “Out of scope”- Folder or whole-vault restore.
- A diff view before restoring.
Dependencies
Section titled “Dependencies”- T-GHKW: restore is built on the Rust arm only.