Backup and Restore Altoros Elasticsearch for VMware Tanzu

This topic describes how to configure and apply backup/restore for Altoros Elasticsearch for VMware Tanzu. These features are available from v1.1.0 Altoros Elasticsearch.

Prerequisites

Before you configure and apply Backup and Restore, you must do the following:

  • Create S3 bucket in AWS or S3-compatible storage(Minio).
  • Create user with permission to work with this bucket. Here is example of Amazon IAM policy.(changing test-elasticsearch-backups to your bucket name)
    {
    "Statement": [
      {
        "Action": [
          "s3:ListBucket",
          "s3:GetBucketLocation",
          "s3:ListBucketMultipartUploads",
          "s3:ListBucketVersions"
        ],
        "Effect": "Allow",
        "Resource": [
          "arn:aws:s3:::test-elasticsearch-backups"
        ]
      },
      {
        "Action": [
          "s3:GetObject",
          "s3:PutObject",
          "s3:DeleteObject",
          "s3:AbortMultipartUpload",
          "s3:ListMultipartUploadParts"
        ],
        "Effect": "Allow",
        "Resource": [
          "arn:aws:s3:::test-elasticsearch-backups/*"
        ]
      }
    ],
    "Version": "2012-10-17"
    }
    

Configure backup and restore for Altoros Elasticsearch cluster

  1. To enable backup/restore functionality click the Altoros Elasticsearch for VMware Tanzu tile.

  2. Navigate to the Backup-Restore and choose enable S3 Snapshots for elasticsearch cluster. Fill in the following form Backup restore

  3. Provide S3 access and secret keys

  4. By default, Snapshot contains all indices, but you can specify what indices to backup and restore accordinly.

  5. Provide endpoint to access your s3 storage. It could be ip address or dns name. Check AWS_DOCS to find AWS S3 endpoints.

  6. Provide name that will be used to create s3 repository type in elasticsearch.

  7. Provide S3 bucket name.

  8. Click Save.

BBR Backup and Restore for Altoros Elasticsearch cluster

Set bosh environment variables

$ BOSH_CLIENT_SECRET
$ BOSH_ENVIRONMENT
$ BOSH_CA_CERT
$ BOSH_CLIENT

Create folder for backup metadata

$ mkdir backup-es

Create backup with bbr cli

Use the bbr deployment [options] subcommand [subcommand options] command to create a backup.

$ bbr deployment  --target $BOSH_ENVIRONMENT \
                  --username $BOSH_CLIENT \
                  --password $BOSH_CLIENT_SECRET \
                  --deployment altoros-elasticsearch-your_tile_id \
                  backup --artifact-path backup-es/

Restore particular backup with bbr cli

Use the bbr deployment [options] subcommand [subcommand options] command to restore from specific backup.

$ bbr deployment  --target $BOSH_ENVIRONMENT
                  --username $BOSH_CLIENT \
                  --password $BOSH_CLIENT_SECRET \
                  --deployment altoros-elasticsearch-your_tile_id \
                   restore --artifact-path backup-es/altoros-elasticsearch-your_tile_id_date/