# Use Helm to create an Aerospike Restore

## Overview

This page describes how to use Helm to create an Aerospike Restore Custom Resource (CR) containing the configuration parameters to perform a restore on an Aerospike cluster on Kubernetes.

## Requirements

Before creating your restore CR using Helm, deploy the Aerospike Backup Service (ABS) on your Kubernetes cluster using either:

-   [kubectl](https://aerospike.com/docs/kubernetes/4.1.x/tools/backup/backup-service)
-   [Helm](https://aerospike.com/docs/kubernetes/4.1.x/tools/backup/backup-service-helm)

## Create the restore

1.  Add the Helm repository to get the Helm charts.
    
    ```plaintext
    helm repo add aerospike https://aerospike.github.io/aerospike-kubernetes-enterprise
    ```
    
    If the Helm repository is already added, update the index:
    
    ```plaintext
    helm repo update
    ```
    
2.  Create a custom `values.yaml` file with your required configurations. Here is an example of a custom user-defined `values.yaml` file.
    
    ```yaml
    ## backupService is the name and namespace reference for the backup service.
    
    ## It is used to communicate to the backup service to trigger operations. This field is immutable.
    
    backupService:
    
      name: aerospikebackupservicesample
    
      namespace: aerospike
    
    ## Type is the type of restore. It can be of type Full, Incremental, or Timestamp.
    
    ## Based on the restore type, the relevant restore config is provided.
    
    type: Full
    
    ## Config is the free form configuration for the restore in YAML format.
    
    ## This config is used to trigger restores. It includes: destination, policy, source, secret-agent, time and routine.
    
    restoreConfig:
    
      destination:
    
        label: destinationCluster
    
        credentials:
    
          password: admin123
    
          user: admin
    
        seed-nodes:
    
          - host-name: aerocluster.test.svc.cluster.local
    
            port: 3000
    
      policy:
    
        parallel: 3
    
        no-generation: true
    
        no-indexes: true
    
      source:
    
        local-storage:
    
          path: /localStorage
    
      backup-data-path: "/path/to/backup/data/"
    
    ## Polling period for restore operation status.
    
    ## It is used to poll the restore service to fetch restore operation status. Default is 60 seconds.
    
    pollingPeriod: 60s
    ```
    
    Install the chart with custom values.
    
    ```plaintext
    helm install aerospike-restore aerospike/aerospike-restore -f CUSTOM_YAML_FILE
    ```
    

## Configurations

For more details on these configurations, see the Aerospike [Restore Configuration Settings](https://aerospike.com/docs/kubernetes/4.1.x/tools/backup/restore-configuration).

| Name | Description | Default |
| --- | --- | --- |
| `customLabels` | Custom labels to add on the AerospikeRestore resource | `{}` (nil) |
| `backupService.name` | Aerospike backup service name |  |
| `backupService.namespace` | Aerospike backup service namespace |  |
| `type` | Type of restore. It can be of type Full, Incremental, or Timestamp. | `Full` |
| `restoreConfig` | Aerospike restore configuration | `{}` (nil) |
| `pollingPeriod` | Polling period for restore operation status | `60s` |