forked from TrueCloudLab/restic
prune: Warn if no cache is present
This commit is contained in:
parent
823d0afd6e
commit
a8d21b5dcf
1 changed files with 4 additions and 0 deletions
|
@ -156,6 +156,10 @@ func runPruneWithRepo(opts PruneOptions, gopts GlobalOptions, repo *repository.R
|
||||||
// we do not need index updates while pruning!
|
// we do not need index updates while pruning!
|
||||||
repo.DisableAutoIndexUpdate()
|
repo.DisableAutoIndexUpdate()
|
||||||
|
|
||||||
|
if repo.Cache == nil {
|
||||||
|
Print("warning: running prune without a cache, this may be very slow!\n")
|
||||||
|
}
|
||||||
|
|
||||||
Verbosef("loading all snapshots...\n")
|
Verbosef("loading all snapshots...\n")
|
||||||
snapshots, err := restic.LoadAllSnapshots(gopts.ctx, repo, ignoreSnapshots)
|
snapshots, err := restic.LoadAllSnapshots(gopts.ctx, repo, ignoreSnapshots)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue