backup engine internals - restic timeout and stack-dir capture

This commit is contained in:
jarek committed 2026-08-13 10:20:30 +02:00
1 parent 610e46dc19
commit 3c75bd4919
9 files changed
+113 -152

No files matched your search

@@ -17,7 +17,6 @@
type Entry = { name: string; type: 'dir' | 'file'; size: number; capturedAs?: 'bind' | 'volume' };
type Listing =
| { kind: 'listed'; hostPath: string; entries: Entry[] }
| { kind: 'tar'; localStackDir: string; entries: Entry[] }
| { kind: 'helper-failed'; reason: string }
| { kind: 'unknown'; reason: string }
| null;
@@ -68,7 +67,7 @@
return isLoadBearing(e.name) || e.capturedAs != null;
}
const entries = $derived(listing?.kind === 'listed' || listing?.kind === 'tar' ? listing.entries : []);
const entries = $derived(listing?.kind === 'listed' ? listing.entries : []);
const selectable = $derived(entries.filter((e) => !isLocked(e)));
// "All files" is on when nothing selectable is excluded.
const allFiles = $derived(excludedStackFiles.length === 0);
@@ -99,8 +98,7 @@
<Loader2 class="h-4 w-4 shrink-0 animate-spin" />
Probing the host for the stack folder...
</div>
{:else if listing?.kind === 'listed' || listing?.kind === 'tar'}
{#if listing.kind === 'listed'}
{:else if listing?.kind === 'listed'}
<!-- Resolved host path callout (copied from BackupPanel's stack-path candidate). -->
<div class="flex items-start gap-2 rounded-md border bg-muted/30 p-2.5 text-xs">
<FolderOpen class="mt-0.5 h-4 w-4 shrink-0 text-sky-500" />
@@ -180,17 +178,6 @@
<div class="mt-0.5 break-all font-mono text-muted-foreground">{listing.hostPath}</div>
</div>
</div>
{:else}
<!-- TAR mode: no host folder to read (direct-remote, no stack path set). Only Dockhand's
own copy of the compose/config is captured; bind-mount DATA on the remote host is NOT. -->
<div class="flex items-start gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 p-2.5 text-xs">
<AlertTriangle class="mt-0.5 h-4 w-4 shrink-0 text-amber-500" />
<div class="min-w-0">
<div class="font-medium text-amber-600 dark:text-amber-400">Only these compose/config files will be captured</div>
<div class="mt-0.5 text-muted-foreground">This environment has no stack path set, so the folder can't be read on the remote host. Dockhand backs up its own copy of the files below. <strong>Bind-mount data on the remote host is NOT included.</strong> Set a stack path on this environment for a full backup.</div>
</div>
</div>
{/if}
<div class="border rounded-md overflow-hidden">
<div class="flex items-center gap-3 px-3 py-2 bg-muted/30 border-b">