mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-09-23 08:25:40 +00:00
add docs updates and use latest restic pkg interface
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user