Inorder to copy data from one Couchbase bucket to another bucket within same server through python sdk, we use something like below:
cb = cluster.open_bucket(‘bucket1’)
cb1 = cluster.open_bucket(‘bucket2’)
meta = cb1.n1ql_query(N1QLQuery(‘INSERT INTO bucket1 (key _k, value _v) SELECT META().ID _k, _v FROM bucket2 _v;’)).execute().meta
But through Python SDK, I want to copy data from one bucket (bucket1) of couchbase server to a bucket (bucket2) in different couchbase server . Can anyone please help me on this.