Schedule XDCR Replication on periodic manner

Hi Community,

I’m using couchbase 6.5.1 community version. I have one query i have created Replication between two server’s buckets and its copying each other data continuously. I want to schedule replication on periodic manner fro example i want to replicate data every one hour instead of continuously.

Is there any functionality or method is there to achieve that.

Thanks in Advance :slight_smile:


XDCR is meant to be continuous, so there is no automatic/simple way to achieve what you would like to do.

However, you can try scripting xdcr replicate pause/resume commands and running the script via a cron. How well this works would be dependent on the behavior of your system – xdcr keeps xdcr checkpoint information to know which sequence number it last replicated for each vbucket. If the replication is paused for too long, and if the vbucket’s purge seqno (last seqno purged by compaction) > than the xdcr last checkpoint seqno, then that will trigger a restream of all mutations from 0 when xdcr replication is resumed. And, of course, you’ll need to figure out the time periods between pauses and resumes that works for your system, etc.

You can run xdcr replicate pause/resume commands using either couchbase-cli or REST API:
Doc for couchbase-cli – xdcr-replicate | Couchbase Docs
Doc for REST API – Pausing XDCR Replication Streams | Couchbase Docs
Doc for XDCR Settings Reference – XDCR Advanced Settings | Couchbase Docs

@hyunjuV Thank you :slight_smile: