From 823d0afd6e8232336ddca6cfecd3436f2ba224c7 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 8 Nov 2020 20:15:44 +0100 Subject: [PATCH 1/2] backup: Always print parent snapshot info --- cmd/restic/cmd_backup.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index da924d239..a0831b16e 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -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 { From a8d21b5dcfa73a87ad063a789a68d3d9ca305ae4 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 8 Nov 2020 20:15:58 +0100 Subject: [PATCH 2/2] prune: Warn if no cache is present --- cmd/restic/cmd_prune.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 49889f6eb..6c67e6ea9 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -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 {