mirror of
https://github.com/octoleo/restic.git
synced 2024-12-27 12:42:49 +00:00
prune: Warn if no cache is present
This commit is contained in:
parent
823d0afd6e
commit
a8d21b5dcf
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user