Skip to main content

Periodic snapshots in Aonnis Valkey Panther

This document provides guidance on configuring automatic snapshots for Valkey clusters using the ValkeyCluster Kubernetes Custom Resource Definition (CRD). It explains the available settings for scheduling, retention, storage configuration, and retry mechanisms, ensuring efficient snapshot management within a Kubernetes environment.

automaticSnapshotConfig

  • Type: AutomaticSnapshotConfigType

  • Description: Configuration for automatic snapshots.

  • Fields:

    • enabled:
      • Type: bool
      • Description: Whether automatic snapshots are enabled.
    • storageConfig:
      • Type: StorageConfigType
      • Description: Storage configuration for snapshots.
      • Required: true
    • cronExpression:
      • Type: string (cronExpression)
      • Description: Cron expression to schedule snapshot operations.
      • Required: true
    • uploadRetryLimit:
      • Type: int32
      • Description: Number of retry attempts for snapshot uploads, in case of failure to connect to storageConfig.
      • Required: false
      • Default: 1
  • Example:

    Automatic snapshot config
    automaticSnapshotConfig:
    enabled: true
    cronExpression: "0 0 * * *"
    uploadRetryLimit: 3
    storageConfig:
    protocol: S3
    accessConfig:
    endpoint: "https://s3.amazonaws.com"
    region: "us-east-1"
    bucket: "valkey-snapshots"
    folderPath: "daily-backups"
    accessKeysSecretRef:
    name: "s3-credentials"
    namespace: "default"
    accessKey: "access-key"
    secretKey: "secret-key"

Required S3 permissions

Make sure the identity used for creating access keys have following S3 permissions. So that Aonnis Valkey Panther can work smoothly.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucketMultipartUploads",
"s3:AbortMultipartUpload",
"s3:ListBucket",
"s3:DeleteObject",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::your-bucket-name",
"arn:aws:s3:::your-bucket-name/*"
]
}
]
}

Automatic deletion of snapshots after a period of time

Comming soon