Snapshot and Restore with Custom Repository

For AWS, we support specifying your own S3 repositories to snapshot to and restore from. This can be useful, for example, to do long-term archiving of old indexes, or to be certain you have an exit strategy, should you need to move away from our service.

Note

Automated snapshots are only available in the found snapshots repository. You are responsible for the execution and maintenance of the snapshots that you store in custom repositories. Please keep in mind that the automated snapshot frequency might conflict with manual snapshots.

For GCP, we don’t support specifying your own custom repository, yet.

Preparing a Bucket

Create the bucket with your custom AWS account. Make sure the bucket is in the same region as your cluster.

Then, create an IAM user, copy the access key ID and secret, then configure the following user policy. This is important to make sure the access keys, which you will need to provide to your cluster, can only access the intended bucket.

{
  "Statement": [
    {
      "Action": [
        "s3:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::bucket-name",
        "arn:aws:s3:::bucket-name/*"
      ]
    }
  ]
}

For more information on S3 and IAM, please consult AWS' S3-documentation and IAM-documentation.

Creating the Repository

With the bucket ready, you can create a repository by PUT-ing the following to /_snapshot/repository_name:

{
  "type": "s3",
  "settings": {
    "bucket": "name-of-bucket",
    "region": "region-of-bucket-same-as-cluster",
    "access_key": "YOURKEYHERE",
    "secret_key": "secret-key-with-just-permission-to-that-bucket-do-not-use-a-master-key",
    "compress": true
  }
}