From a8d21b5dcfa73a87ad063a789a68d3d9ca305ae4 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 8 Nov 2020 20:15:58 +0100 Subject: [PATCH] prune: Warn if no cache is present --- cmd/restic/cmd_prune.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 49889f6eb..6c67e6ea9 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -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 {