Restic: Using --stdin always reports 0B

Created on 3 Jan 2019  路  3Comments  路  Source: restic/restic

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

need implementing bug

All 3 comments

Oh, interesting, thanks for the report. Although your command line is slightly wrong, I suspect you meant echo test | restic backup --stdin?

Oops, I edited the command, indeed meant restic backup

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mholt picture mholt  路  4Comments

cfbao picture cfbao  路  3Comments

viric picture viric  路  5Comments

christian-vent picture christian-vent  路  3Comments

ikarlo picture ikarlo  路  4Comments