Redis Persistence on Azure not working

Michał Borkowski 46 Reputation points
2022-03-07T14:02:07.917+00:00

Hello.

Please consider this Bicep template:

param deploymentName string = ''

resource storageAccountsRedis 'Microsoft.Storage/storageAccounts@2021-04-01' = {
  name: '${deploymentName}redis'
  location: resourceGroup().location
  sku: {
    name: 'Standard_GRS'
  }
  kind: 'BlobStorage'
  properties: {
    accessTier: 'Cool'
    allowSharedKeyAccess: true
  }
}

resource redisDatabase 'Microsoft.Cache/redis@2020-12-01' = {
  dependsOn: [
    storageAccountsRedis
  ]
  name: '${deploymentName}Redis'
  location: resourceGroup().location
  properties: {
    enableNonSslPort: true
    redisConfiguration: {
      'rdb-backup-enabled': 'true'
      'rdb-backup-frequency': '15'
      'rdb-backup-max-snapshot-count': '1'
      'rdb-storage-connection-string': 'DefaultEndpointsProtocol=https;BlobEndpoint=https://${storageAccountsRedis.name}.blob.${environment().suffixes.storage};AccountName=${storageAccountsRedis.name};AccountKey=${storageAccountsRedis.listKeys().keys[0].value}'
    }
    redisVersion: '6'
    sku: {
      capacity: 1
      family: 'P'
      name: 'Premium'
    }
  }
}

This is a very simple template that deploys Redis, with a backup to Storage Account every 15 minutes. When I deploy it a container -persistence is created in the Storage Account, but no backups ever appear in it. I can't find any errors/warnings regarding backups.

I don't know how should I proceed from here.

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
251 questions
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,387 Reputation points Microsoft Employee
    2022-03-07T22:36:35.24+00:00

    Hi, @Michał Borkowski Welcome to the Microsoft Q&A Platform, and thanks for your query.
    As we understand you are trying to deploy a sample template to Redis and you are facing an issue as -persistence is created in the storage account.
    By seeing the code which you have shared180780-image.png is not supported, The Redis cache persist file is "Page blob" The account type "BlobStorage" does not support page blob.
    Change it to StorageV2 and give it a try.
    Regards
    Geetha


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.