Restore data to the same bucket does not work

Hi there.
I have Couchbase 6.0.0 Community Edition running on Ubuntu 19.04. Couchbase is organized to a cluster having 2 nodes. I try to test backup and restore procedure for a single bucket using following steps:

  1. Prepare bucket with data (let’s call it ‘test-bucket’) and primary index. This is the only bucket in the cluster.
  2. Create backup using /opt/couchbase/bin/cbbackup http://host:8091 /backup_folder -u username -p password -b test-bucket command.
  3. Remove all the data from bucket by performing N1QL query ‘DELETE FROM test-bucket’.
  4. Run restore command /opt/couchbase/bin/cbrestore /backup_folder http://host:8091 -u username -p password --bucket-destination=test-bucket.
  5. Check the data in test-bucket.

cbrestore command runs fine without any errors, but I am still getting empty test-bucket, so the data is not actually being restored. However, if I create another bucket, say, test-restore-bucket, and point --bucket-destination argument of cbrestore command to it, the data is being restored successfully to that bucket. Since it is not possible to rename buckets in Couchbase, restoring of data to a test-bucket is becoming a nightmare with those limitations. My question is - have someone else experienced the same problem and is it possible to restore the data without spare bucket being involved?

Hi @dmytro.liashko,

I have just tried following your steps, and I’m seeing the same thing. So it’s either:

  • Bug in cbbackup/cbrestore
  • We’re both doing something wrong

I find the first case unlikely, but nevertheless a possibility.

I find the second case more likely, but I’m not seeing anything in the documentation that says otherwise.

In either case, would you please create a ticket on and basically just copy/paste your post? Please let me know what the ticket number is and I will do what I can to follow up?