mirror of
https://github.com/restic/restic.git
synced 2024-12-25 09:18:55 +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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !gopts.JSON && parentSnapshotID != nil {
|
if !gopts.JSON {
|
||||||
p.V("using parent snapshot %v\n", parentSnapshotID.Str())
|
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 {
|
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!
|
// 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…
Reference in a new issue