Duplicacy backup fails with "The snapshot contains an error: The last file ends at chunk 511 but the number of chunks is 514"

Hello,

I’m backuping a file that was falloc’ed (so it is mostly empty) to S3 storage and I keep getting the same error (using duplicacy CLI release 2.5.1):

The snapshot contains an error: The last file ends at chunk 511 but the number of chunks is 514

No previous backup found
Indexing /var/nfv
Parsing filter file /var/nfv/.duplicacy/filters
Loaded 18 include/exclude pattern(s)
Listing all chunks
Use 2 uploading threads
Skipped chunk 3 size 2097152, 2.00MB/s 00:08:32 0.1%
Skipped chunk 4 size 2097152, 4.00MB/s 00:04:16 0.3%
Skipped chunk 5 size 2097152, 6.00MB/s 00:02:50 0.5%
Skipped chunk 6 size 2097152, 8.00MB/s 00:02:08 0.7%
Skipped chunk 7 size 2097152, 10.00MB/s 00:01:42 0.9%
Skipped chunk 8 size 2097152, 12.00MB/s 00:01:25 1.1%
Skipped chunk 9 size 2097152, 14.00MB/s 00:01:13 1.3%
Skipped chunk 10 size 2097152, 16.00MB/s 00:01:04 1.5%
Skipped chunk 11 size 2097152, 18.00MB/s 00:00:56 1.7%
Skipped chunk 12 size 2097152, 20.00MB/s 00:00:51 1.9%
Skipped chunk 13 size 2097152, 22.00MB/s 00:00:46 2.1%
Skipped chunk 14 size 2097152, 24.00MB/s 00:00:42 2.3%
Uploaded chunk 2 size 2097152, 26.00MB/s 00:00:39 2.5%
Skipped chunk 15 size 2097152, 28.00MB/s 00:00:36 2.7%
Uploaded chunk 1 size 2097152, 30.00MB/s 00:00:34 2.9%
...
Skipped chunk 509 size 2097152, 254.50MB/s 00:00:01 99.4%
Skipped chunk 510 size 2097152, 255.00MB/s 00:00:01 99.6%
Skipped chunk 511 size 2097152, 255.50MB/s 00:00:01 99.8%
Skipped chunk 512 size 2097152, 256.00MB/s 00:00:01 99.9%
Skipped chunk 514 size 0, 256.00MB/s 00:00:01 99.9%
Uploaded chunk 513 size 0, 256.00MB/s 00:00:01 99.9%
The snapshot contains an error: The last file ends at chunk 511 but the number of chunks is 514

Is this a bug in duplicacy otherwise what could be the reason ?

1 Like

This is a bug. The last 2 chunks have a size of 0 and they shouldn’t be uploaded.

Are you using fixed-size chunking?

1 Like

Yes, I’ve tried with
/bin/duplicacy init -c 1M -min 1M -max 1M
and
/bin/duplicacy init -c 2M -min 2M -max 2M

1 Like

I was able to replicate the bug with two size 0 files side by side. You can work around by excluding both files or one of them.

I’ll fix this bug in the next release.

4 Likes

I have only one file with size == 0 during the backup. I confirm it works if the file size is greater than 0.

Thanks!