1
0
Fork 0
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:
Alexander Neumann 2020-11-08 20:37:10 +01:00 committed by GitHub
commit 5731e391f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -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 {

View file

@ -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 {