Puzzled by: Warning: failed to read all source data during backup

Hi all,

I’m on a Dell Precision laptop with 1TB of storage. 750GB is devoted to Fedora 33 Linux; of that, about 251GB has been used, according to df -h. The machine is less than a year old.

I have been using Restic to back up my /home/jazcap53 directory with the commands:
$ source restic_setup.sh
$ cd
$ cd …
$ restic backup jazcap53

The output of $ restic version is:
restic 0.12.0 compiled with go1.15.8 on linux/amd64.

I have run Restic, as described above, about 10 times so far with no warnings or errors issued. When I ran Restic last week, I saw 3 input/output errors. Today when I ran Restic, it displayed 9 input/output errors, and the message Warning: failed to read all source data during backup.

My question is: did Restic run to completion, backing up all the data that it was able to read, or did it “give up” at some point and stop reading?

Here is the complete output of the last Restic run:

[jazcap53@localhost home]$ restic backup jazcap53
repository 06f29c2d opened successfully, password is correct
using parent snapshot 3e57191c
error: read jazcap53/.cache/JetBrains/PyCharm2020.3/cythonExtensions/_pydevd_frame_eval_ext/pydevd_frame_evaluator_common.cpython-39-x86_64-linux-gnu.so: input/output errorhe/JetBrains/PyCharm2020.3/caches/records.dat
error: read jazcap53/.config/google-chrome/Default/IndexedDB/chrome-extension_mlomiejdfkolichcflejclcbmpeaniij_0.indexeddb.leveldb/275922.log: input/output errorzcap53/.config/google-chrome/Default/IndexedDB/chrome-extension_mlomiejdfkolichcflejclcbmpeaniij_0.indexeddb.leveldb/276125.ldb
error: read jazcap53/.config/google-chrome/Default/Service Worker/CacheStorage/3fa2ccf0f40cde759094de56e5263f3bc6d88125/030f89f5-229d-4a56-b07b-3b706a52d1bd/b88ccf527bc976d9_1: input/output errorlt/Service Worker/CacheStorage/3fa2ccf0f40cde759094de56e5263f3bc6d88125/030f89f5-229d-4a56-b07b-3b706a52d1bd/c2b962c8b6
error: read jazcap53/.config/google-chrome/Default/Service Worker/CacheStorage/4c237d5e33167c88df3e45d9c8b59fdd4d727472/00b21ab6-f8b2-4fb3-b521-d678dacf718b/4776feedbd42c7d2_0: input/output errorlt/Service Worker/CacheStorage/4c237d5e33167c88df3e45d9c8b59fdd4d727472/00b21ab6-f8b2-4fb3-b521-d678dacf718b/ff0d6f5c2d
error: read jazcap53/.config/google-chrome/Default/Service Worker/CacheStorage/b60f4353710adea4cf7d6c435a4b6e68888a48a6/8044c6ed-9295-4142-87bf-72b5ea8ea557/a78835919bc52105_0: input/output errorlt/Service Worker/CacheStorage/b60f4353710adea4cf7d6c435a4b6e68888a48a6/8044c6ed-9295-4142-87bf-72b5ea8ea557/fa0e982493
error: read jazcap53/.local/share/gnome-boxes/images/centos-strea: input/output error
error: read jazcap53/.virtualenvs/fastapi_tut/lib/python3.9/site-packages/pip/_vendor/html5lib/constants.py: input/output error
error: read jazcap53/.virtualenvs/py_concur_hamel/lib/python3.9/site-packages/pkg_resources/_vendor/pyparsing.py: input/output error
error: read jazcap53/.virtualenvs/pybites_book/lib/python3.9/site-packages/pygments/lexers/lisp.py: input/output error

Files:       104868 new, 13087 changed, 1897240 unmodified
Dirs:        12117 new,  3409 changed, 203203 unmodified
Added to the repo: 4.113 GiB

processed 2015195 files, 202.462 GiB in 43:54
snapshot a32b92d4 saved
Warning: failed to read all source data during backup

My next step, of course, will be to try a restore from my backups to a different destination.

Thank you very much in advance for any replies.

Snapshot is saved, so restic seems to successfully get the data it can. It’s just warning you that it failed to read some files in the process.
You can validate the repo integrity via restic check command. These files seem to be transient files (e.g. caches) so they might simply be removed or modified before/while restic reaches them, considering this is a running system. But of course you can check your disk’s health if you want to be extra sure.

The error message is confusing, IMO. It could mean either:

  • None of the source data could be read.
  • Some of the source data could not be read – possibly all, but not necessarily.

It means the latter.

@fd0, it might be a good idea to change the warning to something like “at least one source file could not be read” to make this more clear. The current wording is too ambiguous and may cause undue alarm.

I agree. Anybody up for a PR?