mirror of
https://github.com/restic/restic.git
synced 2024-12-25 01:06:39 +00:00
Merge pull request #3075 from restic/warn-prune-no-cache
UI: Add several hints
This commit is contained in:
commit
5731e391f8
2 changed files with 10 additions and 2 deletions
|
@ -532,8 +532,12 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
|
|||
return err
|
||||
}
|
||||
|
||||
if !gopts.JSON && parentSnapshotID != nil {
|
||||
p.V("using parent snapshot %v\n", parentSnapshotID.Str())
|
||||
if !gopts.JSON {
|
||||
if parentSnapshotID != nil {
|
||||
p.P("using parent snapshot %v\n", parentSnapshotID.Str())
|
||||
} else {
|
||||
p.P("no parent snapshot found, will read all files\n")
|
||||
}
|
||||
}
|
||||
|
||||
selectByNameFilter := func(item string) bool {
|
||||
|
|
|
@ -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 a new issue