kibana/docs/management/managing-ccr.asciidoc
Larry Gregory 2e34eb239f
Hide management sections based on cluster/index privileges (#67791)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 09:30:47 -04:00

81 lines
3.3 KiB
Plaintext

[role="xpack"]
[[managing-cross-cluster-replication]]
== Cross-Cluster Replication
Use *Cross-Cluster Replication* to reproduce indices in
remote clusters on a local cluster. {ref}/xpack-ccr.html[Cross-cluster replication]
is commonly used to provide remote backups for disaster recovery and for
geo-proximite copies of data.
To get started, open the menu, then go to *Stack Management > Data > Cross-Cluster Replication*.
[role="screenshot"]
image::images/cross-cluster-replication-list-view.png[][Cross-cluster replication list view]
[float]
=== Prerequisites
* You must have a {ref}/modules-remote-clusters.html[remote cluster].
* Leader indices must meet {ref}/ccr-requirements.html[these requirements].
* The Elasticsearch version of the local cluster must be the same as or newer than the remote cluster.
Refer to {ref}/ccr-overview.html[this document] for more information.
[float]
=== Required permissions
The `manage` and `manage_ccr` cluster privileges are required to access *Cross-Cluster Replication*.
You can add these privileges in *Stack Management > Security > Roles*.
[float]
[[configure-replication]]
=== Configure replication
Replication requires a leader index, the index being replicated, and a
follower index, which will contain the leader index's replicated data.
The follower index is passive in that it can read requests and searches,
but cannot accept direct writes. Only the leader index is active for direct writes.
You can configure follower indices in two ways:
* Create specific follower indices
* Create follower indices from an auto-follow pattern
[float]
==== Create specific follower indices
To replicate data from existing indices, or set up local followers on a case-by-case basis,
go to *Follower indices*. When you create the follower index, you must reference the
remote cluster and the leader index that you created in the remote cluster.
[role="screenshot"]
image::images/follower_indices.png[][UI for adding follower indices]
[float]
==== Create follower indices from an auto-follow pattern
To automatically detect and follow new indices when they are created on a remote cluster,
go to *Auto-follow patterns*. Creating an auto-follow pattern is useful when you have
time series data, like event logs, on the remote cluster that is created or rolled over on a daily basis.
When creating the pattern, you must reference the remote cluster that you
connected to your local cluster. You must also specify a collection of index patterns
that match the indices you want to automatically follow.
Once you configure an
auto-follow pattern, any time a new index with a name that matches the pattern is
created in the remote cluster, a follower index is automatically configured in the local cluster.
[role="screenshot"]
image::images/auto_follow_pattern.png[UI for adding an auto-follow pattern]
[float]
[[manage-replication]]
=== Manage replication
Use the list views in *Cross-Cluster Replication* to monitor whether the replication is active and
pause and resume replication. You can also edit and remove the follower indices and auto-follow patterns.
For an example of cross-cluster replication,
refer to https://www.elastic.co/blog/bi-directional-replication-with-elasticsearch-cross-cluster-replication-ccr[Bi-directional replication with Elasticsearch cross-cluster replication].