add docs updates and use latest restic pkg interface

This commit is contained in:
Gareth
2025-11-14 22:19:56 -08:00
parent 0b03c320d5
commit 559968693e
2 changed files with 10 additions and 2 deletions
+6
View File
@@ -104,6 +104,12 @@ services:
ports:
- "9898:9898"
restart: unless-stopped
# Optional, these are required for fast repo browsing mode using FUSE
# but are not required for the default repo browsing mode using `restic ls`
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse:/dev/fuse
```
## Running on Linux
+4 -2
View File
@@ -480,9 +480,11 @@ func (r *Repo) Mount(ctx context.Context, dir string, mountTimeout time.Duration
}
// Start the mount command in background
errorCollector := errorMessageCollector{}
cmd := r.commandWithContext(ctx, []string{"mount", dir}, opts...)
r.handleOutput(cmd, withAllTo(&errorCollector), withLogWriterFromContext(ctx))
if err := cmd.Start(); err != nil {
return newCmdError(ctx, cmd, err)
return errorCollector.AddCmdOutputToError(cmd, err)
}
// Wait for mount to become available
@@ -508,7 +510,7 @@ func (r *Repo) Mount(ctx context.Context, dir string, mountTimeout time.Duration
}
if cmd.ProcessState != nil && cmd.ProcessState.Exited() {
return newCmdError(ctx, cmd, fmt.Errorf("restic mount process exited with code %d", cmd.ProcessState.ExitCode()))
return errorCollector.AddCmdOutputToError(cmd, fmt.Errorf("restic mount process exited with code %d", cmd.ProcessState.ExitCode()))
}
}
}