Hi there! I’m really new with Couchbase, still finding my way around. I’m in the process of setting up a development environment and am trying to backup and restore clusters, so that I can easily transfer the DB over different machines.
I read the documentation and figured that to backup a cluster (both data and design info) I can run the command:
$ cbbackup http://localhost:8091 -u Administrator -p Pswrd ./path/to/backup
In this test environment, I only have a test bucket called x.
At this point, I tried to restore the x bucket on another machine, which has a single bucket called xCopy.
To do this, I ran the command:
$ cbrestore /path/tp/backup -u Administrator -p Pswrd -x rehash=1 http://localhost:8091 --bucket-source x --bucket-destination xCopy
The data was correctly copied into xCopy, but the design info wasn’t. Specifically, I had an index in x, called idx1, which didn’t show in xCopy.
I did a bit of digging and found out that when restoring, the cbrestore re-creates the indexes in N1QL, but you still have to build them. So, I ran the query below in the query editor:
BUILD INDEX ON xCopy(idx1)
Unfortunately, I got this error message:
[ {
“code”: 5000,
“msg”: “GSI index idx1 not found.”,
“query_from_user”: “BUILD INDEX ON xCopy (idx1)”
}]
I continued doing some research online, but I couldn’t find any solution to the problem. Do you guys have any idea what I’ve done wrong and how I could fix this?
Just for reference, I’m running Couchbase Server Enterprise 6.0.2.
Thanks in advance for your help