{{define "title"}}{{.Title}}{{end}} {{define "content"}} {{template "host_chrome" .}} {{$page := .Page}} {{$host := $page.Host}}

Restore from snapshot

Pick a snapshot, choose paths, decide where files go, then dispatch. Live progress streams to a job page once you start.
{{if $page.Error}}
{{$page.Error}}
{{end}}
{{/* ============ STEP 1 — snapshot picker ============ */}}
{{if $page.Selected}} {{else}} 1 {{end}}
Snapshot
Pick the point-in-time you want to restore from.
step 1 of 4
{{if $page.Selected}} {{/* selected summary card */}}
{{$page.Selected.ShortID}}
{{$page.Selected.Time.Format "2006-01-02 15:04 MST"}} ·{{relTime $page.Selected.Time}}
{{range $page.Selected.Tags}}{{.}}{{end}} paths: {{range $i, $p := $page.Selected.Paths}}{{if $i}}, {{end}}{{$p}}{{end}} {{if $page.Selected.SizeBytes}} · {{bytes $page.Selected.SizeBytes}}{{end}}
picked from {{len $page.Snapshots}} snapshots Change
{{else}} {{/* full picker table */}}
Time
Tag
Paths
Size
Snapshot ID
{{if not $page.Snapshots}}
No snapshots yet. Run a backup first.
{{end}} {{range $page.Snapshots}}
{{relTime .Time}}
{{range .Tags}}{{.}}{{end}}
{{range $i, $p := .Paths}}{{if $i}}, {{end}}{{$p}}{{end}}
{{if .SizeBytes}}{{bytes .SizeBytes}}{{else}}—{{end}}
{{.ShortID}}
{{end}}
{{end}}
{{/* ============ STEP 2 — paths (tree browser) ============ */}}
2
Paths
Tick files and directories to restore. Folders restore recursively.
step 2 of 4
{{if $page.Selected}}
{{/* Root tree node — fetched on first wizard render; child expansions reuse the same tree.list cache server-side. */}}
loading…
0 files selected · tick a file or directory above
{{else}}
Pick a snapshot above to load its paths.
{{end}}
{{/* ============ STEP 3 — target ============ */}}
3
Target
Where should the files land? Defaults to a fresh, isolated directory.
step 3 of 4
{{/* ============ STEP 4 — confirm ============ */}}
4
Confirm & start
Final review. Logs and progress will stream live.
step 4 of 4
A summary will appear here once you've made your selections.
{{/* sticky-style action bar */}}
Audit row host.restore will be written on dispatch.
Back
{{/* Lightweight JS to drive the live tally + summary card + tree toggle. The tree-toggle is plain fetch (not HTMX) so its target lookup is trivial — the .tree-children div is always the next sibling inside the same .tree-pair wrapper. */}} {{end}}