Cbbackup fails after upgrading to 6.5

I have a simple script that stopped working after upgrading to 6.5 from 5.1

C:\"Program Files\"Couchbase\Server\bin\cbbackup -u user -p passwd http://releasetest4:8091 c:\releaseCouchbaseBackup

its now erroring out with:

Error: please provide both a source and a backup_dir

yet looking online and at command line options I see:

Usage: cbbackup [options] source backup_dir

the url is the source and the disk path is the dest. (I got from CB examples)

what does it want for the source path now? the actual directory of where Couchbase is located?

I have tried several with no luck

any suggestions welcomed

thanks

dougc

switching to cbbackupmgr is working I guess cbbackup does not work on 6.5

thanks

Hello @dougc,

cbbackupmgr is the recommended backup and restore tool if Couchbase Enterprise Edition is being used.

I guess cbbackup does not work on 6.5

cbbackup should work with 6.5. I will test that in house and see if we can reproduce the issue.

thank you I got my backup working with cbbackmgr but nothing I tried worked with cbbackup

I thought it’s an Enterprise tool only. See here: cbbackupmgr | Couchbase Docs
Once Couchbase Server 6.5 CE is available (presumably in a couple of months) I think cbbackup will still be the recommended option to create backups. Is this correct?

Once Couchbase Server 6.5 CE is available (presumably in a couple of months) I think cbbackup will still be the recommended option to create backups. Is this correct?

Sorry that was a typo on my behalf. I have corrected the comment above. Just to be clear:

  • For CE (Community Edition) - cbbackup/cbrestore is the only commands to use for backup and restore
  • For EE (Enterprise Edition) - cbbackupmgr is the recommended tool to use.
1 Like

Did you get a chance to test this?

cbbackup also fails in 6.5 CE immediately

/opt/couchbase/bin/cbbackup http://localhost:8091 ~/backups -u Administrator -p mypass
Exception in thread w0:
Traceback (most recent call last):
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/couchbase/lib/python/pump.py", line 446, in run_worker
    curx).run()
  File "/opt/couchbase/lib/python/pump.py", line 504, in run
    rv_batch, batch = self.source.provide_batch()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 254, in provide_batch
    rv, batch = self.provide_dcp_batch_actual()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 413, in provide_dcp_batch_actual
    msg = (cmd, vbucket_id, key, flg, exp, cas, rev_seqno.to_bytes(4, 'big'), val, seqno, dtype, metalen,
OverflowError: int too big to convert

“/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py”, line 917:

self.run()

Same problem (couchbase 6.5 CE, Ubuntu 18.04)

Exception in thread w0:] 0.4% (28578/estimated 7339843 msgs)
Traceback (most recent call last):
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/couchbase/lib/python/pump.py", line 446, in run_worker
    curx).run()
  File "/opt/couchbase/lib/python/pump.py", line 504, in run
    rv_batch, batch = self.source.provide_batch()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 254, in provide_batch
    rv, batch = self.provide_dcp_batch_actual()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 413, in provide_dcp_batch_actual
    msg = (cmd, vbucket_id, key, flg, exp, cas, rev_seqno.to_bytes(4, 'big'), val, seqno, dtype, metalen,
OverflowError: int too big to convert

I did some more testing:

  • fresh install 0f Ubuntu 16.04
  • install CB Server CE 6.5 like so
# curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
# sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
# sudo apt-get update
# sudo apt-get install couchbase-server-community
  • create bucket, add one document via Couchbase dashboard, run backup command
/opt/couchbase/bin/cbbackup http://localhost:8091 ~/backups -u Administrator -p mypass

That worked.

What didn’t work on the same fresh install:

  • successfully import backup of production bucket which was created with Couchbase Server 6.0 CE
  • run backup command
Exception in thread w0:
Traceback (most recent call last):
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/couchbase/lib/python/runtime/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/couchbase/lib/python/pump.py", line 446, in run_worker
    curx).run()
  File "/opt/couchbase/lib/python/pump.py", line 504, in run
    rv_batch, batch = self.source.provide_batch()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 254, in provide_batch
    rv, batch = self.provide_dcp_batch_actual()
  File "/opt/couchbase/lib/python/pump_dcp.py", line 413, in provide_dcp_batch_actual
    msg = (cmd, vbucket_id, key, flg, exp, cas, rev_seqno.to_bytes(4, 'big'), val, seqno, dtype, metalen,
OverflowError: int too big to convert

^Cinterrupted.

I did import backup created with Couchbase 6.0 CE as well, because direct upgrade from 6.0 CE to 6.5 CE failed.

I did the same as in this post: Cbbackup fails after upgrading to 6.5 but with Ubuntu 18.04. Same results. Is there anything else I can do to solve the issue?

I am also facing the same problem.

Running 6.5 CE (ubuntu 18)

cbbackup throws this error:

“OverflowError: int too big to convert” by rev_seqno.to_bytes(4, ‘big’) at line 413 in File “/opt/couchbase/lib/python/pump_dcp.py”.

It is failing for all documents that have a large meta.rev number. Backup works fine if the bucket has no documents with high meta.rev value.

Here is the meta of one of the document for which cbbackup is failing:

{
“meta”: {
“id”: “”,
“rev”: “211362657848-159245ef377b00000000000002000000”,
“expiration”: 0,
“flags”: 33554432,
“type”: “json”
},
“xattrs”: {}
}

The same backup works fine in version 4 database. I am upgrading to 6.5 CE and backup stopped working due to the above error. For the time being I am using a v4 instance to take the remote backup of a v6.5 instance.

Why is the meta.rev value so high? It is not a heavily used database with just a single node and few thousands of documents. How do I make cbbackup work?

Thanks.

1 Like

Hello all,

Thank you for bring this issue to our attention, I have opened MB-38683,. The issue is that cbbackup is converting the Rev field to 4 bytes when it should convert it to 8 bytes.

1 Like

Could you please help me understand why this rev number is so large in my case when the database is pretty small and not much happens really? I can’t think of a scenario where documents are mutated more than a couple of times during their entire existence.

I have closed this topic as the original point has been addressed. With regards to the overflowError please update @Nik’s post. For new questions and issues it’s always best to open a new post rather than comment on an old one, unless you’re 100% sure it is the same issue with the same root cause.