From b5976474dd71a0961397d90d11100127a2f95150 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 27 Oct 2015 22:34:30 +0100 Subject: [PATCH] backup: add debug output for excluded files/dirs --- cmd/restic/cmd_backup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index d169beb2b..63a652cbf 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -10,6 +10,7 @@ import ( "github.com/restic/restic" "github.com/restic/restic/backend" + "github.com/restic/restic/debug" "github.com/restic/restic/filter" "github.com/restic/restic/repository" "golang.org/x/crypto/ssh/terminal" @@ -300,6 +301,10 @@ func (cmd CmdBackup) Execute(args []string) error { cmd.global.Warnf("error for exclude pattern: %v", err) } + if matched { + debug.Log("backup.Execute", "path %q excluded by a filter", item) + } + return !matched }