Status line truncated / cut off?


When doing a restic backup, the status line (which shows the % complete, size, # of files, etc.) sometimes doesn’t show the whole line - the part of the ETA gets cut off.

My command window is plenty wide.

Is there an inherent limit to the length of the status line?


There isn’t. Which OS and terminal emulator do you use? restic tries to find out how wide the window currently is and cuts off the status line accordingly. Can you reproduce the issue?


I’ve seen some weird display bugs (with restic and rclone) when the command prompt window was resized. Can you try changing the default size of the command prompt and not resizing it after its creation?


I have more information. I am using this version of restic on my Windows 10 machine:

restic 0.9.3 (v0.9.3-62-gc8fc7236) compiled with go1.10.2 on windows/amd64

I do most of my work in the Cygwin command window, which is a Unix-like wrapper.

If I run the command in the stock Windows Command Prompt window, it works fine. If I run it in the Cygwin window (mintty) it is truncated.

The window is properly sized before I run the command - I am not resizing it while the restic command is running.

So it looks like Cygwin may be messing with restic's ability to determine the correct window size.


More information:
When I am running in the Cygwin window, I also never see the following messages:

repository b94e8466 opened successfully, password is correct
found 3 old cache directories in C:\Users\XXXX\AppData\Local\restic, pass --cleanup-cache to remove them

Looking at the restic source, both of those messages are conditioned by restic checking if the output is a TTY.

Apparently Cygwin is interfering with that check as well. Makes sense, since both the stdoutIsTerminal and stdoutTerminalWidth functions refer to the “” import.