Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Azure Redis Migration of Azure Redis Seri

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Following the above, let's discuss the migration problem of Azure Redis. Redis itself provides persistent methods, such as AOF and RDB, but in Azure Redis, AOF and RDB are only supported in Premium versions! So for standard and basic redis, there needs to be a more common migration method. Microsoft officials do not officially provide Azure Redis migration tools, but a big shot of the redis team has written an open source migration tool himself. Let's share it with you this time!

The tool itself is also publicly available on Github. Here is the Github address where we can download the migration tool.

https://github.com/Azure/Azure-China-Migration-Playbook/blob/master/migrate/china-migration-guidance-databases.md

This method is more suitable for Azure cross-Region migration, such as migration of redis from one region to another region. Here is how to use this tool

First of all, let's introduce the experimental environment:

1. Azure Redis Standard, region chinanorth, original address

2. Azure Redis Standard, region chinanorth, destination address

3. Working with a laptop.

Experiment environment is very simple, first download the migration tool on the previous address

In the previous section, we have used random data generation programs to generate more than 2 million pieces of data in batches, which can be viewed through dbsize.

2. You can see that after the download of redis migration tool, it mainly contains the following contents

3. To migrate it is simple, run redis-copy

.\ redis-copy.exe --se mxyredis.redis.cache.chinacloudapi.cn --sa J****= --de mxyredis2.redis.cache.chinacloudapi.cn --da***

Command format is also very simple, just need to enter the original address, the original server key, the target address, the target server key can be

4. There is no output from the command-line tool migration, but you can see that the data volume keeps increasing in the target redis

5. Check the resource monitor of this machine, you can see that this machine and the two redis are connected, and there is traffic in and out, which means that the principle of this tool is to download data from the original redis to the local, and then upload to the target redis! It's not server-to-server direct, so it also means that the speed of migration will be limited by the machine running the migration tool, so if you want to be faster, it's best to create VMs on Azure to run scripts! The experiment also found that the transmission speed through the public network is indeed relatively slow, and less than 1G data is transmitted in an hour.

6. transfer is complete

7. You can see that the two data points are identical! and the migration is complete.

Of course, it should be noted that this tool itself does not support incremental, run again, then all the data will be copied once, have to say, fly in the ointment

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report