New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using --stdin always reports 0B #2136
Comments
Oh, interesting, thanks for the report. Although your command line is slightly wrong, I suspect you meant |
Oops, I edited the command, indeed meant restic backup |
When restic reads the backup from stdin, the number of bytes processed was always displayed as zero. The reason is that the UI for the archive uses the total bytes as returned by the scanner, which is zero for stdin. So instead we keep track of the real number of bytes processed and print that at the end. Closes #2136
This was interesting. When restic saves a bunch of files, it first stats all of them and computes the sum of the file sizes to get the number of bytes that need to be processed. At the end of the run, that number is printed. For backups read from stdin, restic does not know how many bytes will be read, so it just uses zero. That's what's printed at the end. #2138 will keep track of the number of bytes processed and print that at the end instead. |
Output of
restic version
restic 0.9.3 compiled with go1.11.1 on linux/amd64
How did you run restic exactly?
echo "test" | restic backup --stdin
What backend/server/service did you use to store the repository?
Azure
Expected behavior
Restic log shows "processed 1 file, 5 B in 0:00"
Actual behavior
Restic log shows "processed 1 file, 0 B in 0:00"
Do you have any idea what may have caused this?
The "filesize" seems to never be stored if the file is from stdin
Do you have an idea how to solve the issue?
Internally store processed filesize for stdin
The text was updated successfully, but these errors were encountered: