How to fix DOWNLOAD_CORRUPTED error?

I am doing daily backups to Google Cloud (Drive).
Yesterday, the following error started happening, preventing my backup from completing:

Command: /usr/local/bin/duplicacy -log backup -stats -threads 2
2019-10-23 09:01:02.816 INFO STORAGE_SET Storage set to gcd://duplicacy-backups
2019-10-23 09:02:34.644 WARN DOWNLOAD_CACHE_CORRUPTED The chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac load from the snapshot cache has a hash id of 5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca
2019-10-23 09:02:36.436 WARN DOWNLOAD_RETRY The chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac has a hash id of 5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca; retrying
2019-10-23 09:02:37.318 WARN DOWNLOAD_RETRY The chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac has a hash id of 5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca; retrying
2019-10-23 09:02:38.557 WARN DOWNLOAD_RETRY The chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac has a hash id of 5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca; retrying
2019-10-23 09:02:39.969 FATAL DOWNLOAD_CORRUPTED The chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac has a hash id of 5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca

Can I just remove the mentioned chunk manually from Google Drive, and try again?

Since the error sais the download cache is corrupted, can you try and delete that folder? it should be found inside the .duplicacy/ folder, in your repository.

I tried to wipe the entire .duplicacy/cache folder, and my backup still fails with the exact same error.

I also tried looking for the chunks by ID on my Google Drive, and I don’t see them. I looked for one that was successfully downloaded:

12:06:38.126 DEBUG DOWNLOAD_FETCH Fetching chunk 66c9a20257f011cda1f41624ccc0bbfc8e22d2c98808404d9eeec7af4b4760fc
12:06:38.131 DEBUG CHUNK_CACHE Chunk 66c9a20257f011cda1f41624ccc0bbfc8e22d2c98808404d9eeec7af4b4760fc has been loaded from the snapshot cache

And if I search on Google Drive for 66c9a20257f011cda1f41624ccc0bbfc8e22d2c98808404d9eeec7af4b4760fc, I can’t find it… Does maybe encryption somehow change the chunk ID reported versus stored…?

I can’t find the chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac/5afc0f90a57c0b2e20a4db9aadd686e9cca9e6d6c8149bff3b4e2324386c2eca either, on Google Drive…

No, the displayed chunk ID is the file name, even with encryption. This is intentional, for convenience…

But, the chunk 66c9a2... will be saved in the directory named 66 with the file named c9a2..., unless you’re running a very old version of Duplicacy.

You can fix it by removing the corrupted chunk, but I wonder how the corruption happened. It looks like it happened before the chunk was encrypted, because otherwise you would get a decryption error.

1 Like

Thanks for the naming convention details.

I tried deleting the chunk, but that failed:

2019-10-24 14:47:05.666 FATAL DOWNLOAD_CHUNK Chunk 89a3eab2360d6240a1b6175a7c0a8ba617ce901f675b73954b5367582d7759ac can't be found

I was able to make it work by simply removing the latest snapshot file from the snapshots/ folder; looks like the chunk mentioned is only used in that snapshot, so I was able to start a new backup from the previous snapshot.

For snapshot chunks, there is an additional check to make sure the chunk id is correct before

So the corruption must happen before the encryption.

1 Like