Hi,
I am migrating my Couchbase from version 6.6.0 to 7.6.1 and Sync Gateway from 2.8 to 3.1.6.
Here are a few questions:
We have imported the data to 7.6.1, and we have written a function in Eventing to move data from the default collection to another collection based on the document type.
In the latest collection, we are missing the _sync
properties. I have used the reference below to move/copy the data to different collections:
Now, my questions are:
- Can I use a similar
sync_json
config for the sync function? I have tried, but I am facing issues.
json
Copy code
{
"bootstrap": {
"server": "couchbase://url",
"username": "username",
"password": "password",
"use_tls_server": false
},
"bucket_credentials": {
"mybucket": {
"username": "username",
"password": "password"
}
}
}
I am using the above config in the sync function. I had to use this curl
command with the curl --location -g --request POST flag to create Sync Gateway users/sync function. When I try to configure it in the Sync Gateway JSON file, I face issues. (can i use the same way old style but i want to use bootstrap)
2. After copying the document from the default collection to another collection, how can I retain the _sync
properties (mainly rev
and channels
)? (do i need to make any changes in the sync json)
3. I encounter the error “Changes cannot be saved. SyncGateway is enabled on: {{bucket}}, deployment of source bucket mutating handler will cause Intra Bucket Recursion.” I am trying to delete the document from the default collection after moving it to a different collection.
4.