You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/redis/migrate/migration-guide.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Open-source Redis can run in many compute environments. Common examples include:
24
24
-**Cloud-based VMs** - Redis caches running on Azure VMs, AWS EC2, and so on.
25
25
-**Hosting services** - Managed Redis services such as AWS ElastiCache.
26
26
27
-
If you have such a cache, you may be able to move it to Azure Managed Redis with minimal interruption or downtime.
27
+
If you have such a cache, you may be able to move it to Azure Managed Redis with minimal interruption or downtime.
28
28
29
29
If you're looking to move from one Azure region to another, you [Move Azure Managed Redis instances to different regions](../../azure-cache-for-redis/cache-moving-resources.md).
30
30
@@ -35,9 +35,9 @@ There are different ways that you can switch from one cache to another. Dependin
35
35
| Option | Advantages | Disadvantages |
36
36
| ------------ | ---------- | ------------- |
37
37
| Create a new cache | Simplest to implement. | Need to repopulate data to the new cache, which may not work with many applications. |
38
-
| Export and import data via RDB file | Compatible with any Redis cache generally. | Some data could be lost, if they're written to the existing cache after the RDB file is generated. |
39
-
| Dual-write data to two caches | No data loss or downtime. Uninterrupted operations of the existing cache. Easier testing of the new cache. | Needs two caches for an extended period of time. |
40
-
| Migrate data programmatically | Full control over how data are moved. | Requires custom code. |
38
+
| Export and import data via RDB file | Compatible with any Redis cache generally. | Some data could be lost, if they're written to the existing cache after the RDB file is generated. |
39
+
| Dual-write data to two caches | No data loss or downtime. Uninterrupted operations of the existing cache. Easier testing of the new cache. | Needs two caches for an extended period of time. |
40
+
| Migrate data programmatically | Full control over how data are moved. | Requires custom code. |
41
41
42
42
### Create a new Azure Managed Redis
43
43
@@ -47,9 +47,9 @@ General steps to implement this option are:
47
47
48
48
1. Create a new Azure Managed Redis instance.
49
49
50
-
2. Update your application to use the new instance.
50
+
1. Update your application to use the new instance.
51
51
52
-
3. Delete the old Redis instance.
52
+
1. Delete the old Redis instance.
53
53
54
54
### Export data to an RDB file and import it into Azure Managed Redis
55
55
@@ -61,36 +61,35 @@ Open-source Redis defines a standard mechanism for taking a snapshot of a cache'
61
61
62
62
General steps to implement this option are:
63
63
64
-
<!-- cawa - remove reference to premium tier -->
65
-
1. Create a new Azure Managed Redis instance in the premium tier that is the same size as (or bigger than) the existing cache.
64
+
1. Create a new Azure Managed Redis instance that is the same size as (or bigger than) the existing cache.
66
65
67
-
2. Save a snapshot of the existing Redis cache. You can [configure Redis to save snapshots](https://redis.io/topics/persistence) periodically, or run the process manually using the [SAVE](https://redis.io/commands/save) or [BGSAVE](https://redis.io/commands/bgsave) commands. The RDB file is named “dump.rdb” by default and will be located at the path specified in the *redis.conf* configuration file.
66
+
1. Save a snapshot of the existing Redis cache. You can [configure Redis to save snapshots](https://redis.io/topics/persistence) periodically, or run the process manually using the [SAVE](https://redis.io/commands/save) or [BGSAVE](https://redis.io/commands/bgsave) commands. The RDB file is named “dump.rdb” by default and will be located at the path specified in the *redis.conf* configuration file.
68
67
69
68
> [!NOTE]
70
69
> If you’re migrating data within Azure Managed Redis, see [these instructions on how to export an RDB file](../how-to-import-export-data.md) or use the [PowerShell Export cmdlet](/powershell/module/az.rediscache/export-azrediscache) instead.
71
70
>
72
71
73
-
3. Copy the RDB file to an Azure storage account in the region where your new cache is located. You can use AzCopy for this task.
72
+
1. Copy the RDB file to an Azure storage account in the region where your new cache is located. You can use AzCopy for this task.
74
73
75
-
4. Import the RDB file into the new cache using these [import instructions](../how-to-import-export-data.md) or the [PowerShell Import cmdlet](/powershell/module/az.rediscache/import-azrediscache).
74
+
1. Import the RDB file into the new cache using these [import instructions](../how-to-import-export-data.md) or the [PowerShell Import cmdlet](/powershell/module/az.rediscache/import-azrediscache).
76
75
77
-
5. Update your application to use the new cache instance.
76
+
1. Update your application to use the new cache instance.
78
77
79
78
### Write to two Redis caches simultaneously during migration period
80
79
81
80
Rather than moving data directly between caches, you may use your application to write data to both an existing cache and a new one you're setting up. The application will still read data from the existing cache initially. When the new cache has the necessary data, you switch the application to that cache and retire the old one. Let's say, for example, you use Redis as a session store and the application sessions are valid for seven days. After writing to the two caches for a week, you'll be certain the new cache contains all non-expired session information. You can safely rely on it from that point onward without concern over data loss.
82
81
83
82
General steps to implement this option are:
84
83
85
-
1. Create a new Azure Managed Redis instance in the premium tier that is the same size as (or bigger than) the existing cache.
84
+
1. Create a new Azure Managed Redis instance that is the same size as (or bigger than) the existing cache.
86
85
87
-
2. Modify application code to write to both the new and the original instances.
86
+
1. Modify application code to write to both the new and the original instances.
88
87
89
-
3. Continue reading data from the original instance until the new instance is sufficiently populated with data.
88
+
1. Continue reading data from the original instance until the new instance is sufficiently populated with data.
90
89
91
-
4. Update the application code to reading and writing from the new instance only.
90
+
1. Update the application code to reading and writing from the new instance only.
92
91
93
-
5. Delete the original instance.
92
+
1. Delete the original instance.
94
93
95
94
### Migrate programmatically
96
95
@@ -104,15 +103,15 @@ General steps to implement this option are:
104
103
105
104
1. Create a VM in the region where the existing cache is located. If your dataset is large, choose a relatively powerful VM to reduce copying time.
106
105
107
-
2. Create a new Azure Managed Redis instance.
106
+
1. Create a new Azure Managed Redis instance.
108
107
109
-
3. Flush data from the new cache to ensure that it's empty. This step is required because the copy tool itself doesn't overwrite any existing key in the target cache.
108
+
1. Flush data from the new cache to ensure that it's empty. This step is required because the copy tool itself doesn't overwrite any existing key in the target cache.
110
109
111
110
> [!IMPORTANT]
112
111
> Make sure to NOT flush from the source cache.
113
112
>
114
113
115
-
4. Use an application such as the open-source tool above to automate the copying of data from the source cache to the target. Remember that the copy process could take a while to complete depending on the size of your dataset.
114
+
1. Use an application such as the open-source tool above to automate the copying of data from the source cache to the target. Remember that the copy process could take a while to complete depending on the size of your dataset.
0 commit comments