原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/backup-cluster-data.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/backup-cluster-data.html

Back up a cluster’s dataedit

To back up your cluster’s data, you can use the snapshot API.

A snapshot is a backup taken from a running Elasticsearch cluster. You can take snapshots of individual indices or of the entire cluster. Snapshots can be stored in either local or remote repositories. Remote repositories can reside on S3, HDFS, Azure, Google Cloud Storage, and other platforms supported by a repository plugin.

Snapshots are incremental: each snapshot of an index only stores data that is not part of an earlier snapshot. This enables you to take frequent snapshots with minimal overhead.

If your cluster has Elasticsearch security features enabled, when you back up your data the snapshot API call must be authorized.

The snapshot_user role is a reserved role that can be assigned to the user who is calling the snapshot endpoint. This is the only role necessary if all the user does is periodic snapshots as part of the backup procedure. This role includes the privileges to list all the existing snapshots (of any repository) as well as list and view settings of all indices, including the .security index. It does not grant privileges to create repositories, restore snapshots, or search within indices. Hence, the user can view and snapshot all indices, but cannot access or modify any data.

For more information, see Security privileges and Built-in roles.