How can I tell which snapshot references a missing chunk?

Check tells me I’m missing a chunk after I performed an exhaustive Purge (no other backups were running). Now check won’t complete because of a fatal download error, chunk is missing.

I checked storage and it’s not there.

How do I know which snapshots referenced that chunk so I can delete them? They’re binary files, but I don’t see the chunk hashes referenced in them in any obvious way.

The check -all should tell you which snapshots are missing chunks, unless perhaps it’s a metadata chunk? You might also want to run a check with the -fossils switch.

BTW, if you have the chunk ID, the filename will be the hash from the third digit onwards and will be stored in a subfolder under chunks/ with the name as first two digits. e.g. 2b001c2a24599d7603d3b7b2a197fc5657e6ccb8685b50e9314eefb5b3161281 will be a file named 001c2a24599d7603d3b7b2a197fc5657e6ccb8685b50e9314eefb5b3161281 inside chunk/2b/.

1 Like

I can’t tell from check -a -d.
Here’s some snippets from the resulting log. You can see the missing chunk at the bottom, but I can’t tell which snapshot this would be part of.

Check storage gdrive, status: Missing Chunks, log file: check-20200220-065906.log
---------------------------------------------------------------------------------
Running check command from /cache/localhost/all
Options: [-log -debug check -storage gdrive -a -tabular]
2020-02-20 06:59:06.515 INFO STORAGE_SET Storage set to gcd://backup
2020-02-20 06:59:06.532 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_GDRIVE_GCD_TOKEN
2020-02-20 06:59:08.680 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_GDRIVE_GCD_TOKEN
2020-02-20 06:59:08.680 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_GDRIVE_PASSWORD
2020-02-20 06:59:09.886 TRACE CONFIG_ITERATIONS Using 16384 iterations for key derivation
2020-02-20 06:59:10.191 DEBUG STORAGE_NESTING Chunk read levels: [1], write level: 1
2020-02-20 06:59:10.241 INFO CONFIG_INFO Compression level: 100
2020-02-20 06:59:10.241 INFO CONFIG_INFO Average chunk size: 4194304
2020-02-20 06:59:10.241 INFO CONFIG_INFO Maximum chunk size: 16777216
2020-02-20 06:59:10.241 INFO CONFIG_INFO Minimum chunk size: 1048576
2020-02-20 06:59:10.241 INFO CONFIG_INFO Chunk seed: 8129c65a3bbf686f629d7fe024a44d1a9e0df806f10a96d388712937ad140d3b
2020-02-20 06:59:10.241 TRACE CONFIG_INFO Hash key: ccd2e6aa278963e4556f6436b91e3c1d7f5d7b6aa3d619f6bf086c500fb54364
2020-02-20 06:59:10.241 TRACE CONFIG_INFO ID key: ebc1921b2fdfba400c6d42839770cb44ac8ad45396e72d5ff40ee5f2a33d1499
2020-02-20 06:59:10.241 TRACE CONFIG_INFO File chunks are encrypted
2020-02-20 06:59:10.241 TRACE CONFIG_INFO Metadata chunks are encrypted
2020-02-20 06:59:10.241 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_GDRIVE_PASSWORD
2020-02-20 06:59:10.242 DEBUG LIST_PARAMETERS id: , revisions: [], tag: , showStatistics: false, showTabular: true, checkFiles: false, searchFossils: false, resurrect: false
2020-02-20 06:59:10.242 INFO SNAPSHOT_CHECK Listing all chunks
2020-02-20 06:59:10.242 TRACE LIST_FILES Listing chunks/
2020-02-20 14:12:13.594 TRACE SNAPSHOT_LIST_IDS Listing all snapshot ids
2020-02-20 14:12:13.876 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot bt
2020-02-20 14:12:14.608 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/40 from the snapshot cache
2020-02-20 14:12:14.889 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/45 from the snapshot cache
2020-02-20 14:12:15.248 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/67 from the snapshot cache
2020-02-20 14:12:15.499 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/75 from the snapshot cache
2020-02-20 14:12:15.715 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/77 from the snapshot cache
2020-02-20 14:12:15.974 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/78 from the snapshot cache
2020-02-20 14:12:16.177 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/80 from the snapshot cache
2020-02-20 14:12:16.446 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/82 from the snapshot cache
2020-02-20 14:12:16.677 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/83 from the snapshot cache
2020-02-20 14:12:17.131 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/84 from the snapshot cache
2020-02-20 14:12:17.399 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/85 from the snapshot cache
2020-02-20 14:12:17.653 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/86 from the snapshot cache
2020-02-20 14:12:17.954 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/87 from the snapshot cache
2020-02-20 14:12:18.223 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/88 from the snapshot cache
2020-02-20 14:12:18.474 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/bt/89 from the snapshot cache
2020-02-20 14:12:18.474 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot data_and_docs
2020-02-20 14:12:19.225 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/51 from the snapshot cache
2020-02-20 14:12:19.505 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/58 from the snapshot cache
2020-02-20 14:12:19.708 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/82 from the snapshot cache
2020-02-20 14:12:19.941 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/90 from the snapshot cache
2020-02-20 14:12:20.668 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/92 from the snapshot cache
2020-02-20 14:12:21.010 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/93 from the snapshot cache
2020-02-20 14:12:21.240 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/96 from the snapshot cache
2020-02-20 14:12:21.505 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/100 from the snapshot cache
2020-02-20 14:12:21.883 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/101 from the snapshot cache
2020-02-20 14:12:22.174 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/102 from the snapshot cache
2020-02-20 14:12:22.514 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/103 from the snapshot cache
2020-02-20 14:12:22.799 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/104 from the snapshot cache
2020-02-20 14:12:22.988 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/105 from the snapshot cache
2020-02-20 14:12:23.195 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/106 from the snapshot cache
2020-02-20 14:12:23.445 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/107 from the snapshot cache
2020-02-20 14:12:23.659 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/108 from the snapshot cache
2020-02-20 14:12:23.860 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/109 from the snapshot cache
2020-02-20 14:12:24.089 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/data_and_docs/110 from the snapshot cache
2020-02-20 14:12:24.089 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot backups
2020-02-20 14:12:24.781 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/52 from the snapshot cache
2020-02-20 14:12:25.044 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/60 from the snapshot cache
2020-02-20 14:12:25.469 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/84 from the snapshot cache
2020-02-20 14:12:25.874 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/93 from the snapshot cache
2020-02-20 14:12:26.191 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/95 from the snapshot cache
2020-02-20 14:12:26.460 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/96 from the snapshot cache
2020-02-20 14:12:26.743 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/99 from the snapshot cache
2020-02-20 14:12:26.926 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/103 from the snapshot cache
2020-02-20 14:12:27.174 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/104 from the snapshot cache
2020-02-20 14:12:27.373 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/105 from the snapshot cache
2020-02-20 14:12:27.645 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/106 from the snapshot cache
2020-02-20 14:12:27.879 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/107 from the snapshot cache
2020-02-20 14:12:28.140 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/108 from the snapshot cache
2020-02-20 14:12:28.506 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/109 from the snapshot cache
2020-02-20 14:12:28.712 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/110 from the snapshot cache
2020-02-20 14:12:28.970 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/111 from the snapshot cache
2020-02-20 14:12:29.168 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/112 from the snapshot cache
2020-02-20 14:12:29.375 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/backups/113 from the snapshot cache
2020-02-20 14:12:29.375 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot archive
2020-02-20 14:12:30.011 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/63 from the snapshot cache
2020-02-20 14:12:30.275 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/69 from the snapshot cache
2020-02-20 14:12:30.480 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/93 from the snapshot cache
2020-02-20 14:12:30.716 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/102 from the snapshot cache
2020-02-20 14:12:30.965 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/104 from the snapshot cache
2020-02-20 14:12:31.257 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/105 from the snapshot cache
2020-02-20 14:12:31.481 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/108 from the snapshot cache
2020-02-20 14:12:31.672 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/112 from the snapshot cache
2020-02-20 14:12:31.877 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/113 from the snapshot cache
2020-02-20 14:12:32.089 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/114 from the snapshot cache
2020-02-20 14:12:32.279 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/115 from the snapshot cache
2020-02-20 14:12:32.513 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/116 from the snapshot cache
2020-02-20 14:12:32.752 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/117 from the snapshot cache
2020-02-20 14:12:33.034 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/118 from the snapshot cache
2020-02-20 14:12:33.286 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/119 from the snapshot cache
2020-02-20 14:12:33.604 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/120 from the snapshot cache
2020-02-20 14:12:33.827 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/121 from the snapshot cache
2020-02-20 14:12:34.138 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/122 from the snapshot cache
2020-02-20 14:12:34.553 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/archive/123 from the snapshot cache
2020-02-20 14:12:34.553 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot working
2020-02-20 14:12:34.824 TRACE SNAPSHOT_LIST_REVISIONS Listing revisions for snapshot videos
2020-02-20 14:12:35.407 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/30 from the snapshot cache
2020-02-20 14:12:35.698 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/36 from the snapshot cache
2020-02-20 14:12:36.090 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/59 from the snapshot cache
2020-02-20 14:12:36.325 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/62 from the snapshot cache
2020-02-20 14:12:36.545 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/63 from the snapshot cache
2020-02-20 14:12:36.814 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/64 from the snapshot cache
2020-02-20 14:12:37.028 DEBUG DOWNLOAD_FILE_CACHE Loaded file snapshots/videos/66 from the snapshot cache
2020-02-20 14:12:37.028 INFO SNAPSHOT_CHECK 6 snapshots and 77 revisions
2020-02-20 14:12:37.146 INFO SNAPSHOT_CHECK Total chunk size is 15910G in 3314553 chunks
2020-02-20 14:12:38.229 DEBUG CHUNK_CACHE Chunk 5fbeaa3bf6a4c85291df26e7546d3b762bc46b2f33d1e03b4dd95cfcfa9ead33 has been loaded from the snapshot cache
2020-02-20 14:12:38.232 DEBUG DOWNLOAD_FETCH Fetching chunk 141ecb7bc2e9305c39af7533708fe0aff721329bd65d42bcd177441c9dddc370
<snip>
2020-02-20 14:12:54.762 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 30 exist
2020-02-20 14:12:54.763 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:12:54.975 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:13:12.438 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 36 exist
2020-02-20 14:13:12.438 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:13:12.476 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:13:29.299 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 59 exist
2020-02-20 14:13:29.299 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:13:29.317 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:13:48.930 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 62 exist
2020-02-20 14:13:48.930 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:13:48.947 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:14:04.911 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 63 exist
2020-02-20 14:14:04.912 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:14:04.929 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:14:21.778 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 64 exist
2020-02-20 14:14:21.778 DEBUG DOWNLOAD_FETCH Fetching chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140
2020-02-20 14:14:21.795 DEBUG CHUNK_CACHE Chunk b41edb0b0ece2e05f9b28f840af1e5b0014598e171a6afb302baacf14b4c6140 has been loaded from the snapshot cache
<snip>
2020-02-20 14:14:37.903 INFO SNAPSHOT_CHECK All chunks referenced by snapshot videos at revision 66 exist
2020-02-20 14:14:37.903 DEBUG DOWNLOAD_FETCH Fetching chunk c546b8d6364e813879f3228d77884a4bfa3e3f0f0f162891d3f4f9f10518d297
2020-02-20 14:14:37.982 DEBUG CHUNK_CACHE Chunk c546b8d6364e813879f3228d77884a4bfa3e3f0f0f162891d3f4f9f10518d297 has been loaded from the snapshot cache
<snip>
2020-02-20 14:14:38.695 DEBUG DOWNLOAD_FETCH Fetching chunk 5ccaa9b3081d3e5bc7a5ad68c0801bcdb4df585c4e5048333ee62f48ee8a970d
2020-02-20 14:14:39.564 FATAL DOWNLOAD_CHUNK Chunk 5ccaa9b3081d3e5bc7a5ad68c0801bcdb4df585c4e5048333ee62f48ee8a970d can't be found
Chunk 5ccaa9b3081d3e5bc7a5ad68c0801bcdb4df585c4e5048333ee62f48ee8a970d can't be found

You can run the CLI with the -id option to check each snapshot id:

cd /cache/localhost/all
~/.duplicacy-web/bin/duplicacy_*_2.3.0 check -storage gdrive -id data_and_docs
~/.duplicacy-web/bin/duplicacy_*_2.3.0 check -storage gdrive -id backups
...

But I think the first thing to try is to clear the snapshot cache:

rm -rf /cache/localhost/all/.duplicacy/cache

This is because a stale snapshot file in the cache may cause missing chunks errors, if a revision was pruned and then reuploaded from a different computer.

If clearing the cache doesn’t help, you should follow the instructions in Fix missing chunks to find out why it is missing.

Found it, thanks. One thing that would help here is a debug message that says “Check snapshot id/revision”. As it is today, it doesn’t tell you which chunks are being checked until after they’ve succeeded, so it’s hard to tell which snapshot the failed chunk is part of without checking each snapshot individually.

For anyone: Feel free to use the :heart: button on the posts that you found useful.

For the OP of any #support topic: you can mark the post that solved your issue by ticking the :checked: under the post. That of course may include your own post :slight_smile: