forked from TrueCloudLab/restic
Delete files in parallel in rebuild-index
This commit is contained in:
parent
1c0b61204b
commit
d3692f5b81
1 changed files with 1 additions and 9 deletions
|
@ -92,15 +92,7 @@ func rebuildIndex(ctx context.Context, repo restic.Repository, ignorePacks resti
|
||||||
Verbosef("saved new indexes as %v\n", ids)
|
Verbosef("saved new indexes as %v\n", ids)
|
||||||
|
|
||||||
Verbosef("remove %d old index files\n", len(supersedes))
|
Verbosef("remove %d old index files\n", len(supersedes))
|
||||||
|
DeleteFiles(globalOptions, repo, restic.NewIDSet(supersedes...), restic.IndexFile)
|
||||||
for _, id := range supersedes {
|
|
||||||
if err := repo.Backend().Remove(ctx, restic.Handle{
|
|
||||||
Type: restic.IndexFile,
|
|
||||||
Name: id.String(),
|
|
||||||
}); err != nil {
|
|
||||||
Warnf("error removing old index %v: %v\n", id.Str(), err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue