Skip to content

avc restore-file

Restores one file rather than the whole snapshot.

Terminal window
avc restore-file snap-abc123 src/auth.go
avc restore-file snap-abc123 src/auth.go --json
ArgumentRequiredDescription
<snapshot_id>yesSnapshot to read from
<file_path>yesProject-relative file path
{
"id": "snap-abc123",
"file_path": "src/auth.go",
"size": 4096,
"success": true
}
  • The file is overwritten if it exists; created if it doesn’t
  • Other files in the project are not touched
  • If the file isn’t in the snapshot, you get a 404-style error and no file is written
  • Useful for restoring a single config or one buggy file without rolling back everything else