forked from TrueCloudLab/restic
prune: Fail early if too few backend connections
This commit is contained in:
parent
e597b99b55
commit
f5609d1d3c
1 changed files with 4 additions and 0 deletions
|
@ -132,6 +132,10 @@ func runPrune(opts PruneOptions, gopts GlobalOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if repo.Backend().Connections() < 2 {
|
||||
return errors.Fatal("prune requires a backend connection limit of at least two")
|
||||
}
|
||||
|
||||
lock, err := lockRepoExclusive(gopts.ctx, repo)
|
||||
defer unlockRepo(lock)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue