Corrupted chunks while restoring from OneDrive

Hi!

Unfortunately my storage server was hit by a ransomware attack. So now I need to restore about 1 TB from OneDrive.

I’m running the Web-UI on Windows 10 and unfortunately while doing the restore I get the following error message:

The restore command encountered an error:
The chunk fea12aee65560cc67402c222dbb539c125ebfaf22cf8cf4800628f9ec6163bd3 has a hash id of 4ae56f3b5368944357b9c06aac38ebca94b1ec34d1ff613c2bfb2925dcb63126

Exit code: 100

And the following log

2021-08-09 14:57:12.098 INFO REPOSITORY_SET Repository set to D:\Restored OneDrive LiU
2021-08-09 14:57:12.098 INFO STORAGE_SET Storage set to odb://duplicacy
2021-08-09 14:57:13.038 INFO SNAPSHOT_FILTER Loaded 1 include/exclude pattern(s)
2021-08-09 14:57:14.028 INFO RESTORE_INPLACE Forcing in-place mode with a non-default preference path
2021-08-09 14:57:15.101 INFO SNAPSHOT_FILTER Parsing filter file \\?\C:\Users\Petter\.duplicacy-web\repositories\localhost\restore\.duplicacy\filters
2021-08-09 14:57:15.101 INFO SNAPSHOT_FILTER Loaded 0 include/exclude pattern(s)
2021-08-09 14:57:15.224 INFO RESTORE_START Restoring D:\Restored OneDrive LiU to revision 8
2021-08-09 14:57:17.555 INFO DOWNLOAD_PROGRESS Downloaded chunk 7 size 2938919, 1.40MB/s 5 days 07:22:34 0.0%
2021-08-09 14:57:17.950 INFO DOWNLOAD_PROGRESS Downloaded chunk 8 size 4762956, 3.67MB/s 2 days 00:36:16 0.0%
2021-08-09 14:57:18.698 INFO DOWNLOAD_PROGRESS Downloaded chunk 1 size 8059676, 5.01MB/s 1 day 11:37:32 0.0%
2021-08-09 14:57:20.061 INFO DOWNLOAD_PROGRESS Downloaded chunk 9 size 1745331, 3.34MB/s 2 days 05:27:19 0.0%
2021-08-09 14:57:20.105 WARN DOWNLOAD_RETRY The chunk 926e7889e2c69a99bdcf091b77a39252dee1de0e463c5be6e40f23fd5d92e605 has a hash id of 184777d3f79d2d58941bf5726b9db5c67aafb65ac6c9eb8736f63b0cab9eb8fd; retrying
2021-08-09 14:57:22.455 WARN DOWNLOAD_RETRY The chunk 926e7889e2c69a99bdcf091b77a39252dee1de0e463c5be6e40f23fd5d92e605 has a hash id of 184777d3f79d2d58941bf5726b9db5c67aafb65ac6c9eb8736f63b0cab9eb8fd; retrying
2021-08-09 14:57:24.557 WARN DOWNLOAD_RETRY The chunk 926e7889e2c69a99bdcf091b77a39252dee1de0e463c5be6e40f23fd5d92e605 has a hash id of 184777d3f79d2d58941bf5726b9db5c67aafb65ac6c9eb8736f63b0cab9eb8fd; retrying
2021-08-09 14:57:26.795 ERROR DOWNLOAD_CORRUPTED The chunk 926e7889e2c69a99bdcf091b77a39252dee1de0e463c5be6e40f23fd5d92e605 has a hash id of 184777d3f79d2d58941bf5726b9db5c67aafb65ac6c9eb8736f63b0cab9eb8fd

I’m not sure what is causing this but I guess the lesson is that I should have run the -chunks option to verify my backup. I do have my backup on a another storage and not in an archive so I will get my files back, but I want to understand and trust Duplicacy.

Is there a way to skip the files that are related to the corrupted chunks and restore the rest, and also see what files that did not get restored? Perhaps using -persist and -stats would do this?

Best regards
engstrom

Looks like either intermittent OneDrive failure, OneDrive bug, (b2 had similar bug recently where they were returning bad data via api, even though data in storage was ok) or chunks were uploaded corrupted due to your local storage malfunction during backup.

I would use OneDrive client to sync or mount your repo locally (or rclone mount it) and then restore with duplicacy from this locally mounted target.

Depending on the nature of the failure this may work.

Thanks for the idea. I synced the entire storage with the OneDrive app but unfortunately I get the same error.

Running check command from C:\Users\Administrator/.duplicacy-web/repositories/localhost/all
Options: [-log check -storage LiU -chunks -a -tabular]
2021-08-26 11:28:01.661 INFO STORAGE_SET Storage set to D:/OneDrive - Linköpings universitet/duplicacy
2021-08-26 11:28:01.667 INFO SNAPSHOT_CHECK Listing all chunks
2021-08-26 11:28:06.680 INFO SNAPSHOT_CHECK 3 snapshots and 224 revisions
2021-08-26 11:28:06.695 INFO SNAPSHOT_CHECK Total chunk size is 1191G in 248907 chunks
2021-08-26 11:28:07.174 INFO SNAPSHOT_CHECK All chunks referenced by snapshot Pictures-OneDrive-LiU at revision 1 exist
2021-08-26 11:28:07.568 INFO SNAPSHOT_CHECK All chunks referenced by snapshot Pictures-OneDrive-LiU at revision 2 exist

/../

2021-08-26 11:29:29.972 INFO SNAPSHOT_CHECK All chunks referenced by snapshot scanned-NUC-OneDrive-LiU at revision 8 exist
2021-08-26 11:31:56.468 INFO SNAPSHOT_CHECK 
                  snap | rev |                          | files |    bytes | chunks |    bytes |  uniq |    bytes |   new |    bytes |
 Pictures-OneDrive-LiU |   1 | @ 2021-01-27 13:39 -hash | 24171 | 163,548M |  32647 | 155,209M |     3 |   4,659K | 32647 | 155,209M |
 Pictures-OneDrive-LiU |   2 | @ 2021-01-27 22:15       | 24171 | 163,548M |  32648 | 155,209M |     0 |        0 |     4 |   4,729K |
 /../
 Pictures-OneDrive-LiU | 108 | @ 2021-08-22 17:02       | 29547 | 198,804M |  40461 | 193,313M |     0 |        0 |     0 |        0 |
 Pictures-OneDrive-LiU | 109 | @ 2021-08-23 16:30       | 29547 | 198,804M |  40461 | 193,313M |     0 |        0 |     0 |        0 |
 Pictures-OneDrive-LiU | all |                          |       |          |  41964 | 199,138M | 41929 | 198,990M |       |          |

                snap | rev |                          | files |   bytes | chunks |   bytes |  uniq |   bytes |  new |    bytes |
 Videos-OneDrive-LiU |   1 | @ 2021-01-24 13:25 -hash |   125 | 35,740M |   7352 | 35,772M |     0 |       0 | 7352 |  35,772M |
 Videos-OneDrive-LiU |   2 | @ 2021-01-25 17:07       |   125 | 35,740M |   7352 | 35,772M |     0 |       0 |    0 |        0 |
 /../
 Videos-OneDrive-LiU | 106 | @ 2021-08-22 17:02       |   334 | 80,210M |  16409 | 80,241M |     0 |       0 |    0 |        0 |
 Videos-OneDrive-LiU | 107 | @ 2021-08-23 16:30       |   334 | 80,210M |  16409 | 80,241M |     0 |       0 |    0 |        0 |
 Videos-OneDrive-LiU | all |                          |       |         |  16433 | 80,247M | 16399 | 80,100M |      |          |

                     snap | rev |                          | files |    bytes | chunks |    bytes |   uniq |    bytes |    new |    bytes |
 scanned-NUC-OneDrive-LiU |   1 | @ 2021-02-08 16:13 -hash |  5931 | 941,521M | 190272 | 939,364M |      0 |        0 | 190272 | 939,364M |
 /../
 scanned-NUC-OneDrive-LiU |   8 | @ 2021-02-24 00:00       |  5931 | 941,521M | 190272 | 939,364M |      0 |        0 |      0 |        0 |
 scanned-NUC-OneDrive-LiU | all |                          |       |          | 190272 | 939,364M | 190271 | 939,364M |        |          |

2021-08-26 11:31:56.474 INFO SNAPSHOT_VERIFY Verifying 248634 chunks
2021-08-26 11:31:56.742 INFO VERIFY_PROGRESS Verified chunk c01897495c86aaa8a17aa4293af65f692f55d73c27173dd24da9dfb98610a0dc (1/248634), 23.59MB/s 18:18:08 0.0%
2021-08-26 11:31:57.091 INFO VERIFY_PROGRESS Verified chunk 2d80bf7380abee3a0fa0772fe3f3a36d32a1a832e56d5f0874b392aae7a5b38f (2/248634), 31.42MB/s 21:18:23 0.0%
2021-08-26 11:31:57.272 INFO VERIFY_PROGRESS Verified chunk b07d3cf9428d19586a188b8e82ca3c9b184273cb7632f1d1ef7e4d0647a7ddc7 (3/248634), 33.17MB/s 18:22:15 0.0%
2021-08-26 11:31:57.359 INFO VERIFY_PROGRESS Verified chunk 5f6f9307062dcf4cd2957713fe868be6b49e63112841e4985a4f4a871ed0bc8e (4/248634), 32.32MB/s 15:16:49 0.0%
/../
2021-08-26 11:43:29.798 INFO VERIFY_PROGRESS Verified chunk b8948db07c7b9d6257e3b1d0a6ba6e0789c0557d11818223b4e3e80ccd04a597 (4810/248634), 34.88MB/s 09:45:44 1.9%
2021-08-26 11:43:30.107 INFO VERIFY_PROGRESS Verified chunk 906393504032365b38e7f5e21d07d6014211a902c9aa25039cfbaf54e6a021af (4811/248634), 34.88MB/s 09:45:52 1.9%
2021-08-26 11:43:30.172 INFO VERIFY_PROGRESS Verified chunk aefe733d383184da34180d4765b91907efd60adf5e7644c986c8fdf4df9df5dd (4812/248634), 34.88MB/s 09:45:48 1.9%
2021-08-26 11:43:30.267 INFO VERIFY_PROGRESS Verified chunk 602c1edf110c9bc1bd37e310c730a888af0eff7774f274957b7c9194a022da83 (4813/248634), 34.87MB/s 09:45:46 1.9%
2021-08-26 11:43:30.615 WARN DOWNLOAD_RETRY The chunk 6fa9ee30c6c3ec46dfe99200e48b8134548bd9dfb88ab2b4c2fc28e3882cbac2 has a hash id of 587a05ffc7a0528c11f2558dd58a6b0730511811a6c3e379add485058dae0c26; retrying
2021-08-26 11:43:30.841 WARN DOWNLOAD_RETRY The chunk 6fa9ee30c6c3ec46dfe99200e48b8134548bd9dfb88ab2b4c2fc28e3882cbac2 has a hash id of 587a05ffc7a0528c11f2558dd58a6b0730511811a6c3e379add485058dae0c26; retrying
2021-08-26 11:43:31.063 WARN DOWNLOAD_RETRY The chunk 6fa9ee30c6c3ec46dfe99200e48b8134548bd9dfb88ab2b4c2fc28e3882cbac2 has a hash id of 587a05ffc7a0528c11f2558dd58a6b0730511811a6c3e379add485058dae0c26; retrying
2021-08-26 11:43:31.285 ERROR DOWNLOAD_CORRUPTED The chunk 6fa9ee30c6c3ec46dfe99200e48b8134548bd9dfb88ab2b4c2fc28e3882cbac2 has a hash id of 587a05ffc7a0528c11f2558dd58a6b0730511811a6c3e379add485058dae0c26
2021-08-26 11:43:31.317 INFO SNAPSHOT_VERIFY Added 4813 chunks to the list of verified chunks
The chunk 6fa9ee30c6c3ec46dfe99200e48b8134548bd9dfb88ab2b4c2fc28e3882cbac2 has a hash id of 587a05ffc7a0528c11f2558dd58a6b0730511811a6c3e379add485058dae0c26

As I asked before, is there a way to restore the files that are not affected by the corrupted chunks?

Looks like the file got corrupted before it was uploaded to OneDrive. That’s unfortunate

Sure, add -persist argument to restore. it will fail to restore some files but should continue to the next ones.