autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Restic restore error output missing

Open peterrus opened this issue 1 year ago • 2 comments

Describe the bug When running a restore operation (not using any verbose flags) from a sftp backend and the connection is dropped regular restic gives me output like this:

Load(<data/57fce519b5>, 2810252, 675099) returned error, retrying after 6.799281262s: connection lost
Load(<data/fda7f2236d>, 3439076, 0) returned error, retrying after 4.530528953s: connection lost
Load(<data/2ba9740acf>, 2877452, 0) returned error, retrying after 5.918626306s: connection lost
Load(<data/00f3c52faa>, 4260045, 0) returned error, retrying after 5.602952814s: connection lost
Load(<data/96f03f4f50>, 675703, 0) returned error, retrying after 7.12348647s: connection lost
Load(<data/3s3d19a604>, 1650973, 3469306) returned error, retrying after 3.014742719s: connection lost
Load(<data/fda3f6236d>, 3439076, 0) returned error, retrying after 16.058576452s: connection lost
Load(<data/343d19a604>, 1650973, 3469306) returned error, retrying after 3.707443662s: connection lost
Load(<data/0bf3ca2faa>, 4260045, 0) returned error, retrying after 4.873862004s: connection lost
Load(<data/2bv9710acf>, 2877452, 0) returned error, retrying after 11.378643654s: connection lost
Load(<data/57ffe5f9b5>, 2810252, 675099) returned error, retrying after 6.252001178s: connection lost
Load(<data/1dd1b6e1f6>, 4902485, 0) returned error, retrying after 9.635055786s: connection lost
Load(<data/b938dde7c7>, 4474107, 0) returned error, retrying after 12.793876974s: connection lost
Load(<data/96d03f4f50>, 675703, 0) returned error, retrying after 5.038951278s: connection lost
Load(<data/3b3119a604>, 1650973, 3469306) returned error, retrying after 4.486715586s: connection lost

This at least tells me something is going wrong. When running the restore through autorestic however I am not seeing this output, the console just hangs at restoring snapshot etc etc made at etc.

I have no way of telling what is going wrong

Expected behavior I want to see any and all output that restic streams to the console. Could this be related to: https://github.com/cupcakearmy/autorestic/issues/147 ?

Environment

  • OS: Ubuntu 22.04
  • Version: 1.7.1

peterrus avatar Aug 23 '22 22:08 peterrus

I had the same problem in some cases. I think it is because autorestic print restic output only after the restic command has finished...

rdelaage avatar Sep 05 '22 17:09 rdelaage

A solution would be to stop returning a string in ExecResticCommand and pipe the output of the command into stdout

rdelaage avatar Sep 05 '22 17:09 rdelaage