mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 23:06:32 +00:00
repository: remove prune plan parts once they are no longer necessary
This commit is contained in:
parent
462b82a060
commit
3c7b7efdc9
@ -545,6 +545,8 @@ func (plan *PrunePlan) Execute(ctx context.Context, printer progress.Printer) er
|
||||
if len(plan.removePacksFirst) != 0 {
|
||||
printer.P("deleting unreferenced packs\n")
|
||||
_ = deleteFiles(ctx, true, repo, plan.removePacksFirst, restic.PackFile, printer)
|
||||
// forget unused data
|
||||
plan.removePacksFirst = nil
|
||||
}
|
||||
if ctx.Err() != nil {
|
||||
return ctx.Err()
|
||||
@ -562,6 +564,8 @@ func (plan *PrunePlan) Execute(ctx context.Context, printer progress.Printer) er
|
||||
|
||||
// Also remove repacked packs
|
||||
plan.removePacks.Merge(plan.repackPacks)
|
||||
// forget unused data
|
||||
plan.repackPacks = nil
|
||||
|
||||
if plan.keepBlobs.Len() != 0 {
|
||||
printer.E("%v was not repacked\n\n"+
|
||||
|
Loading…
Reference in New Issue
Block a user