Couchbase 6.5 cbrestore - error in struct.error: int too large to convert

We are facing issue in restoring cbbackup from Couchbase 4.5.1 to 6.5.1. Process terminates with following error.

[root@localhost bkp]# /opt/couchbase/bin/cbrestore -u Administrator -p ******* /root/bkp/ --bucket-source=person-data --bucket-destination=person-data
Exception in thread s0:] 17.7% (114000/estimated 642907 msgs)
Traceback (most recent call last):
File “/opt/couchbase/lib/python/runtime/lib/python3.7/”, line 917, in _bootstrap_inner
File “/opt/couchbase/lib/python/runtime/lib/python3.7/”, line 865, in run
self._target(*self._args, **self._kwargs)
File “/opt/couchbase/lib/python/”, line 112, in run
rv, batch, need_backoff = self.scatter_gather(mconns, batch)
File “/opt/couchbase/lib/python/”, line 88, in scatter_gather
File “/opt/couchbase/lib/python/”, line 233, in send_msgs
conf_res) # type: ignore
File “/opt/couchbase/lib/python/”, line 595, in cmd_request
ext = struct.pack(">IIQQI", flg, exp, int.from_bytes(meta, byteorder=‘big’), cas, force)
struct.error: int too large to convert

It may not be the same as See the discussion on the following thread.
Cbrestore - Couchbase 4.5 dump to Couchbase 6.5 shows error after 17% of restoring

@jefinjeeva tracks this issue

1 Like

CB 6.5 is having lot enhancements when compared to 4.5.1.
i recommmend doing a rolling upgrade of 4.5 .1 to atleast 5.5 0r till 6.5 and then take a dump and restore it to 6.5.


@rvuppala, @pvarley
I have tried XDCR to copy documents from 4.5.1 to 6.5. It successfully copied all documents. Then, I tried to take a dump from 6.5. It showed the same kind of error in CBBACKUP.
Hope this finding help to fix the issue.