I have just been starting with Restic and I already have issues. My goal has been to backup ca. 5 TB from my personal machine to a Hetzner Storage Box. I tried this via SFTP with all the options for better resilience. Nevertheless, even having the best ISP that I can get at my place, I usually have one or two short network outages per day. This is often not noticeable with day-to-day usage, but it did often break the SFTP connection, which would have needed to run over 9 days for the initial backup (less on resumed backups).
I didn’t think this would be a problem, because Restic is supposed to be able to resume backups, with most of the already transferred data not needing to be transferred again.
Nevertheless, before the first snapshot was finished, I wanted to confirm that the repository is fine. So I decided to run restic check --read-data. Since this command needs to run without interruptions, and a few TB of data had already been transferred, I used an Rclone-over-WebDAV backend instead of SFTP. Surprisingly, it reported a damaged repository (without any details). Since I had forgotten to save its output to include in this question, I ran it again. Even more surprisingly, now it reported no errors at all.
I had read the docs, but I was still puzzled, so I tried to find answers using ChatGPT. But I suspect there were many hallucinations.
- It told me that while Restic itself could handle interrupted backups, this would require certain file system semantics which are not guaranteed by SFTP - in particular, atomic writes. Thus, if I want to make sure that backup interruptions will not corrupt a repository, I would need to switch to S3-compatible storage.
- It also was not consistent about using an Rclone back end or not. On one hand, it suggested it, because it would make the backup more resilient, but on the other hand, it warned that this could also mask errors that would lead to corruption.
- It also was not consistent about whether WebDAV has an edge over SFTP or not.
I have many questions about this - the most important ones being:
-
Is it true that interrupted backups are expected to sometimes corrupt the repository, unless the backup is a local filesystem or an S3-compatible back end?
-
For unstable connections, is Rclone (over SFTP or WebDAV) recommended or discouraged?
-
Why would
restic check --read-databe non-deterministic?
Windows 11
restic 0.18.1 compiled with go1.25.1 on windows/amd64