Generate/Copy all Index on XDCR

I have 2 node source cluster which is replicated to single node XDCR. I can see all data but indexes are missing.
How can I automate getting all indexes too in XDCR. I want all index same as on source to be on single node in XDCR. Is there option to replicate indexes too along with data in XDCR ? I am using couchbase 5.5
Please help.

Hi @rocky.community,

Yes, the indexes are NOT replicated by XDCR workflow. XDCR can be used for replicating only the data in Key-Value store. The indexes have to be manually created on the target XDCR cluster.

Thanks for your reply. Is there any way we can automate this by generating script from source and running that script on target ?

Hi @rocky.community,

cbbackupmgr utility can help in this case. Please note that the cbbackupmgr utility is a general purpose utility which allows user to backup and restore all the key-value data, View index definitions, GSI index definitions, Full text index definitions, bucket settings etc. So, if you want to use cbbackupmgr only for backup and restore of the GSI/View/FullText index definitions, you have to configure it properly.

Details of configuration can be found here:
https://docs.couchbase.com/server/5.5/backup-restore/cbbackupmgr-config.html

Also note that, cbbackupmgr DOES NOT do continuous replication of the index definitions. So, whenever new GSI/View/FullText indexes are created, you have to explicitly run cbbackupmgr again to copy new indexes.

Hope this helps.