restore_version
Restore one file version found by find_file to a P5 host directory from the cheapest source or a specified location. Preview conflicts and confirm with planId to execute.
Instructions
Restores ONE version found by find_file into a directory on the P5 host, from the cheapest place automatically (disk-tar: extracted from the tar; tape-library: P5 restore; tar on tape in library: tar restored to scratch then extracted) or from the location id given as 'from'. A version that is only on offline tapes is refused with 'insert '. Without confirm only the PLAN: host, absolute destination, source location chosen (and alternatives), bytes, free space, tree preview and every destination file that already exists (size+mtime now vs restored), conflict policy and a planId. confirm:true must pass that planId; if the destination or conflicts changed it refuses and shows the new plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"version": "<version>"
},
"name": "restore_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Default: restore folder <restoreRoot>/<YYYYMMDD-HHMMSS>/<original path>. 'original' = original location (explicit choice; refused inside a syncRoot without forceSync). Any other absolute directory gets the original path placed below it | |
| from | No | location id from find_file instead of the cheapest | |
| path | Yes | full path as find_file shows it | |
| client | No | ||
| planId | No | planId printed by the preview; required with confirm:true. A changed destination or new conflicts make the call refuse and show the new plan | |
| confirm | No | Must be true to actually run; without it only the plan/commands are returned | |
| version | Yes | version key '<mtime>-<size>' from find_file | |
| forceSync | No | Allow to:'original' inside a configured syncRoot | |
| onConflict | No | What to do when a destination file exists: refuse (default), rename (<name>.restored-YYYYMMDD; not for P5 volume restores) or overwrite |