prune: Warn if no cache is present

This commit is contained in:
Alexander Neumann 2020-11-08 20:15:58 +01:00
parent 823d0afd6e
commit a8d21b5dcf
1 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,10 @@ func runPruneWithRepo(opts PruneOptions, gopts GlobalOptions, repo *repository.R
// we do not need index updates while pruning!
repo.DisableAutoIndexUpdate()
if repo.Cache == nil {
Print("warning: running prune without a cache, this may be very slow!\n")
}
Verbosef("loading all snapshots...\n")
snapshots, err := restic.LoadAllSnapshots(gopts.ctx, repo, ignoreSnapshots)
if err != nil {