vh recovery and vh snapshot
Reference for vh recovery and vh snapshot - list, plan, restore and delete earlier versions of files, and take local snapshots.
Earlier versions of files come from three places: local snapshots you take, local versions kept automatically when
local versioning is on, and the provider's own object versions (an AWS S3 bucket with versioning enabled, or a
Backblaze B2 bucket, which always keeps versions). Their ids are snap-<id>, lv-<id> and pv-<id>. A vault's
recovery settings (which of these it keeps) are vh vault recovery; undeleting a whole
vault is vh vault restore. See File Recovery for how each kind of history works and what it
costs.
1vh snapshot create <vault> <path> [--name <name>] [--json]2vh recovery list <vault> [path] [--refresh] [--snapshots-only|--versions-only|--provider-only] [--limit <n>] [--json]3vh recovery plan <vault> <path> --at <ISO-8601 time> [--prune] [--to <path>] [--json]4vh recovery restore <recovery-id> [--to <path>] [--yes] [--accept-unverified] [--json]5vh recovery restore <plan-id> --token <token> [--accept-unverified] [--json]6vh recovery costs <vault> [--json]
Recovery Points
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
<vault> <path> | ls, history | read | Recovery points of a vault, or of one path (a file's history, or the points under a directory): snapshots, local versions and provider versions. | |
<recovery_id> | info, show | read | Details of one recovery point: what it holds, its key version, retention and whether it can be restored (and why not). | |
<source> <path> | preview | read | Plan a restore without changing anything: per item create, overwrite, skip, conflict, remove or unavailable, the method, a request/cost estimate, warnings and blockers. | |
<plan> | apply | destructive | Run a restore plan, or plan and run one for a recovery id. | |
<recovery_id> | remove, rm | destructive | Delete a snapshot or a local version (filesystem Delete on its path). | |
<vault> | cost | read | Estimated recovery costs for a vault: the provider versioning surcharge (separate from the current object storage), recovery operations and what is not modelled, with ranges, basis and catalog freshness. |
vh recovery list
vh recovery list <vault> <path> [options]recovery list with a file path shows that file's history; --refresh lists the provider's versions of the path
first (metadata only). You only see points you can read.
| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-o | id or name | User ID or username of the vault owner (required if using a name). | ||
n | 200 | At most N points. | ||
flag | List the provider's versions of the path first (metadata only, request-budgeted). | |||
flag | Only local snapshots. | |||
flag | Only local versions. | |||
flag | Only provider versions. | |||
flag | Print the result as JSON (the ws shapes). |
vh recovery inspect
vh recovery inspect <recovery_id> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
flag | Print the result as JSON (the ws shapes). |
vh recovery plan
plan changes nothing: it shows what each item would do (create, overwrite, skip, conflict, remove, unavailable),
the size and method, a provider request and cost estimate, warnings and blockers, and the plan id and token (valid 30
minutes). A plan with --at is a timestamp-based reconstruction from each file's version history, not an atomic
snapshot; only a local snapshot is taken in one pass. It needs an S3 vault with provider versions. --prune also
removes files that did not exist at that time.
| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-o | id or name | User ID or username of the vault owner (required if using a name). | ||
path | Restore under this vault path instead of the original paths. | |||
time | Point in time: restore the state as of this ISO-8601 UTC time. | |||
flag | Point in time: also remove files that did not exist at that time. | |||
flag | Print the result as JSON (the ws shapes). |
vh recovery restore
vh recovery restore <plan> [--token <token>] [--to <path>] [--yes] [--accept-unverified] [--json]restore <recovery-id> plans, shows the plan and asks before it runs; type RESTORE when anything is overwritten or
removed (a plain yes/no otherwise). --yes skips the question for scripts. A plan made with vh recovery plan runs
with its id and the --token it printed, which is the confirmation. Every item is authorized again, and a destination
that changed after the plan was made is reported as a conflict and left alone. Provider versions Vaulthalla did not
write need --accept-unverified (or type UNVERIFIED). The exit status is 1 when anything was not restored and 2
when the restore was refused; run the plan again (<plan-id> --token) to resume an interrupted or partial restore.
| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
token | The plan's token (from vh recovery plan); confirms without a prompt. | |||
path | Restore under this vault path instead of the original paths. | |||
flag | Don't ask: confirm the action (for scripts). | |||
flag | Also restore provider versions Vaulthalla did not write. | |||
flag | Print the result as JSON (the ws shapes). |
vh recovery delete
vh recovery delete <recovery_id> [--yes]recovery delete removes snapshots and local versions (type DELETE, or --yes); provider versions are removed by
the bucket's retention, and a local version still waiting to be uploaded can't be deleted.
| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
flag | Don't ask: confirm the action (for scripts). |
vh recovery costs
Shows the versioning surcharge separately from the current object storage, the cost of recovery operations and what is not modelled, with ranges, the basis of each figure (observed, scenario or illustrative) and the price catalog's freshness. A figure that can't be estimated says so and why; it is never shown as zero. The figures are computed on the host and are estimates, not provider invoices.
Snapshots
Snapshots need the recovery mode local-snapshots (vh vault recovery set <vault> --mode local-snapshots).
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
<vault> <path> | new, take | write | Take a named local snapshot of a file or directory tree. | |
<vault> <path> | ls | read | List a vault's snapshots, or those taken of a path (the path is optional). | |
<snapshot_id> | remove, rm | destructive | Delete a snapshot (filesystem Delete on its path). |
vh snapshot create
vh snapshot list
vh snapshot delete
vh snapshot delete <snapshot_id> [--yes]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
flag | Don't ask: confirm the action (for scripts). |
