forked from TrueCloudLab/restic
rebuild-index: report added/removed/reindexed files
This should help with investigating missing pack files.
This commit is contained in:
parent
b71c52797a
commit
ff95999246
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,11 @@ func rebuildIndex(opts RebuildIndexOptions, gopts GlobalOptions, repo *repositor
|
||||||
packSizeFromList[id] = packSize
|
packSizeFromList[id] = packSize
|
||||||
removePacks.Insert(id)
|
removePacks.Insert(id)
|
||||||
}
|
}
|
||||||
|
if !ok {
|
||||||
|
Warnf("adding pack file to index %v\n", id)
|
||||||
|
} else if size != packSize {
|
||||||
|
Warnf("reindexing pack file %v with unexpected size %v instead of %v\n", id, packSize, size)
|
||||||
|
}
|
||||||
delete(packSizeFromIndex, id)
|
delete(packSizeFromIndex, id)
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
@ -98,6 +103,7 @@ func rebuildIndex(opts RebuildIndexOptions, gopts GlobalOptions, repo *repositor
|
||||||
// forget pack files that are referenced in the index but do not exist
|
// forget pack files that are referenced in the index but do not exist
|
||||||
// when rebuilding the index
|
// when rebuilding the index
|
||||||
removePacks.Insert(id)
|
removePacks.Insert(id)
|
||||||
|
Warnf("removing not found pack file %v\n", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(packSizeFromList) > 0 {
|
if len(packSizeFromList) > 0 {
|
||||||
|
|
Loading…
Reference in a new issue