mirror of
https://github.com/restic/restic.git
synced 2026-10-13 05:27:13 +00:00
prune: Fail early if too few backend connections
This commit is contained in:
1 parent
e597b99b55
commit
f5609d1d3c
1 file changed
+4
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user