mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
repair snapshots: cleanup warnings
This commit is contained in:
parent
f6cc10578d
commit
7c8dd61e8c
@ -130,11 +130,12 @@ func runRepairSnapshots(ctx context.Context, gopts GlobalOptions, opts RepairOpt
|
|||||||
},
|
},
|
||||||
RewriteFailedTree: func(nodeID restic.ID, path string, _ error) (restic.ID, error) {
|
RewriteFailedTree: func(nodeID restic.ID, path string, _ error) (restic.ID, error) {
|
||||||
if path == "/" {
|
if path == "/" {
|
||||||
|
Verbosef(" dir %q: not readable\n", path)
|
||||||
// remove snapshots with invalid root node
|
// remove snapshots with invalid root node
|
||||||
return restic.ID{}, nil
|
return restic.ID{}, nil
|
||||||
}
|
}
|
||||||
// If a subtree fails to load, remove it
|
// If a subtree fails to load, remove it
|
||||||
Printf("removed defective dir '%v'", path)
|
Verbosef(" dir %q: replaced with empty directory\n", path)
|
||||||
emptyID, err := restic.SaveTree(ctx, repo, &restic.Tree{})
|
emptyID, err := restic.SaveTree(ctx, repo, &restic.Tree{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return restic.ID{}, err
|
return restic.ID{}, err
|
||||||
|
Loading…
Reference in New Issue
Block a user