mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
prune: Fail early if too few backend connections
This commit is contained in:
parent
e597b99b55
commit
f5609d1d3c
@ -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 New Issue
Block a user