I'm trying to have a replication by xdcr between 2 nodes in 2 servers, but it happens with 2 bucket in the same server too, with the web interface but at the init of the replication, when i start replication, it doesn't replicate any view. (production and dev)
I have the same problem when i use cb_backup and cb_restore.
I made that by hands until now with a stupid copy&paste but i need to know if there is a better way to copy a view from a bucket to another once.
UPDATE:
I have find that with this command i can backup only the document view:
/opt/couchbase/bin/cbbackup http://127.0.0.1:8091 test/ -b bucket_a -x design_doc_only=1
And here to restore:
/opt/couchbase/bin/cbrestore test/ http://127.0.0.1:8091 --bucket-source=bucket_a --bucket-destination=bucket_b
But can i backup everything with only one command? And with xdcr from web gui?
XDCR will only replicate the data. No views, no secondary indexes, etc. just data.
The functionality you are looking for to be able to backup and restore the data and views at the same time is in cbbackupmgr which is an enterprise only feature of Couchbase Server Enterprise Edition 4.5. Cbbackupmgr will not work against Community Edition.
IMO, you'd be better off managing your views either programmatically using the SDKs or via command line.