Snapshot and Restore

We support all of Elasticsearch’s Snapshot and Restore API to back up your data. You can also add custom repositories with your own S3-buckets.

This page explains details specific to Elastic Cloud. For up-to-date documentation on the Snapshot and Restore API, please consult the official Snapshot/Restore-documentation.

Default Repository

When you create a cluster, a repository called found-snapshots is automatically added to the cluster.

This repository is specific to that cluster: the cluster’s ID is part of the repository’s base_path, i.e., /snapshots/[cluster-id].

Sharing a Repository Across Clusters

You can create a custom repository that references another cluster’s repository, assuming the clusters are in the same region.

If you do a GET /_snapshot/found-snapshots-request, you can find the name of your bucket. Here’s an example:

{
  "found-snapshots" : {
    "type" : "s3",
    "settings" : {
      "base_path" : "/snapshots/[cluster-id]",
      "compress" : "true",
      "region" : "eu-west-1",
      "bucket" : "found-user-[random-string]"
    }
  }
}

The bucket name, found-user-[random-string], is the same for all your clusters in that region. All nodes in your clusters in that region are configured with credentials that have access to that bucket. The only thing that differs is the base_path.

Thus, you can easily create a reference to another cluster’s repository by creating a second repository. For example, if you have a production cluster you want to copy indexes from, you can do a PUT /_snapshot/production with the following body to create a second repository:

{
  "type": "s3",
  "settings": {
    "base_path": "/snapshots/[production-cluster-id]",
    "compress": "true",
    "region": "eu-west-1",
    "bucket": "found-user-[random-string-see-above-how-to-find-it]"
  }
}

You will then be able to restore indexes from the production cluster to another cluster by, for example, running POST /_snapshot/production/_restore.

Note

When you use the same repository across clusters, you are responsible for not writing to the same location at the same time.

Snapshot Restore