OneDrive is generally fine; this leaves two possibility:
- you have uploaded that problematic chunk when OneDrive had issues (documented here on the forum) with keeping partially uploaded file instead of deleting it. They fixed that eventually but it was a problem for some period of time. EC would not have helped here anyway.
- issues on your machine caused the chunk to get corrupted after it was created but before it was uploaded.
Btw was it OneDrive for business or personal?
That’s deduplication working. If the [parts of] file was unchanged — no reason to re-upload it, instead snapshot references existing chunk. That happens to be corrupted.
How was it supposed to know that the chunk file got corrupted? Duplicacy trusts storage. If storage says “yep, I got the file” - it assumes it indeed got the file.
Since you don’t pay for egress from OneDrive you can schedule to run check -chunks
after each backup. This will cause Duplicacy to download and check every chunk. It will check every chunk only once, but in case of flaky remotes like OneDrive that may be lying about data integrity or in cases when chunk got corrupted after it was created but before it was uploaded this is not a bad idea to do.
You should not base your data integrity policy based on warm and fuzzy feelings :). Trust but verify.
Backup that is not tested — is to be assumed broken.
Duplicacy provides some facilities to help in those scenarios, but ultimately using flaky storage is a culprit. The line shall be drawn somewhere on what to verify. Shall duplicacy trust ram? CPU? By default, Duplicacy assumes that storage does not damage nor lose files.
If that is a concern — you can run duplicacy check -a
. This downloads snapshots, and verifies that all chunks that snapshots reference are still present. This result in relatively small download, and for remotes with paid egress is cheap way to detect remote losing files or prune bugs.
If you add -chunks flag — it will also download and check integrity of chunk files. If you have to do this — something went very wrong and either your machine is faulty or remote.
If you add -files — it will also try to reconstruct all files.
Anyway, what shall you do now?
- Run filesystem checker and disk check to ensure your storage hardware is not dying.
- Run memtest86 several times to ensure ram on your machine is not faulty.
- Delete the bad chunk from the storage manually.
- Create a new snapshot ID and make one full backup with exact same settings and filters as your broken one. Vast majority of chunks will be already on the storage so no extra upload will occur. But this will allow the missing chunks to get re-created and re-uploaded, thus repairing your datastore.
- Delete the newly created snapshot ID, we don’t need it anymore.
- If you continue using OneDrive as a backup destination schedule
check -chunks
after every backup job or periodically.