Restoring Data in Aonnis Valkey Cluster
This guide explains how to restore data in a Valkey cluster using Aonnis Valkey Panther. The restoration process involves uploading RDB files to an S3 bucket and configuring access for Aonnis Valkey Panther to fetch and restore the data.
Step 1: Prepare Your S3 Bucket
- Create an S3 bucket in your preferred cloud provider.
- Select or create a folder inside the bucket where your RDB files will be stored.
- Upload all your Redis/Valkey
.rdbfiles to the selected folder.
Step 2: Configure Access Credentials
To allow Aonnis Valkey Panther to access S3 and download the RDB files, you need to provide valid AWS S3 credentials with the correct permissions.
Required Permissions
Ensure your IAM user or access key has at least the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::your-bucket-name",
"arn:aws:s3:::your-bucket-name/your-folder/*"
]
}
]
}
Replace "your-bucket-name" and "your-folder" with your actual S3 bucket and folder name.
Step 3: Store S3 Credentials in Kubernetes Secret
Aonnis Valkey Panther requires access and secret keys to communicate with S3. Create a Kubernetes Secret containing these credentials.
Create the Secret
Run the following command, replacing placeholders with your actual credentials:
kubectl create secret generic s3-credentials \
--from-literal=accessKey=<your-base-64-encoded-s3-access-key> \
--from-literal=secretKey=<your-base-64-encoded-s3-secret-key>
Once created, Aonnis Valkey Panther will use this secret to authenticate and download the RDB files.
Step 4: Restore Data into Valkey Cluster
Now that the RDB files are in S3 and access credentials are configured, initiate the restore process. To initiate restore process while cluster creation, modify your Helm values.yaml file to include S3 configuration:
initialRestoreConfig:
enabled: true
storageConfig:
protocol: "S3"
accessConfig:
accessKeysSecretRef:
name: s3-access-secret
accessKey: "accessKey"
secretKey: "secretKey"
endpoint: "https://s3.amazonaws.com/"
bucket: "test-yacaja4840"
folderPath: "snapshot/files/path"
Deploy the updated Helm chart:
helm install valkey-cluster aonnis/valkey-panther -f values.yaml
Aonnis Valkey Panther will now:
✅ Connect to the S3 bucket
✅ Download the RDB files
✅ Restore them into the Valkey cluster
Snapshot restore for an existing Aonnis Valkey cluster is currently not supported. To restore data from a snapshot, you will need to create a new cluster and load the data during the creation process.
Before starting the restore process, ensure that the Valkey cluster has enough memory to load all the data from the RDB file. If the memory allocation is insufficient, cluster creation will fail.