diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index 3f494a8cf..798d5609c 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -676,6 +676,8 @@ func runBackup(ctx context.Context, opts BackupOptions, gopts GlobalOptions, ter Hostname: opts.Host, ParentSnapshot: parentSnapshot, ProgramVersion: "restic " + version, + Command: command, + CommandStderr: stderr, } if !gopts.JSON { diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index 98819d797..ed1eb62bd 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -2,7 +2,9 @@ package archiver import ( "context" + "io" "os" + "os/exec" "path" "runtime" "sort" @@ -681,6 +683,8 @@ type SnapshotOptions struct { Time time.Time ParentSnapshot *restic.Snapshot ProgramVersion string + Command *exec.Cmd + CommandStderr io.ReadCloser } // loadParentTree loads a tree referenced by snapshot id. If id is null, nil is returned.