Skip to content

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.

  • BackupPort gains restore_file(vault_id, sha, path), implemented in crates/determined-backup and exposed as an addressed POST in api/v1/backup.rs, so ontogen generates the route, IPC command and client.
  • Restore takes a snapshot first, then writes the file’s content at sha into the live vault through an atomic write. A path absent from the live vault is recreated.
  • BackupFilePreview and 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.
  • 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 sha is 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.
  • Folder or whole-vault restore.
  • A diff view before restoring.
  • T-GHKW: restore is built on the Rust arm only.

T-GHKW-backup-rust-arm-flip


← Back to Tasks