Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Redis migration agent skill helps you assess your existing Azure Cache for Redis instance, choose an Azure Managed Redis SKU, and plan and execute your migration.
In this walkthrough, you use the skill with GitHub Copilot CLI to assess a source cache, validate migration to an existing Azure Managed Redis instance, choose whether to copy data, and approve migration. The skill uses scripts that call Azure Resource Manager APIs through Azure CLI. The migration tooling switches DNS so that your existing Azure Cache for Redis hostname points to Azure Managed Redis.
The prompts in this walkthrough are examples. As such, your agent's responses, recommendations, and proposed commands might vary based on your cache configuration and the installed skill version.
Important
Review the migration limitations before proceeding. Test the migration with a nonproduction workload first.
Prerequisites
- GitHub Copilot CLI, installed and authenticated.
- Azure CLI and Git.
- PowerShell 7 or later for the Windows examples in this walkthrough. For other platforms and supported agent hosts, see the skill installation instructions.
- An Azure Cache for Redis Basic, Standard, or Premium source cache and an existing Azure Managed Redis target instance with a database. Both resources must be ready for migration and in the same subscription and Azure region. To create a target instance, follow Create an Azure Managed Redis instance.
- Azure permissions to read both resources and the source cache's metrics, and to validate, create, and monitor migration operations on the target.
- Network access and authentication configured for your application on the target. Microsoft Entra ID configuration isn't copied automatically. Review the differences between the services, including settings that you need to configure separately.
The examples use a source cache named sourceacr and a target named targetamr in the redis-migration resource group. Replace the sample subscription ID, resource group, and cache names with your own values. The subscription ID 00000000-0000-0000-0000-000000000000 is a placeholder.
Step 1: Install and load the skill
Install the skill as a personal skill so that Copilot CLI can find it across your projects.
For a first-time installation on Windows, clone the repository and copy its contents to your Copilot CLI skills directory:
git clone https://github.com/AzureManagedRedis/amr-migration-skill $skillPath = "$env:USERPROFILE\.copilot\skills\amr-migration-skill" New-Item -ItemType Directory -Path $skillPath Copy-Item -Path ".\amr-migration-skill\*" -Destination $skillPath -RecurseSign in to Azure and select the subscription that contains both caches:
az login az account set --subscription 00000000-0000-0000-0000-000000000000Azure CLI authentication is separate from signing in to GitHub Copilot.
Start Copilot CLI:
copilotIn Copilot CLI, reload the skills and inspect the installed skill:
/skills reload /skills get amr-migration-skillConfirm that the skill is listed as a personal skill and its location ends in
amr-migration-skill\SKILL.md. If it isn't listed, verify the installation path and restart Copilot CLI.
Keep tool permission prompts enabled and review proposed commands before allowing them. Permission to run an assessment command isn't approval to start migration.
Step 2: Assess your cache and review the migration plan
Provide the agent with the full resource IDs so it can distinguish the source Azure Cache for Redis resource from the target Azure Managed Redis resource. Specify that you want assessment and planning only:
Use amr-migration-skill to plan migration between these caches:
Source: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis-migration/providers/Microsoft.Cache/Redis/sourceacr
Target: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis-migration/providers/Microsoft.Cache/redisEnterprise/targetamr
Assess target suitability using the source configuration and recent metrics.
Show the plan and required configuration changes. Don't modify either cache.
The skill includes helpers for retrieving source metrics and comparing SKU pricing. Review the proposed target against memory usage, server load, connections, and bandwidth, rather than relying only on the source SKU's advertised size. If metrics aren't available, resolve the access issue or review metrics in the Azure portal before accepting sizing recommendations.
Check that the plan identifies the correct resources, target capacity, networking, authentication, and any feature differences. Migration doesn't automatically copy every configuration setting. For example, persistence configuration, managed identities, and keyspace notifications need separate attention.
If you don't have a suitable AMR target yet, stop here to create and configure one before continuing.
Step 3: Validate and start migration
Choose whether to copy data before asking the agent to validate migration. Validation and migration must use the same source, target, and data-copy choice.
Choose whether to migrate data
Data migration is optional and isn't enabled by default. When you select it, the tooling copies data before switching DNS.
Warning
Starting migration with data copying clears all existing data in the target Azure Managed Redis database, including keys that don't conflict with source keys. Preserve any target data that you need, and approve migration only if the existing target data can be discarded.
Azure Managed Redis supports only logical database 0, and built-in data migration copies only source database 0. If your application uses other logical databases, adapt the application and data model to use database 0 before migration, for example by using key prefixes. Transfer that data separately if needed. When planning a separate transfer, remember that starting migration with built-in data copying clears all existing target data.
Data migration isn't supported for clustered source caches or source caches with private endpoints. For other approaches, see Self-service data migration strategies.
For migration that includes data, enter a prompt such as:
Include data migration in the plan. Check eligibility and explain the impact
on existing target data. Don't change either cache.
If you don't need data copying, tell the agent to migrate the endpoint without copying data, and plan for your application to populate the target or for a separate data transfer.
Validate the migration
Ask the agent to validate the selected approach without starting migration:
Validate migration between these caches with data copying enabled.
Explain all errors and warnings. Stop after validation.
For endpoint-only migration, replace "with data copying enabled" with "without data copying." The skill's scripts express this choice through -MigrateData in PowerShell or --migrate-data in Bash.
Review the returned validation results:
- Resolve blocking errors before proceeding.
- Review each warning and its effect on your application. For example, a warning might identify persistence or high-availability settings that differ between the source and target.
- If you change either cache's configuration or your data-copy choice, validate again.
Validation checks migration eligibility; it doesn't replace application testing or verify that your application can reach and authenticate to the target. If a command fails without returning validation results, resolve the tool or API error before continuing. Don't treat the failure as permission to skip validation.
Review and approve migration
To assess or validate without migrating, stop here and don't approve migration.
Before starting migration, the skill instructs the agent to display the full source and target resource IDs, explain the operation, and request explicit approval. If data copying is enabled, also review and accept the target-data deletion warning. If validation returns warnings, the agent must explain them and obtain approval before bypassing them. Warnings can be overridden; blocking errors can't.
Only after you review the plan, complete the target configuration, and accept the operational impact, approve the specific operation. For example:
I approve starting migration from:
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis-migration/providers/Microsoft.Cache/Redis/sourceacr
to:
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/redis-migration/providers/Microsoft.Cache/redisEnterprise/targetamr
Include data from database 0, as validated.
I understand that all existing target database data will be cleared.
Track migration progress. Don't delete the source cache.
Use this example only for the data-copying path. For endpoint-only migration, explicitly approve migration without copying data instead.
Schedule migration for a suitable maintenance window. Clients can experience a brief connection interruption when DNS switches and connections are reestablished.
Step 4: Monitor and validate migration
Ask the agent to check migration status:
Show the migration status and details for the target cache.
Wait for the migration to report Succeeded before treating it as complete. Data copying adds a synchronization phase and can take longer than endpoint-only migration. A script tracking timeout doesn't necessarily mean that the service operation failed. Ask the agent to check status again rather than starting another migration.
After migration succeeds:
- Verify that your application connects, authenticates, and performs expected reads and writes. If you copied data, check the data that your application depends on.
- Monitor application errors, latency, cache memory, and server load against the premigration baseline.
- Update applications to use the Azure Managed Redis hostname and its configured port. The native Azure Managed Redis endpoint uses port
10000. Don't rely on the legacy Azure Cache for Redis hostname indefinitely. - After application validation and when you no longer need rollback, delete the source cache to stop its charges. Migration doesn't delete it automatically.
If application validation fails, investigate before deleting the source. The skill can help review cancellation or rollback, but those actions require separate confirmation. Rollback is available only for a limited time after a successful migration and doesn't remove data already copied to the target. If you already updated applications to use the Azure Managed Redis hostname, restore their original Azure Cache for Redis hostname and port as part of rollback. Rolling back a migration will not synchronize changes made to the target after migration. See the skill's automated migration reference for details.