forked from docs/doc-exports
DCS UMN 20251222 version
Reviewed-by: Liudmila Denisova <ldenisov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
|
||||
<h1 class="topictitle1">Master/Standby Redis</h1>
|
||||
<div id="body1600250974776"><p id="CacheMasterSlave__p312320720233">This section describes master/standby DCS Redis instances.</p>
|
||||
<div class="note" id="CacheMasterSlave__note67021744211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p157220441816">You cannot upgrade the Redis version for an instance. For example, a master/standby DCS Redis 4.0 instance cannot be upgraded to a master/standby DCS Redis 5.0 instance. If your service requires the features of higher Redis versions, create a DCS Redis instance of a higher version and then migrate data from the old instance to the new one.</p>
|
||||
<div class="note" id="CacheMasterSlave__note67021744211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p157220441816">The major version cannot be upgraded. For example, a master/standby DCS Redis 4.0 instance cannot be upgraded to a master/standby DCS Redis 5.0 one. If your service requires the features of higher Redis versions, create a DCS Redis instance of a higher version and then migrate data from the old instance to the new one.</p>
|
||||
</div></div>
|
||||
<div class="section" id="CacheMasterSlave__section2115135632817"><h4 class="sectiontitle">Features</h4><p id="CacheMasterSlave__p29361111432">Master/Standby DCS instances have higher availability and reliability than single-node DCS instances.</p>
|
||||
<p id="CacheMasterSlave__p152081045174518">Master/Standby DCS instances have the following features:</p>
|
||||
|
||||
@ -2,27 +2,23 @@
|
||||
|
||||
<h1 class="topictitle1">Single-Node Redis</h1>
|
||||
<div id="body1600250973735"><p id="CacheSingleNode__p14829184616197">A single-node DCS Redis instance has only one node and does not support data persistence. They are suitable for cache services that do not require data reliability.</p>
|
||||
<div class="note" id="CacheSingleNode__note5258316142416"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheSingleNode__ul1225591220208"><li id="CacheSingleNode__li925551214201">You cannot upgrade the Redis version of an instance. For example, a single-node DCS instance cannot be upgraded from Redis 4.0 to Redis 5.0. If you need Redis features of later versions, create a DCS Redis instance of a later version and then migrate data from the earlier instance to the new one.</li><li id="CacheSingleNode__li1525561282018">Single-node instances cannot ensure data persistence and do not support manual or scheduled data backup. Exercise caution before using them.</li></ul>
|
||||
<div class="note" id="CacheSingleNode__note5258316142416"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheSingleNode__ul1225591220208"><li id="CacheSingleNode__li925551214201">The major version cannot be upgraded. For example, a single-node DCS Redis 4.0 instance cannot be upgraded to a single-node DCS Redis 5.0 one. If you need Redis features of later versions, create a DCS Redis instance of a later version and then migrate data from the earlier instance to the new one.</li><li id="CacheSingleNode__li1525561282018">Single-node instances cannot ensure data persistence and do not support manual or scheduled data backup. Exercise caution before using them.</li></ul>
|
||||
</div></div>
|
||||
<div class="section" id="CacheSingleNode__section19260552619"><h4 class="sectiontitle">Features</h4><ol id="CacheSingleNode__ol67507623011"><li id="CacheSingleNode__li107501061301">Low system overhead and high QPS<p id="CacheSingleNode__p22461983014"><a name="CacheSingleNode__li107501061301"></a><a name="li107501061301"></a>Single-node instances do not support data synchronization or data persistence, reducing system overhead and supporting higher concurrency. QPS of single-node DCS Redis instances reaches up to 100,000.</p>
|
||||
</li><li id="CacheSingleNode__li77501762306">Process monitoring and automatic fault recovery<p id="CacheSingleNode__p1917103533114"><a name="CacheSingleNode__li77501762306"></a><a name="li77501762306"></a>With an HA monitoring mechanism, if a single-node DCS instance becomes faulty, a new process is started within 30 seconds to resume service provisioning.</p>
|
||||
</li><li id="CacheSingleNode__li975015614309">Out-of-the-box usability and no data persistence<p id="CacheSingleNode__p667242253214"><a name="CacheSingleNode__li975015614309"></a><a name="li975015614309"></a>Single-node DCS instances can be used out of the box because they do not involve data loading. If your service requires high QPS, you can warm up the data beforehand to avoid strong concurrency impact on the backend database.</p>
|
||||
</li><li id="CacheSingleNode__li11291719163215">Low-cost and suitable for development and testing<p id="CacheSingleNode__p763085119554"><a name="CacheSingleNode__li11291719163215"></a><a name="li11291719163215"></a>Single-node instances are 40% cheaper than master/standby DCS instances, suitable for setting up development or testing environments.</p>
|
||||
<div class="section" id="CacheSingleNode__section19260552619"><h4 class="sectiontitle">Features</h4><ol id="CacheSingleNode__ol67507623011"><li id="CacheSingleNode__li11291719163215">Low-cost and suitable for development and testing<p id="CacheSingleNode__p763085119554"><a name="CacheSingleNode__li11291719163215"></a><a name="li11291719163215"></a>Single-node instances are 40% cheaper than master/standby DCS instances, suitable for setting up development or testing environments.</p>
|
||||
</li><li id="CacheSingleNode__li12678143615299">Non-persistent data<p id="CacheSingleNode__p156787362294"><a name="CacheSingleNode__li12678143615299"></a><a name="li12678143615299"></a>Data persistence is not ensured through one master node for single-node instances. The data cannot be backed up.</p>
|
||||
</li></ol>
|
||||
<p id="CacheSingleNode__p188211915114319">In summary, single-node DCS instances support highly concurrent read/write operations, but do not support data persistence. Data will be deleted after instances are restarted or stopped. They are suitable for scenarios which do not require data persistence, such as database front-end caching, to accelerate access and ease the concurrency load off the backend. If the desired data does not exist in the cache, requests will go to the database. When restarting the service or the DCS instance, you can pre-generate cache data from the disk database to relieve pressure on the backend during startup.</p>
|
||||
</div>
|
||||
<div class="section" id="CacheSingleNode__section350919180019"><h4 class="sectiontitle">Architecture</h4><p id="CacheSingleNode__p169821159154813"><a href="#CacheSingleNode__fig15457185394718">Figure 1</a> shows the architecture of single-node DCS Redis instances.</p>
|
||||
<div class="section" id="CacheSingleNode__section350919180019"><h4 class="sectiontitle">Architecture</h4><p id="CacheSingleNode__p169821159154813"><a href="#CacheSingleNode__fig1674742511276">Figure 1</a> shows the architecture of single-node DCS Redis instances.</p>
|
||||
<div class="note" id="CacheSingleNode__note12240134982910"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p11242249122915">To access a DCS Redis 3.0 instance, you must use port 6379. To access a DCS Redis 4.0 or later instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the following architecture, port 6379 is used. If you have customized a port, replace <strong id="CacheSingleNode__b1442135013241">6379</strong> with the actual port.</p>
|
||||
</div></div>
|
||||
<div class="fignone" id="CacheSingleNode__fig15457185394718"><a name="CacheSingleNode__fig15457185394718"></a><a name="fig15457185394718"></a><span class="figcap"><b>Figure 1 </b>Single-node DCS Redis instance architecture</span><br><span><img id="CacheSingleNode__image9134201365216" src="en-us_image_0296784660.png"></span></div>
|
||||
<div class="fignone" id="CacheSingleNode__fig1674742511276"><a name="CacheSingleNode__fig1674742511276"></a><a name="fig1674742511276"></a><span class="figcap"><b>Figure 1 </b>Single-node DCS Redis instance architecture</span><br><span><img class="eddx" id="CacheSingleNode__image12747425102719" src="en-us_image_0000002416373129.png"></span></div>
|
||||
<p id="CacheSingleNode__p153106583326">Architecture description:</p>
|
||||
<ul id="CacheSingleNode__ul1631417191120"><li id="CacheSingleNode__li20179270479"><strong id="CacheSingleNode__b264814218559">VPC</strong><p id="CacheSingleNode__p89401530124718">All server nodes of the instance run in the same VPC.</p>
|
||||
<div class="note" id="CacheSingleNode__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC. For a Redis 3.0 instance, security group rules are required.</p>
|
||||
<div class="note" id="CacheSingleNode__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheSingleNode__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC.</p>
|
||||
</div></div>
|
||||
</li><li id="CacheSingleNode__li017927194718"><strong id="CacheSingleNode__b386793812488">Application</strong><p id="CacheSingleNode__p36064574817">The client of the instance, which is the application running on an Elastic Cloud Server (ECS).</p>
|
||||
<p id="CacheSingleNode__p19314439510">DCS Redis instances are compatible with the Redis protocol, and can be accessed through open-source clients. For details about accessing DCS instances, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</p>
|
||||
</li><li id="CacheSingleNode__li81722784711"><strong id="CacheSingleNode__b18417232969">DCS instance</strong><p id="CacheSingleNode__p18848151812814">A single-node DCS instance, which has only one node and one Redis process.</p>
|
||||
<p id="CacheSingleNode__p74831359122616">DCS monitors the availability of the instance in real time. If the Redis process becomes faulty, DCS starts a new process to resume service provisioning.</p>
|
||||
</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
<h1 class="topictitle1">Identifying Requirements</h1>
|
||||
<div id="body8662426"><p id="PurchasePreparation__en-us_topic_0168497785_p35841666509">Before creating a DCS instance, identify your requirements and complete the following preparations:</p>
|
||||
<ol id="PurchasePreparation__en-us_topic_0168497785_ol8797163185312"><li id="PurchasePreparation__en-us_topic_0168497785_li479893115317">Decide on the required cache engine version.<p id="PurchasePreparation__en-us_topic_0168497785_p1570920515610"><a name="PurchasePreparation__en-us_topic_0168497785_li479893115317"></a><a name="en-us_topic_0168497785_li479893115317"></a>Different Redis versions have different features. For details, see <a href="RedisDifference.html">Comparing Redis Versions</a>.</p>
|
||||
</li><li id="PurchasePreparation__en-us_topic_0168497785_li479873115320">Decide on the required instance type.<p id="PurchasePreparation__en-us_topic_0168497785_p7482257123713"><a name="PurchasePreparation__en-us_topic_0168497785_li479873115320"></a><a name="en-us_topic_0168497785_li479873115320"></a>DCS provides single-node, master/standby, read/write splitting, Proxy Cluster, and Redis Cluster types of instances. Each type has its own architecture. For details about the instance architectures, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
|
||||
<ol id="PurchasePreparation__en-us_topic_0168497785_ol8797163185312"><li id="PurchasePreparation__en-us_topic_0168497785_li479893115317">Decide on the required cache engine version.<p id="PurchasePreparation__en-us_topic_0168497785_p1570920515610"><a name="PurchasePreparation__en-us_topic_0168497785_li479893115317"></a><a name="en-us_topic_0168497785_li479893115317"></a>Different Redis versions have different features. For details, see <a href="RedisDifference.html">Comparing DCS Redis Versions</a>.</p>
|
||||
</li><li id="PurchasePreparation__en-us_topic_0168497785_li479873115320">Decide on the required instance type.<p id="PurchasePreparation__en-us_topic_0168497785_p7482257123713"><a name="PurchasePreparation__en-us_topic_0168497785_li479873115320"></a><a name="en-us_topic_0168497785_li479873115320"></a>DCS provides read/write splitting, single-node, master/standby, Proxy Cluster, and Redis Cluster types of instances. Each type has its own architecture. For details about the instance architectures, see <a href="dcs-pd-200312001.html">DCS Instance Types</a>.</p>
|
||||
</li><li id="PurchasePreparation__en-us_topic_0168497785_li17984375315">Decide on the required instance specification.<p id="PurchasePreparation__p186331251181116"><a name="PurchasePreparation__en-us_topic_0168497785_li17984375315"></a><a name="en-us_topic_0168497785_li17984375315"></a>Each specification specifies the maximum available memory, number of connections, and bandwidth. For details, see <a href="en-us_topic_0054235835.html">DCS Instance Specifications</a>.</p>
|
||||
</li><li id="PurchasePreparation__en-us_topic_0168497785_li187982355319">Decide on the region and whether cross-AZ deployment is required.<p id="PurchasePreparation__en-us_topic_0168497785_p92195185414"><a name="PurchasePreparation__en-us_topic_0168497785_li187982355319"></a><a name="en-us_topic_0168497785_li187982355319"></a>Choose a region closest to your application to reduce latency.</p>
|
||||
<p id="PurchasePreparation__en-us_topic_0168497785_p15928161731110">A region consists of multiple availability zones (AZs) with physically isolated power supplies and networks. Master/Standby, read/write splitting, and cluster DCS instances can be deployed across AZs.</p>
|
||||
<p id="PurchasePreparation__en-us_topic_0168497785_p15928161731110">A region consists of multiple availability zones (AZs) with physically isolated power supplies and networks. Master/Standby, read/write splitting, and cluster DCS instances can be deployed across AZs. Applications can also be deployed across AZs to achieve HA for both data and applications.</p>
|
||||
<div class="note" id="PurchasePreparation__en-us_topic_0168497785_note6826904912"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="PurchasePreparation__en-us_topic_0168497785_ul3826100994"><li id="PurchasePreparation__en-us_topic_0168497785_li0826200195">If a master/standby, read/write splitting, or cluster DCS instance is deployed across AZs, faults in an AZ do not affect cache nodes in other AZs. This is because when the master node is faulty, the standby cache node will automatically become the master node to provide services. Such deployment achieves better disaster recovery.</li><li id="PurchasePreparation__en-us_topic_0168497785_li182617019920">Deploying a DCS instance across AZs slightly reduces network efficiency compared with deploying an instance within an AZ. Therefore, if a DCS instance is deployed across AZs, synchronization between master and standby cache nodes is slightly less efficient.</li></ul>
|
||||
</div></div>
|
||||
</li><li id="PurchasePreparation__en-us_topic_0168497785_li279803125315">Decide whether backup policies are required.<p id="PurchasePreparation__p15224832164414"><a name="PurchasePreparation__en-us_topic_0168497785_li279803125315"></a><a name="en-us_topic_0168497785_li279803125315"></a>Currently, backup restoration policies can be configured for instances other than single-node ones. For details about backup and restoration, see <a href="en-us_topic_0079835992.html">Overview</a>.</p>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<h1 class="topictitle1">Comparing Redis Versions</h1>
|
||||
<div id="body8662426"><p id="RedisDifference__en-us_topic_0147231413_p17821915171115">When creating a DCS Redis instance, you can select the cache engine version and the instance type.</p>
|
||||
<ul id="RedisDifference__en-us_topic_0147231413_ul0128672131"><li id="RedisDifference__en-us_topic_0147231413_li17128775131"><strong id="RedisDifference__en-us_topic_0147231413_b10691123654311">Version</strong><p id="RedisDifference__en-us_topic_0147231413_p48271921131515">DCS supports Redis 3.0/4.0/5.0/6.0<span id="RedisDifference__text1227912251543">/7.0</span>. The following table describes the differences between these versions.</p>
|
||||
<ul id="RedisDifference__en-us_topic_0147231413_ul0128672131"><li id="RedisDifference__en-us_topic_0147231413_li17128775131"><strong id="RedisDifference__en-us_topic_0147231413_b10691123654311">Version</strong><p id="RedisDifference__en-us_topic_0147231413_p48271921131515">DCS supports Redis 3.0/4.0/5.0/6.0/7.0. The following table describes the differences between these versions.</p>
|
||||
|
||||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RedisDifference__en-us_topic_0147231413_table3788103816552" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Differences between Redis versions</caption><thead align="left"><tr id="RedisDifference__en-us_topic_0147231413_row478910381556"><th align="left" class="cellrowborder" valign="top" width="9.919008099190082%" id="mcps1.3.2.1.3.2.5.1.1"><p id="RedisDifference__en-us_topic_0147231413_p3789193875510">Feature</p>
|
||||
</th>
|
||||
@ -10,7 +10,7 @@
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="36.65633436656334%" id="mcps1.3.2.1.3.2.5.1.3"><p id="RedisDifference__en-us_topic_0147231413_p10790938135520">Redis 4.0 and Redis 5.0</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="27.577242275772424%" id="mcps1.3.2.1.3.2.5.1.4"><p id="RedisDifference__p954021115310">Redis 6.0<span id="RedisDifference__text1551305575513">/7.0</span></p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="27.577242275772424%" id="mcps1.3.2.1.3.2.5.1.4"><p id="RedisDifference__p954021115310">Redis 6.0/7.0</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -63,7 +63,7 @@
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="25.847415258474154%" headers="mcps1.3.2.1.3.2.5.1.2 "><p id="RedisDifference__en-us_topic_0147231413_p1279023812559">Single-node, master/standby, and Proxy Cluster</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p4790438135511">Single-node, master/standby, Proxy Cluster, read/write splitting, and Redis Cluster</p>
|
||||
<td class="cellrowborder" valign="top" width="36.65633436656334%" headers="mcps1.3.2.1.3.2.5.1.3 "><p id="RedisDifference__en-us_topic_0147231413_p4790438135511">Single-node, read/write splitting, master/standby, Proxy Cluster, and Redis Cluster</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p1154061195320">Single-node, master/standby, and Redis Cluster</p>
|
||||
</td>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="TagManagement__section184051819123810"><h4 class="sectiontitle">Procedure</h4><ol id="TagManagement__ol546918324217"><li id="TagManagement__li1799392835619"><span>Log in to the DCS console.</span></li><li id="TagManagement__li19668467518"><span>Click <span><img id="TagManagement__image118901444113" src="en-us_image_0143929918.png"></span> in the upper left corner and select a region and a project.</span></li><li id="TagManagement__li18411387341"><span>In the navigation pane, choose <span class="uicontrol" id="TagManagement__uicontrol145491045164318"><b>Cache Manager</b></span>.</span></li></ol><ol start="4" id="TagManagement__ol3625154473819"><li id="TagManagement__li19501824184620"><span>Click the name of an instance.</span></li><li id="TagManagement__li189991214141019"><span>Choose <strong id="TagManagement__b104560562919">Instance Configuration</strong> > <strong id="TagManagement__b1015610111013">Tags</strong>.</span><p><p id="TagManagement__p16898133410247">View the tags of the instance.</p>
|
||||
<div class="section" id="TagManagement__section184051819123810"><h4 class="sectiontitle">Procedure</h4><ol id="TagManagement__ol546918324217"><li id="TagManagement__li1799392835619"><span>Log in to the DCS console.</span></li><li id="TagManagement__li19668467518"><span>Click <span><img id="TagManagement__image118901444113" src="en-us_image_0143929918.png"></span> in the upper left corner and select a region and a project.</span></li><li id="TagManagement__li18411387341"><span>In the navigation pane, choose <strong id="TagManagement__b858013427414">Cache Manager</strong>.</span></li></ol><ol start="4" id="TagManagement__ol3625154473819"><li id="TagManagement__li19501824184620"><span>Click the name of an instance.</span></li><li id="TagManagement__li189991214141019"><span>Choose <strong id="TagManagement__b104560562919">Instance Configuration</strong> > <strong id="TagManagement__b1015610111013">Tags</strong>.</span><p><p id="TagManagement__p16898133410247">View the tags of the instance.</p>
|
||||
</p></li><li id="TagManagement__li658882719391"><span>Perform the following operations as required:</span><p><ul id="TagManagement__ul16826112920406"><li id="TagManagement__li482619297402">Add a tag<ol type="a" id="TagManagement__ol17680111725217"><li id="TagManagement__li2068081725212">Click <strong id="TagManagement__b15344451175319">Add/Edit Tag</strong>. You can create new tags by entering <strong id="TagManagement__b194957209348">Tag key</strong> and <strong id="TagManagement__b349510208346">Tag value</strong>.<p id="TagManagement__p204582911522">If you have created predefined tags, select a predefined pair of tag key and value. To view predefined tags or create tags, click <strong id="TagManagement__b4645113574819">View predefined tags</strong>. You will be directed to the TMS console.</p>
|
||||
</li><li id="TagManagement__li187061836205217">Click <strong id="TagManagement__b1720916342491">OK</strong>.</li></ol>
|
||||
</li><li id="TagManagement__li29623919408">Modify a tag<p id="TagManagement__p78321156282"><a name="TagManagement__li29623919408"></a><a name="li29623919408"></a>Click <strong id="TagManagement__b112595814535">Add/Edit Tag</strong>. In the displayed <strong id="TagManagement__b12251558165319">Add/Edit Tag</strong> dialog box, delete the desired key, add the key again, enter a new tag value, and click <strong id="TagManagement__b7251258115310">Add</strong>.</p>
|
||||
|
||||
17
docs/dcs/umn/dcs-faq-020220331.html
Normal file
17
docs/dcs/umn/dcs-faq-020220331.html
Normal file
@ -0,0 +1,17 @@
|
||||
<a name="dcs-faq-020220331"></a><a name="dcs-faq-020220331"></a>
|
||||
|
||||
<h1 class="topictitle1">How Do I Create a Multi-DB Proxy Cluster Instance?</h1>
|
||||
<div id="body8662426"><p id="dcs-faq-020220331__en-us_topic_0000001227436488_p8060118">When you create a Proxy Cluster instance, there is only one database by default. This section describes how to create a Proxy Cluster instance with multiple databases.</p>
|
||||
<div class="note" id="dcs-faq-020220331__en-us_topic_0000001227436488_note4510165741711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-020220331__en-us_topic_0000001227436488_p1051025711715">Before getting started, learn about <a href="dcs-faq-210804001.html">the constraints on implementing multi-DB</a>.</p>
|
||||
</div></div>
|
||||
<ol id="dcs-faq-020220331__en-us_topic_0000001227436488_ol51961630134214"><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li123026241736"><span>Log in to the DCS console.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li12619749967"><span>Click <span><img id="dcs-faq-020220331__en-us_topic_0000001227436488_i0d8b8411c49244f694e4f9ebeef4b3c5" src="en-us_image_0000001227937166.png"></span> in the upper left corner to select a region.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li78128421108"><span>In the navigation pane, choose <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b55344183016">Parameter Templates</strong>.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li110442415511"><span>In the row that contains the template with the desired cache engine version and instance type (Proxy Cluster), click <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b182231083111">Customize</strong>.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li5253667511"><span>Set <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b247719193214">multi-db</strong> to <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b172721357325">yes</strong>.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li118501628337"><span>Enter a new template name and click <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b142111411183213">OK</strong>. The custom template is created successfully.</span></li><li id="dcs-faq-020220331__en-us_topic_0000001227436488_li16902576316"><span>In the navigation pane, choose <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b15849725203220">Cache Manager</strong>. Then click Create DCS Instance to create a Proxy Cluster instance.</span><p><p id="dcs-faq-020220331__en-us_topic_0000001227436488_p166578434213">Set <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b42081720133311">Parameter Configuration</strong> to <strong id="dcs-faq-020220331__en-us_topic_0000001227436488_b7244623113320">Use custom template</strong> and select the custom template created in the preceding step.</p>
|
||||
<p id="dcs-faq-020220331__en-us_topic_0000001227436488_p1788816131231"><span><img id="dcs-faq-020220331__en-us_topic_0000001227436488_image19888121312313" src="en-us_image_0000002477627670.png"></span></p>
|
||||
<p id="dcs-faq-020220331__en-us_topic_0000001227436488_p157710399815">After the instance is created, connect to it to check whether it has multiple databases.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730018.html">Why Is Available Memory Smaller Than Instance Cache Size?</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730019.html">Does DCS for Redis Support Multiple Databases?</a></strong><br>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0427028.html">Does DCS for Redis Support Multi-DB?</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730020.html">Does DCS for Redis Support Redis Clusters?</a></strong><br>
|
||||
</li>
|
||||
@ -44,10 +44,14 @@
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-210409001.html">Why Does a Key Disappear in Redis?</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-210804001.html">Notes and Procedure for Enabling Multi-DB for Proxy Cluster Instances</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-211228001.html">Explaining and Using Hash Tags</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0220330.html">Will Cached Data Be Retained After an Instance Is Restarted?</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-020220331.html">How Do I Create a Multi-DB Proxy Cluster Instance?</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="familylinks">
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div id="body8662426"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730043.html">Can DCS Redis Instances Be Upgraded, for Example, from Redis 4.0 to 5.0?</a></strong><br>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730043.html">Can the Major Version of a DCS Redis Instance Be Upgraded, for Example, from Redis 4.0 to 5.0?</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-faq-0730044.html">Are Services Interrupted If Maintenance is Performed During the Maintenance Time Window?</a></strong><br>
|
||||
</li>
|
||||
|
||||
14
docs/dcs/umn/dcs-faq-0427028.html
Normal file
14
docs/dcs/umn/dcs-faq-0427028.html
Normal file
@ -0,0 +1,14 @@
|
||||
<a name="dcs-faq-0427028"></a><a name="dcs-faq-0427028"></a>
|
||||
|
||||
<h1 class="topictitle1">Does DCS for Redis Support Multi-DB?</h1>
|
||||
<div id="body8662426"><p id="dcs-faq-0427028__en-us_topic_0000001152024148_p4890111174719">DCS's support for multiple databases (multi-DB) is as follows:</p>
|
||||
<ul id="dcs-faq-0427028__en-us_topic_0000001152024148_ul2261103124312"><li id="dcs-faq-0427028__en-us_topic_0000001152024148_li426153115432">Single-node, read/write splitting, and master/standby DCS Redis instances: Multi-DB is supported. By default, there are 256 databases, numbering 0–255. The default database is DB0. Multi-DB is used for data isolation. The size of each database is not evenly allocated. As a result, one database may fully occupy the memory of the instance.</li><li id="dcs-faq-0427028__en-us_topic_0000001152024148_li6528121883618">Proxy Cluster: There is only one database by default.<ul id="dcs-faq-0427028__en-us_topic_0000001152024148_ul15961143173618"><li id="dcs-faq-0427028__en-us_topic_0000001152024148_li66301340183619">For details about how to create a Proxy Cluster instance with multiple databases, see <a href="dcs-faq-020220331.html">How Do I Create a Multi-DB Proxy Cluster Instance?</a></li><li id="dcs-faq-0427028__en-us_topic_0000001152024148_li113744489368">For details about how to enable multi-DB for a single-DB Proxy Cluster instance, see <a href="dcs-faq-210804001.html">Notes and Procedure for Enabling Multi-DB for Proxy Cluster Instances</a></li></ul>
|
||||
</li><li id="dcs-faq-0427028__en-us_topic_0000001152024148_li41001237194313">Redis Cluster DCS instances: Multi-DB is not supported. There is only one database (DB0).</li></ul>
|
||||
<p id="dcs-faq-0427028__en-us_topic_0000001152024148_p4861134154218"><strong id="dcs-faq-0427028__en-us_topic_0000001152024148_b188816651816">The number of databases cannot be changed, and the size of each database cannot be customized.</strong></p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<h1 class="topictitle1">How Do I View Current Concurrent Connections and Maximum Connections of a DCS Redis Instance?</h1>
|
||||
<div id="body8662426"><div class="section" id="dcs-faq-0427070__en-us_topic_0000001152024136_section1930172420179"><h4 class="sectiontitle">Viewing Concurrent Connections of a DCS Redis Instance</h4><p id="dcs-faq-0427070__en-us_topic_0000001152024136_p10599203110321">The number of connections received by a DCS instance is a metric that is monitored by Cloud Eye. For details on how to view metrics, see <a href="dcs-ug-0312045.html">Viewing DCS Monitoring Metrics</a>.</p>
|
||||
<p id="dcs-faq-0427070__en-us_topic_0000001152024136_p6675918164416">On the Cloud Eye console, find the <strong id="dcs-faq-0427070__en-us_topic_0000001152024136_b244683293117">Connected Clients</strong> metric. Click <span><img id="dcs-faq-0427070__en-us_topic_0000001152024136_image13301111610473" src="en-us_image_0000001383077054.png"></span> to view monitoring details on an enlarged graph.</p>
|
||||
<p id="dcs-faq-0427070__en-us_topic_0000001152024136_p6675918164416">On the Cloud Eye console, find the <strong id="dcs-faq-0427070__en-us_topic_0000001152024136_b244683293117">Connected Clients</strong> metric. Click <strong id="dcs-faq-0427070__b6969165620186"></strong><span><img id="dcs-faq-0427070__en-us_topic_0000001152024136_image13301111610473" src="en-us_image_0000001383077054.png"></span> to view monitoring details on an enlarged graph.</p>
|
||||
<p id="dcs-faq-0427070__en-us_topic_0000001152024136_p1087210448476">Specify a time range to view the metric in a specific monitoring period. For example, you can select a 10-minute period to view the number of connections received during the period. On the graph, you can view the trend and the total number of connections received during the period.</p>
|
||||
<div class="p" id="dcs-faq-0427070__en-us_topic_0000001152024136_p363521310447">On the Cloud Eye console, you can also view other monitoring metrics of your DCS instances, for example:<ul id="dcs-faq-0427070__en-us_topic_0000001152024136_ul10189131214415"><li id="dcs-faq-0427070__en-us_topic_0000001152024136_li111881312104413">CPU Usage</li><li id="dcs-faq-0427070__en-us_topic_0000001152024136_li1618920126442">Memory Usage</li><li id="dcs-faq-0427070__en-us_topic_0000001152024136_li3189131218449">Used Memory</li><li id="dcs-faq-0427070__en-us_topic_0000001152024136_li19189171217445">Ops per Second</li></ul>
|
||||
</div>
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
<h1 class="topictitle1">Why Is the Rejected Connections Metric Displayed?</h1>
|
||||
<div id="body8662426"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p490381214435">If the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b123141047143011">Rejected Connections</strong> metric is displayed, check if the number of connected clients exceeds the maximum allowed number of connections of the instances.</p>
|
||||
<div class="note" id="dcs-faq-0603001__en-us_topic_0000001198023693_note14590113901411"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1759183951415">The <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b115411912143419">Rejected Connections</strong> metric of data nodes can be checked only for master/standby, cluster, and read/write splitting DCS Redis 4.0/5.0/6.0 instances.</p>
|
||||
<div class="note" id="dcs-faq-0603001__en-us_topic_0000001198023693_note14590113901411"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1759183951415">The <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b115411912143419">Rejected Connections</strong> metric of data nodes can be checked only for master/standby, cluster, and read/write splitting DCS Redis 4.0 and later instances.</p>
|
||||
</div></div>
|
||||
<ul id="dcs-faq-0603001__en-us_topic_0000001198023693_ul62821695257"><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li3282899258">To check the maximum number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b8297181416395">Parameters</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b12754617193911">maxclients</strong> metric. (Currently, read/write splitting instances do not have this parameter. To query the maximum connections of them, see .)</li><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li92826922519">To check the current number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b25901273816">Performance Monitoring</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b1859012271981">Connected Clients</strong> metric.</li></ul>
|
||||
<p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1375612232417">If the current number of connections reaches the upper limit, you can adjust the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b21271135920">maxclients</strong>. If the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b7602223799">maxclients</strong> can no longer be increased, increase the instance specifications.</p>
|
||||
<ul id="dcs-faq-0603001__en-us_topic_0000001198023693_ul62821695257"><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li3282899258">To check the maximum number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b531429202810">Instance</strong> > <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b458053062414">Parameters</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b1558093002414">maxclients</strong> metric. (Currently, read/write splitting instances do not have this parameter. To query the maximum connections of them, see <a href="en-us_topic_0054235835.html">DCS Instance Specifications</a>.)</li><li id="dcs-faq-0603001__en-us_topic_0000001198023693_li92826922519">To check the current number of connections, go to the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b25901273816">Performance Monitoring</strong> tab page of the instance and check the <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b1859012271981">Connected Clients</strong> metric.</li></ul>
|
||||
<p id="dcs-faq-0603001__en-us_topic_0000001198023693_p1375612232417">If the current number of connections reaches the upper limit, you can adjust the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b21271135920">maxclients</strong>. If the value of <strong id="dcs-faq-0603001__en-us_topic_0000001198023693_b7602223799">maxclients</strong> can no longer be increased, consider adding shards.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<ol id="dcs-faq-0730006__en-us_topic_0152099099_ol980141914912"><li id="dcs-faq-0730006__en-us_topic_0152099099_li10802819590"><span>Network</span><p><ol type="a" id="dcs-faq-0730006__en-us_topic_0152099099_ol4963821184719"><li id="dcs-faq-0730006__en-us_topic_0152099099_li3963182119479">Check the IP address configurations.<p id="dcs-faq-0730006__en-us_topic_0152099099_p173211526174712"><a name="dcs-faq-0730006__en-us_topic_0152099099_li3963182119479"></a><a name="en-us_topic_0152099099_li3963182119479"></a>Check whether the IP address configured on the <span class="keyword" id="dcs-faq-0730006__keyword16398923458">Jedis client</span> is the same as the subnet address configured for your DCS instance.</p>
|
||||
</li><li id="dcs-faq-0730006__en-us_topic_0152099099_li99631217478">Test the network.<p id="dcs-faq-0730006__en-us_topic_0152099099_p113161961483"><a name="dcs-faq-0730006__en-us_topic_0152099099_li99631217478"></a><a name="en-us_topic_0152099099_li99631217478"></a>Use the ping command and telnet on the client to test the network.</p>
|
||||
<ul id="dcs-faq-0730006__en-us_topic_0152099099_ul97951811705"><li id="dcs-faq-0730006__en-us_topic_0152099099_li6637143813114">If the network cannot be pinged:<p id="dcs-faq-0730006__p8645128191212"><a name="dcs-faq-0730006__en-us_topic_0152099099_li6637143813114"></a><a name="en-us_topic_0152099099_li6637143813114"></a>For intra-VPC access to a DCS Redis 3.0 instance, ensure that the client and your DCS instance belong to the same VPC and security group, or the security group of your DCS instance allows access through port 6379. For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
<p id="dcs-faq-0730006__p52124017351">For intra-VPC access to a DCS Redis instance, ensure that the client and your DCS instance belong to the same VPC.</p>
|
||||
</li><li id="dcs-faq-0730006__en-us_topic_0152099099_li1799555071112">If the IP address can be pinged but telnet failed, restart your instance. If the problem persists after the restart, contact technical support.</li></ul>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-faq-0730006__en-us_topic_0152099099_li63411545691"><span>Check the number of connections.</span><p><p id="dcs-faq-0730006__en-us_topic_0152099099_p1594544203317">Check whether the number of established network connections exceeds the upper limit configured for the Jedis connection pool. If the number of established connections approaches the configured upper limit, restart the DCS service and check whether the problem persists. If the number of established connections is far below the upper limit, continue with the following checks.</p>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div id="body1596093268949"><p id="dcs-faq-0730007__en-us_topic_0152099099_p196719695311">The possible causes are as follows:</p>
|
||||
<ol id="dcs-faq-0730007__en-us_topic_0152099099_ol02571317120"><li id="dcs-faq-0730007__en-us_topic_0152099099_li32514137117">The command is spelled incorrectly.<p id="dcs-faq-0730007__en-us_topic_0152099099_p1793654714211"><a name="dcs-faq-0730007__en-us_topic_0152099099_li32514137117"></a><a name="en-us_topic_0152099099_li32514137117"></a>As shown in the following figure, the error message is returned because the correct command for deleting a string should be <strong id="dcs-faq-0730007__b11197171545219">del</strong>.</p>
|
||||
<p id="dcs-faq-0730007__en-us_topic_0152099099_p12522551218"><span><img id="dcs-faq-0730007__en-us_topic_0152099099_image58393378210" src="en-us_image_0266315616.png"></span></p>
|
||||
</li><li id="dcs-faq-0730007__en-us_topic_0152099099_li225141316111">A command available in a higher Redis version is run in a lower Redis version.<p id="dcs-faq-0730007__en-us_topic_0152099099_p837784381913"><a name="dcs-faq-0730007__en-us_topic_0152099099_li225141316111"></a><a name="en-us_topic_0152099099_li225141316111"></a>As shown in the following figure, the error message is returned because a stream command (available in Redis 5.0) is run in Redis 3.0.</p>
|
||||
</li><li id="dcs-faq-0730007__en-us_topic_0152099099_li225141316111">A command available in a higher Redis version is run in a lower Redis version.<p id="dcs-faq-0730007__en-us_topic_0152099099_p837784381913"><a name="dcs-faq-0730007__en-us_topic_0152099099_li225141316111"></a><a name="en-us_topic_0152099099_li225141316111"></a>For example, the error message is returned because a stream command (available in Redis 5.0) is run in Redis 3.0.</p>
|
||||
<p id="dcs-faq-0730007__en-us_topic_0152099099_p667431195"><span><img id="dcs-faq-0730007__en-us_topic_0152099099_image164815412710" src="en-us_image_0266315617.png"></span></p>
|
||||
</li><li id="dcs-faq-0730007__en-us_topic_0152099099_li525713517">Some commands are disabled.<p id="dcs-faq-0730007__en-us_topic_0152099099_p4666647102019"><a name="dcs-faq-0730007__en-us_topic_0152099099_li525713517"></a><a name="en-us_topic_0152099099_li525713517"></a>DCS Redis instance interfaces are fully compatible with the open-source Redis in terms of data access. However, for ease of use and security purposes, some operations cannot be initiated through Redis clients. For details about disabled commands, see <a href="dcs-pd-200312003.html">Command Compatibility</a>.</p>
|
||||
</li></ol>
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<div id="body1596093268949"><ul id="dcs-faq-0730012__en-us_topic_0152099097_ul16254164916516"><li id="dcs-faq-0730012__en-us_topic_0152099097_li17255114919516">Possible cause 1:<p id="dcs-faq-0730012__en-us_topic_0152099097_p11315175219510"><a name="dcs-faq-0730012__en-us_topic_0152099097_li17255114919516"></a><a name="en-us_topic_0152099097_li17255114919516"></a>The service QPS is so high that the CPU usage spikes to 100%.</p>
|
||||
</li></ul>
|
||||
<ul id="dcs-faq-0730012__en-us_topic_0152099097_ul1025594945113"><li id="dcs-faq-0730012__en-us_topic_0152099097_li725544919512">Possible cause 2:<p id="dcs-faq-0730012__en-us_topic_0152099097_p35242546516"><a name="dcs-faq-0730012__en-us_topic_0152099097_li725544919512"></a><a name="en-us_topic_0152099097_li725544919512"></a>You have run commands that consume a lot of resources, such as <strong id="dcs-faq-0730012__b16727328107">KEYS</strong>. This will make CPU usage spike and can easily trigger a master/standby switchover.</p>
|
||||
</li><li id="dcs-faq-0730012__li14684175117365">Possible cause 3:<p id="dcs-faq-0730012__p646013417379"><a name="dcs-faq-0730012__li14684175117365"></a><a name="li14684175117365"></a>Redis rewrite was triggered, increasing CPU usage.</p>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<a name="dcs-faq-0730019"></a><a name="dcs-faq-0730019"></a>
|
||||
|
||||
<h1 class="topictitle1">Does DCS for Redis Support Multiple Databases?</h1>
|
||||
<div id="body1596093268950"><p id="dcs-faq-0730019__en-us_topic_0152099097_p8060118">Both single-node and master/standby <span class="keyword" id="dcs-faq-0730019__keyword1446512212151">DCS Redis instances support multiple databases</span>. By default, single-node and master/standby DCS instances can read and write data in 256 databases (databases numbering 0–255). The default database is DB0.</p>
|
||||
<p id="dcs-faq-0730019__en-us_topic_0152099097_p4242154222010">Redis Cluster DCS instances do not support multi-DB. There is only one database (DB0).</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="dcs-faq-0730022__section2022722111124"><a name="dcs-faq-0730022__section2022722111124"></a><a name="section2022722111124"></a><h4 class="sectiontitle">Viewing or Changing Eviction Policies</h4><p id="dcs-faq-0730022__p84517544616">You can view or change the eviction policy with the <strong id="dcs-faq-0730022__b102391735142717">maxmemory-policy</strong> parameter.</p>
|
||||
<p id="dcs-faq-0730022__p114731557171317"><span><img id="dcs-faq-0730022__image9472145713132" src="en-us_image_0000001591550122.png"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
</li><li id="dcs-faq-0730026__en-us_topic_0152099097_li1188105085912">Redis 4.0 and later<p id="dcs-faq-0730026__en-us_topic_0152099097_p12318114516310"><a name="dcs-faq-0730026__en-us_topic_0152099097_li1188105085912"></a><a name="en-us_topic_0152099097_li1188105085912"></a>You can specify a port (ranging from 1 to 65535) or use the default port (6379) for accessing an instance. If no port is specified, the default port will be used.</p>
|
||||
</li></ul>
|
||||
<p id="dcs-faq-0730026__p14803202620398">If the instance and the client use different security groups, you must configure access rules for the security groups, allowing access through the specified port. For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
<div class="section" id="dcs-faq-0730026__section1437115203556"><h4 class="sectiontitle">Customizing a Port</h4><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p1273833961320">When creating a DCS Redis 4.0, 5.0, or 6.0 instance, you can enter a port number for <strong id="dcs-faq-0730026__en-us_topic_0000001152024128_b112918395463">IP Address</strong>. If you do not specify a port, the default port 6379 is used.</p>
|
||||
<div class="section" id="dcs-faq-0730026__section1437115203556"><h4 class="sectiontitle">Customizing a Port</h4><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p1273833961320">When creating a DCS Redis 4.0 or later instance, you can enter a port for <strong id="dcs-faq-0730026__en-us_topic_0000001152024128_b112918395463">IP Address</strong>. If you do not specify a port, the default port 6379 is used.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-faq-0730026__section11705172516555"><h4 class="sectiontitle">Changing the Port</h4><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p1328334019314">After a DCS Redis 4.0 or later instance is created, you can change its port.</p>
|
||||
<ol id="dcs-faq-0730026__en-us_topic_0000001152024128_ol1265264643120"><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li4813522103211">In the navigation pane of the DCS console, choose <strong id="dcs-faq-0730026__b1663581420218">Cache Manager</strong>.</li><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li1265284614313">Click a DCS Redis instance.</li><li id="dcs-faq-0730026__en-us_topic_0000001152024128_li913104903219">In the <strong id="dcs-faq-0730026__b1595161919219">Connection</strong> area, click <span><img id="dcs-faq-0730026__en-us_topic_0000001152024128_image2519832134711" src="en-us_image_0000001785451408.png"></span> next to <strong id="dcs-faq-0730026__b0595619142116">Connection Address</strong>.<div class="notice" id="dcs-faq-0730026__en-us_topic_0000001152024128_note1314191813279"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-faq-0730026__en-us_topic_0000001152024128_p01422018172717">After the port is changed, all connections to the Redis instance are interrupted, and services are connected to the new port.</p>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<a name="dcs-faq-0730043"></a><a name="dcs-faq-0730043"></a>
|
||||
|
||||
<h1 class="topictitle1">Can DCS Redis Instances Be Upgraded, for Example, from Redis 4.0 to 5.0?</h1>
|
||||
<div id="body1596093494759"><p id="dcs-faq-0730043__en-us_topic_0152504023_p8865823410">No. Different Redis versions use different underlying architectures. The Redis version used by a DCS instance cannot be changed once the instance is created. For example, you cannot change a DCS Redis 4.0 instance to Redis 5.0. However, you will be informed of any defects or problems found in Redis.</p>
|
||||
<p id="dcs-faq-0730043__en-us_topic_0152504023_p415618863517">If your service requires the features of higher Redis versions, create a DCS Redis instance of a higher version and then migrate data from the original instance to the new one. For details on how to migrate data, see <a href="dcs-ug-0312035.html">Migrating Data with DCS</a>.</p>
|
||||
<h1 class="topictitle1">Can the Major Version of a DCS Redis Instance Be Upgraded, for Example, from Redis 4.0 to 5.0?</h1>
|
||||
<div id="body1596093494759"><p id="dcs-faq-0730043__p3748149194910">No. It is unavailable. Different Redis versions use different underlying architectures. The Redis version used by a DCS instance cannot be changed once the instance is created. For example, you cannot change a DCS Redis 4.0 instance to Redis 5.0. If your service requires the features of higher Redis versions, create a DCS Redis instance of a higher version and then migrate data from the original instance to the new one. For details on how to migrate data, see <a href="dcs-ug-0312035.html">Migrating Data with DCS</a>.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
<h1 class="topictitle1">When Does a Master/Standby Switchover Occur?</h1>
|
||||
<div id="body1596093777162"><p id="dcs-faq-0730058__en-us_topic_0209664638_p1273026135619">A master/standby switchover may occur in the following scenarios:</p>
|
||||
<ul id="dcs-faq-0730058__en-us_topic_0209664638_ul13825740165612"><li id="dcs-faq-0730058__en-us_topic_0209664638_li1182614407563">A master/standby switchover operation is initiated on the DCS Console.</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li68263401567">If the master node of a master/standby instance fails, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__en-us_topic_0209664638_p1493444911524"><a name="dcs-faq-0730058__en-us_topic_0209664638_li68263401567"></a><a name="en-us_topic_0209664638_li68263401567"></a>For example, running commands that consume a lot of resources, such as <strong id="dcs-faq-0730058__b61671835105">KEYS</strong> commands, will cause CPU usage to spike and as result triggers a master/standby switchover.</p>
|
||||
</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li108263402566">If you restart a master/standby instance on the DCS console, a master/standby switchover will be triggered.</li><li id="dcs-faq-0730058__li117061731711">If you scale up a single-node, read/write splitting, or master/standby instance, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__p1761969151711"><a name="dcs-faq-0730058__li117061731711"></a><a name="li117061731711"></a>During scale-up, a new standby node with the new specifications is created. After full and incremental data on the master node is synchronized to the standby node, a master/standby switchover is performed and the original node is deleted.</p>
|
||||
<ul id="dcs-faq-0730058__en-us_topic_0209664638_ul13825740165612"><li id="dcs-faq-0730058__en-us_topic_0209664638_li1182614407563">A master/standby switchover operation is initiated on the DCS Console.</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li68263401567">If the master node of a master/standby instance fails, a master/standby switchover will be triggered.<p id="dcs-faq-0730058__en-us_topic_0209664638_p1493444911524"><a name="dcs-faq-0730058__en-us_topic_0209664638_li68263401567"></a><a name="en-us_topic_0209664638_li68263401567"></a>For example, if commands (such as <strong id="dcs-faq-0730058__b923823815516">KEYS</strong>) that consume a lot of resources are used or logs are aged and deleted in batches, the CPU usage will surge, triggering a master/standby switchover.</p>
|
||||
</li><li id="dcs-faq-0730058__en-us_topic_0209664638_li108263402566">If you restart a master/standby instance on the DCS console, a master/standby switchover will be triggered.</li><li id="dcs-faq-0730058__li117061731711">A master/standby switchover is triggered during Redis instance scale-out.<p id="dcs-faq-0730058__p1761969151711"><a name="dcs-faq-0730058__li117061731711"></a><a name="li117061731711"></a>During scale-up, a new standby node with the new specifications is created. After full and incremental data on the master node is synchronized to the standby node, a master/standby switchover is performed and the original node is deleted.</p>
|
||||
</li></ul>
|
||||
<p id="dcs-faq-0730058__en-us_topic_0209664638_p151011145582">After a master/standby switchover occurs, you will receive a notification. Check whether the client services are running properly. If not, check whether the TCP connection is normal and whether it can be re-established after the master/standby switchover to restore the services.</p>
|
||||
<p id="dcs-faq-0730058__en-us_topic_0209664638_p151011145582">To monitor master/standby switchovers of instances, create event monitoring on Cloud Eye. Then, the system reports master/standby switchovers based on event alarm rules. Check whether the client services are abnormal if needed. If the services are abnormal, check whether the client connections are normal, and whether client connections can be retried after master/standby switchovers. Restart the client if the connections cannot be retried.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
|
||||
21
docs/dcs/umn/dcs-faq-210804001.html
Normal file
21
docs/dcs/umn/dcs-faq-210804001.html
Normal file
@ -0,0 +1,21 @@
|
||||
<a name="dcs-faq-210804001"></a><a name="dcs-faq-210804001"></a>
|
||||
|
||||
<h1 class="topictitle1">Notes and Procedure for Enabling Multi-DB for Proxy Cluster Instances</h1>
|
||||
<div id="body8662426"><p id="dcs-faq-210804001__en-us_topic_0000001152183958_p8060118">Note the following constraints when you consider implementing multi-DB:</p>
|
||||
<ul id="dcs-faq-210804001__en-us_topic_0000001152183958_ul5103841123310"><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li16103194193319"><strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b132961814163214">Usage constraints:</strong><ol id="dcs-faq-210804001__en-us_topic_0000001152183958_ol6547251334"><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li4547852339">The <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b62613642655622">SWAPDB</strong> command does not support multi-DB.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li11547175193317">The <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b2210166355622">INFO KEYSPACE</strong> command does not return data of multi-DB.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li354715553318">To query the total number of keys in each database, use the customized <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b117974185055622">dbstats</strong> command. CPU usage will surge on the node executing this command.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li1054810514332">LUA scripts do not support multi-DB.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li15481255336">The <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b31632947855622">RANDOMKEY</strong> command does not support multi-DB.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li1862743413308"><strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b448313313271">PUBLISH</strong> cannot be used in Lua scripts.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li53091731804">The database number ranges from 0 to 255.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li447381201016">Proxy Cluster DCS Redis 3.0 instances do not support multi-DB.</li></ol>
|
||||
</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li12498195413315"><strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b11791185814333">Performance constraints</strong><ol id="dcs-faq-210804001__en-us_topic_0000001152183958_ol10447141710347"><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li204471617153419">The <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b40385872855622">FLUSHDB</strong> command deletes keys one by one, which takes a long time and is slower than the open-source native implementation. The execution speed of the <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b212459732955622">FLUSHDB</strong> command is the same as that of the <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b173962084455622">SCAN</strong> command (which should be tested by the customer).</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li184471017103411">The <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b148614930055622">DBSIZE</strong> command is time-consuming. Do not use it in the code.</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li12447101773416">If multi-DB is used, the performance of the <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b212170021355622">KEYS</strong> and <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b156243996955622">SCAN</strong> commands deteriorates by up to 50%.</li></ol>
|
||||
</li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li128541551203411"><strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b148423473341">Other constraints</strong>:<p id="dcs-faq-210804001__en-us_topic_0000001152183958_p12681163811353">The backend storage rewrites keys based on certain rules. Keys in the exported RDB file are not the original keys. However, the access through the Redis protocol is not affected.</p>
|
||||
</li></ul>
|
||||
<div class="section" id="dcs-faq-210804001__en-us_topic_0000001152183958_section890810290012"><h4 class="sectiontitle">Procedure for Enabling or Disabling Multi-DB</h4><p id="dcs-faq-210804001__en-us_topic_0000001152183958_p1386611375119">By default, a Proxy Cluster instance is not enabled with multi-DB, but you can do as follows to enable multi-DB.</p>
|
||||
<ol id="dcs-faq-210804001__en-us_topic_0000001152183958_ol592811525012"><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li69281452700"><span>Log in to the DCS console.</span></li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li027717139111"><span>Connect to the instance and run the <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b16943141479">FLUSHALL</strong> command to clear the instance data.</span><p><div class="note" id="dcs-faq-210804001__en-us_topic_0000001152183958_note7239710163516"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-210804001__en-us_topic_0000001152183958_p10239141016357">Before enabling or disabling multi-DB, ensure that all instance data is cleared and no data is being written.</p>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li1263613211790"><span>On the <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b168097243755622">Cache Manager</strong> page of the DCS console, click the desired DCS instance.</span></li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li1944565216912"><span>Choose <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b132728498855622">Instance Configuration</strong> > <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b190749762155622">Parameters</strong>.</span></li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li1831115284231"><span>To enable multi-DB, click <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b16595105952515">Modify</strong> in the row that contains parameter <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b89770117655622">multi-db</strong>, and change its value to <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b145199016255622">yes</strong>.</span><p><p id="dcs-faq-210804001__en-us_topic_0000001152183958_p221851619560">To disable multi-DB, change the value to <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b889215244426">no</strong>.</p>
|
||||
</p></li><li id="dcs-faq-210804001__en-us_topic_0000001152183958_li53894271919"><span>Click <strong id="dcs-faq-210804001__en-us_topic_0000001152183958_b89409794255622">Save</strong> and then confirm the modification. The instance does not need to be restarted.</span></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<h1 class="topictitle1">Is the Read-only Address of a Master/Standby Instance Connected to the Master or Standby Node?</h1>
|
||||
<div id="body8662426"><p id="dcs-faq-221222__en-us_topic_0000001431664584_p8060118">A master/standby DCS Redis 4.0 or later instance has a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b148059329615">Connection Address</strong> and a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b1180533218611">Read-only Address</strong>. The connection address is used to connect to the master node of the instance, and the read-only address is used to connect to the standby node of the instance.</p>
|
||||
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p99251850144516">For details, see <a href="CacheMasterSlave.html#CacheMasterSlave__section5805185095215">Architecture of Master/Standby DCS Redis Instances</a>.</p>
|
||||
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p99251850144516">For more information, see <a href="CacheMasterSlave.html#CacheMasterSlave__section5805185095215">Architecture of Master/Standby DCS Redis Instances</a>.</p>
|
||||
<div class="fignone" id="dcs-faq-221222__en-us_topic_0000001431664584_fig1636541875315"><span class="figcap"><b>Figure 1 </b>Instance addresses</span><br><span><img id="dcs-faq-221222__en-us_topic_0000001431664584_image336621810537" src="en-us_image_0000001431665772.png"></span></div>
|
||||
<p id="dcs-faq-221222__en-us_topic_0000001431664584_p4769144185313">By default, the client reads and writes data on the master node. Data is synchronized to the standby node. To implement read/write splitting, ensure that your client can distinguish between read and write requests. The client directs write requests to the read/write domain name and read requests to the read-only domain name.</p>
|
||||
</div>
|
||||
|
||||
@ -24,36 +24,36 @@ vi nginx.conf</pre>
|
||||
</li><li id="dcs-migrate-0220411__li06401357104818">Example forwarding configuration:<pre class="screen" id="dcs-migrate-0220411__screen34331446184818">stream {
|
||||
server {
|
||||
listen 6379;
|
||||
proxy_pass {source_instance_address}:{port};
|
||||
proxy_pass <em id="dcs-migrate-0220411__i36841015588">{source_instance_address}:{port}</em>;
|
||||
}
|
||||
}</pre>
|
||||
<p id="dcs-migrate-0220411__p232810156114"><strong id="dcs-migrate-0220411__b17662158131214">6379</strong> is the listening port of the source forwarding server. <em id="dcs-migrate-0220411__i437151691218">{source_instance_address}</em> and <em id="dcs-migrate-0220411__i18885102313128">{port}</em> are the connection address and port of the source Redis instance.</p>
|
||||
<p id="dcs-migrate-0220411__p474124917547">This configuration allows you to access the source Redis through the local listening port 6379 of the source forwarding server.</p>
|
||||
<p id="dcs-migrate-0220411__p0452103812178">This configuration must be added exactly where it is shown in the following figure.</p>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig42351341142517"><span class="figcap"><b>Figure 2 </b>Configuration location</span><br><span><img id="dcs-migrate-0220411__image162354412253" src="en-us_image_0000001299155037.png"></span></div>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig42351341142517"><span class="figcap"><b>Figure 2 </b>Configuration location 1</span><br><span><img id="dcs-migrate-0220411__image162354412253" src="en-us_image_0000001299155037.png"></span></div>
|
||||
</li><li id="dcs-migrate-0220411__li1416762953011">Restart Nginx.<pre class="screen" id="dcs-migrate-0220411__screen182391643118">service nginx restart</pre>
|
||||
</li><li id="dcs-migrate-0220411__li1334411452304">Verify whether Nginx has been started.<pre class="screen" id="dcs-migrate-0220411__screen366531193118">netstat -an|grep 6379</pre>
|
||||
<p id="dcs-migrate-0220411__p593853532713">If the port is being listened, Nginx has been started successfully.</p>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig15433124613489"><span class="figcap"><b>Figure 3 </b>Verification result</span><br><span><img id="dcs-migrate-0220411__image1243324614819" src="en-us_image_0000001299513869.png"></span></div>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig15433124613489"><span class="figcap"><b>Figure 3 </b>Verification result 1</span><br><span><img id="dcs-migrate-0220411__image1243324614819" src="en-us_image_0000001299513869.png"></span></div>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-migrate-0220411__li107681114289"><span>Configure Nginx forwarding for the ECS.</span><p><ol type="a" id="dcs-migrate-0220411__ol1151616220369"><li id="dcs-migrate-0220411__li10516172263616">Log in to the Linux ECS and run the following commands to open and modify the configuration file:<pre class="screen" id="dcs-migrate-0220411__screen3530192115614">cd /etc/nginx
|
||||
vi nginx.conf</pre>
|
||||
</li><li id="dcs-migrate-0220411__li28611116103716">Configuration example:<pre class="screen" id="dcs-migrate-0220411__screen1418219241098">stream {
|
||||
server {
|
||||
listen 6666;
|
||||
proxy_pass {source_ecs_address}:6379;
|
||||
proxy_pass <em id="dcs-migrate-0220411__i182701414125818">{source_ecs_address}</em>:6379;
|
||||
}
|
||||
}</pre>
|
||||
<p id="dcs-migrate-0220411__p52110532392"><strong id="dcs-migrate-0220411__b1624173815217">6666</strong> is ECS's listening port, <em id="dcs-migrate-0220411__i216411091914">{source_ecs_address}</em> is the public IP address of the source forwarding server, and <strong id="dcs-migrate-0220411__b1672424382111">6379</strong> is the listening port of the source forwarding server Nginx.</p>
|
||||
<p id="dcs-migrate-0220411__p2911729182613">This configuration allows you to access the source forwarding server through the local listening port 6666 of the ECS.</p>
|
||||
<p id="dcs-migrate-0220411__p15629194810343">This configuration must be added exactly where it is shown in the following figure.</p>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig262974853410"><span class="figcap"><b>Figure 4 </b>Configuration location</span><br><span><img id="dcs-migrate-0220411__image76291748143412" src="en-us_image_0000001299274493.png"></span></div>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig262974853410"><span class="figcap"><b>Figure 4 </b>Configuration location 2</span><br><span><img id="dcs-migrate-0220411__image76291748143412" src="en-us_image_0000001299274493.png"></span></div>
|
||||
</li><li id="dcs-migrate-0220411__li11629448133418">Restart Nginx.<pre class="screen" id="dcs-migrate-0220411__screen5629154873411">service nginx restart</pre>
|
||||
</li><li id="dcs-migrate-0220411__li7629248173410">Verify whether Nginx has been started.<pre class="screen" id="dcs-migrate-0220411__screen1562954833418">netstat -an|grep 6666</pre>
|
||||
<p id="dcs-migrate-0220411__p1459184772816">If the port is being listened, Nginx has been started successfully.</p>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig52972206350"><span class="figcap"><b>Figure 5 </b>Verification result</span><br><span><img id="dcs-migrate-0220411__image1129752063519" src="en-us_image_0000001299354449.png"></span></div>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig52972206350"><span class="figcap"><b>Figure 5 </b>Verification result 2</span><br><span><img id="dcs-migrate-0220411__image1129752063519" src="en-us_image_0000001299354449.png"></span></div>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-migrate-0220411__li1629316143413"><span>Run the following command on the ECS to test the network connection of port 6666:</span><p><pre class="screen" id="dcs-migrate-0220411__screen9189230121519">redis-cli -h {target_ecs_address} -p 6666 -a {password}</pre>
|
||||
</p></li><li id="dcs-migrate-0220411__li1629316143413"><span>Run the following command on the ECS to test the network connection of port 6666:</span><p><pre class="screen" id="dcs-migrate-0220411__screen9189230121519">redis-cli -h <em id="dcs-migrate-0220411__i1483714267582">{target_ecs_address}</em> -p 6666 -a <em id="dcs-migrate-0220411__i168291529175812">{password}</em></pre>
|
||||
<p id="dcs-migrate-0220411__p16330112132510"><em id="dcs-migrate-0220411__i132590214215">{target_ecs_address}</em> is the EIP of the ECS, <strong id="dcs-migrate-0220411__b1927283314218">6666</strong> is the listening port of the ECS, and <em id="dcs-migrate-0220411__i254115492111">{password}</em> is the source Redis password. If there is no password, leave it blank.</p>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig1168715172413"><span class="figcap"><b>Figure 6 </b>Connection example</span><br><span><img id="dcs-migrate-0220411__image446672703311" src="en-us_image_0000001252915210.png"></span></div>
|
||||
</p></li><li id="dcs-migrate-0220411__li13564181913214"><span>Prepare the migration tool redis-shake.</span><p><ol type="a" id="dcs-migrate-0220411__ol0483154263117"><li id="dcs-migrate-0220411__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-0220411__li15905189153217">Download redis-shake on the ECS. Version 2.0.3 is used as an example. You can use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-0220411__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz</pre>
|
||||
@ -77,7 +77,7 @@ vi nginx.conf</pre>
|
||||
<div class="fignone" id="dcs-migrate-0220411__fig6427185214"><span class="figcap"><b>Figure 8 </b>Migration result</span><br><span><img id="dcs-migrate-0220411__image7559142717525" src="en-us_image_0000001253234262.png"></span></div>
|
||||
</p></li><li id="dcs-migrate-0220411__li154644591102"><span>After the migration is complete, use redis-cli to connect to the source and target Redis instances to check whether the data is complete.</span><p><ol type="a" id="dcs-migrate-0220411__ol46021459112920"><li id="dcs-migrate-0220411__li17397115712916">Connect to the source and target Redis instances, respectively.<p id="dcs-migrate-0220411__p20731122971718"><a name="dcs-migrate-0220411__li17397115712916"></a><a name="li17397115712916"></a>For details, see <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
|
||||
</li><li id="dcs-migrate-0220411__li99912440304">Run the <strong id="dcs-migrate-0220411__b1110104192813">info keyspace</strong> command to check the values of <strong id="dcs-migrate-0220411__b1101141172815">keys</strong> and <strong id="dcs-migrate-0220411__b1210124122813">expires</strong>.</li><li id="dcs-migrate-0220411__li174451506300">Calculate the differences between the values of <strong id="dcs-migrate-0220411__b91727780145635">keys</strong> and <strong id="dcs-migrate-0220411__b76239882845635">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
</p></li><li id="dcs-migrate-0220411__li14332111316191"><span>Delete the redis-shake configuration file.</span></li></ol>
|
||||
</p></li><li id="dcs-migrate-0220411__li14332111316191"><span>After the verification is complete, you are advised to clear the redis-shake configuration in time.</span></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -8,31 +8,31 @@
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-1117003__section175461313181014"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-1117003__ul173951945161011"><li id="dcs-migrate-1117003__li670798205113">A <a href="dcs-ug-0312003.html">DCS Redis instance</a> has been created. Note that the memory of the DCS Redis Cluster instance cannot be smaller than that of the source cluster.</li><li id="dcs-migrate-1117003__li1707885513">An ECS has been created for running redis-shake. The ECS must use the same VPC, subnet, and security group as the Redis instance.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-1117003__dcs-migrate-demo02_section2230197183316"><h4 class="sectiontitle">Procedure</h4><ol id="dcs-migrate-1117003__dcs-migrate-demo02_ol082075784215"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119">Access the target Redis instance using <a href="dcs-ug-0326009.html">redis-cli</a>. Obtain the IP address and port of the master node of the target instance.<pre class="screen" id="dcs-migrate-1117003__screen37731629115010">redis-cli -h {target_redis_address} -p {target_redis_port} -a {target_redis_password} cluster nodes</pre>
|
||||
<div class="section" id="dcs-migrate-1117003__dcs-migrate-demo02_section2230197183316"><h4 class="sectiontitle">Procedure</h4><ol id="dcs-migrate-1117003__dcs-migrate-demo02_ol082075784215"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119">Access the target Redis instance using <a href="dcs-ug-0326009.html">redis-cli</a>. Obtain the IP address and port of the master node of the target instance.<pre class="screen" id="dcs-migrate-1117003__screen37731629115010">redis-cli -h <em id="dcs-migrate-1117003__i0109145914560">{target_redis_address}</em> -p <em id="dcs-migrate-1117003__i584716255714">{target_redis_port}</em> -a <em id="dcs-migrate-1117003__i19614111015570">{target_redis_password}</em> cluster nodes</pre>
|
||||
<ul id="dcs-migrate-1117003__ul2057651023615"><li id="dcs-migrate-1117003__li1057631073615"><em id="dcs-migrate-1117003__i417715011301">{target_redis_address}</em>: connection address of the target DCS Redis instance.</li><li id="dcs-migrate-1117003__li11692143833618"><em id="dcs-migrate-1117003__i1874445714305">{target_redis_port}</em>: port of the target DCS Redis instance.</li><li id="dcs-migrate-1117003__li11364957133613"><em id="dcs-migrate-1117003__i348901593114">{target_redis_password}</em>: password for connecting to the target DCS Redis instance.</li></ul>
|
||||
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p6225352528">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
|
||||
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1222510522212"><span><img id="dcs-migrate-1117003__dcs-migrate-demo02_image122251352628" src="en-us_image_0293282053.png"></span></p>
|
||||
</li><li id="dcs-migrate-1117003__li13564181913214">Install redis-shake on the prepared ECS.<ol type="a" id="dcs-migrate-1117003__ol0483154263117"><li id="dcs-migrate-1117003__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-1117003__li15905189153217">Download redis-shake on the ECS. Version 2.0.3 is used as an example. You can use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-1117003__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz</pre>
|
||||
</li><li id="dcs-migrate-1117003__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-1117003__screen65481045101912">tar -xvf redis-shake-v2.0.3.tar.gz</pre>
|
||||
<p id="dcs-migrate-1117003__p1610912184418">If the source Redis is deployed in the data center intranet, install redis-shake on the intranet server. Export data and then upload the data to the cloud server as instructed by the following steps.</p>
|
||||
</li></ol>
|
||||
<div class="note" id="dcs-migrate-1117003__dcs-migrate-demo02_note1279444614610"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-1117003__dcs-migrate-demo02_p979434611610">If the source Redis is deployed in the data center intranet, install redis-shake on the intranet server. Export data and then upload the data to the cloud server as instructed by the following steps.</p>
|
||||
</div></div>
|
||||
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li31771323165319">Export the RDB file from the source Redis console. If the RDB file cannot be exported, contact customer service of the source.</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li2088910245149">Import the RDB file.<ol type="a" id="dcs-migrate-1117003__dcs-migrate-demo02_ol2327112018216"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li6327192011215">Import the RDB file (or files) to the cloud server. The cloud server must be connected to the target DCS instance.</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li832782018219">Edit the redis-shake configuration file <strong id="dcs-migrate-1117003__b197112413318">redis-shake.conf</strong>.<pre class="screen" id="dcs-migrate-1117003__screen162871920114818">vim redis-shake.conf</pre>
|
||||
<div class="p" id="dcs-migrate-1117003__dcs-migrate-demo02_p1825892672116">Add the following information about all the masters of the target:<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen1882155716429">target.type = cluster
|
||||
# If there is no password, skip the following parameter.
|
||||
target.password_raw = {target_redis_password}
|
||||
target.password_raw = <em id="dcs-migrate-1117003__i10661142315579">{target_redis_password}</em>
|
||||
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
|
||||
target.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}
|
||||
# List the RDB files to be imported, separated by semicolons (;).
|
||||
rdb.input = {local_dump.0};{local_dump.1};{local_dump.2};{local_dump.3}</pre>
|
||||
rdb.input = <em id="dcs-migrate-1117003__i152302032145712">{local_dump.0}</em>;<em id="dcs-migrate-1117003__i323117322576">{local_dump.1}</em>;<em id="dcs-migrate-1117003__i123123295710">{local_dump.2}</em>;<em id="dcs-migrate-1117003__i623153265717">{local_dump.3}</em></pre>
|
||||
</div>
|
||||
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p2840103122112">Press <strong id="dcs-migrate-1117003__b15410152310348">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-1117003__b12411192311340">:wq!</strong>. Press <strong id="dcs-migrate-1117003__b104111223133417">Enter</strong> to save the configuration and exit the editing interface.</p>
|
||||
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214">Run the following command to import the RDB file to the target instance:<pre class="screen" id="dcs-migrate-1117003__screen5901225105614">./redis-shake -type restore -conf redis-shake.conf</pre>
|
||||
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p123611640122113">If the following information is displayed in the execution log, the backup file is imported successfully:</p>
|
||||
<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen152647172316">Enabled http stats, set status (incr), and wait forever.</pre>
|
||||
</li></ol>
|
||||
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216">Verify the migration.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1682214570429"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216"></a><a name="dcs-migrate-demo02_li1382275724216"></a>After data synchronization, access the target Redis Cluster DCS instance using redis-cli. Run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b05331233101217">info</strong> command to query the number of keys in the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b0427123710120">Keyspace</strong> section to confirm that data has been fully imported.</p>
|
||||
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p0822357184215">If the data has not been fully imported, run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1185520418128">flushall</strong> or <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1585610471215">flushdb</strong> command to clear the cached data in the instance, and synchronize data again.</p>
|
||||
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216">Verify the migration.<p id="dcs-migrate-1117003__p279273895413"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1382275724216"></a><a name="dcs-migrate-demo02_li1382275724216"></a>Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol type="a" id="dcs-migrate-1117003__ol569010368361"><li id="dcs-migrate-1117003__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-1117003__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migrate-1117003__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migrate-1117003__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migrate-1117003__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migrate-1117003__dcs-migration-190703003_p203461224529"><span><img id="dcs-migrate-1117003__dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migrate-1117003__dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migrate-1117003__dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migrate-1117003__dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -9,41 +9,46 @@
|
||||
<ul id="dcs-migrate-demo02__ul1119121144311"><li id="dcs-migrate-demo02__li1863392615714">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migrate-demo02__i344871153104631"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>.<p id="dcs-migrate-demo02__p138084281778">Select the same VPC, subnet, and security group as the DCS Redis Cluster instance, and bind EIPs to the ECS.</p>
|
||||
</li><li id="dcs-migrate-demo02__li9131844111313">If the source self-hosted Redis Cluster is deployed on cloud servers of another cloud, allow public access to the servers.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo02__section51871956154311"><h4 class="sectiontitle">Obtaining Information of the Source and Target Redis Nodes</h4><ol id="dcs-migrate-demo02__ol937917016457"><li id="dcs-migrate-demo02__li10140101218452">Connect to the source and target Redis instances, respectively. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo02__li75216113412">In online migration of Redis Clusters, the migration must be performed node by node. Run the following command to query the IP addresses and ports of all nodes in both the source and target Redis Clusters.<pre class="screen" id="dcs-migrate-demo02__screen9190174216389">redis-cli -h {redis_address} -p {redis_port} -a {redis_password} cluster nodes</pre>
|
||||
<div class="section" id="dcs-migrate-demo02__section51871956154311"><h4 class="sectiontitle">Obtaining Information of the Source and Target Redis Nodes</h4><ol id="dcs-migrate-demo02__ol937917016457"><li id="dcs-migrate-demo02__li10140101218452">Connect to the source and target Redis instances, respectively. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo02__li75216113412">In online migration of Redis Clusters, the migration must be performed node by node. Run the following command to query the IP addresses and ports of all nodes in both the source and target Redis Clusters.<pre class="screen" id="dcs-migrate-demo02__screen9190174216389">redis-cli -h <em id="dcs-migrate-demo02__i163681016195210">{redis_address}</em> -p <em id="dcs-migrate-demo02__i14658151905215">{redis_port}</em> -a <em id="dcs-migrate-demo02__i996942265210">{redis_password}</em> cluster nodes</pre>
|
||||
<p id="dcs-migrate-demo02__p18729195453"><em id="dcs-migrate-demo02__i38712590538">{redis_address}</em> indicates the Redis connection address, <em id="dcs-migrate-demo02__i19381910105416">{redis_port}</em> indicates the Redis port, and <em id="dcs-migrate-demo02__i6189101415410">{redis_password}</em> indicates the Redis connection password.</p>
|
||||
<p id="dcs-migrate-demo02__p1719124210381">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
|
||||
<p id="dcs-migrate-demo02__p1719124210381">In the output, obtain the IP addresses and ports of all the master nodes.</p>
|
||||
<p id="dcs-migrate-demo02__p151917424388"><span><img id="dcs-migrate-demo02__image201913423389" src="en-us_image_0000002001365365.png"></span></p>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo02__section194954610107"><h4 class="sectiontitle">Configuring the redis-shake Tool</h4><ol id="dcs-migrate-demo02__ol0483154263117"><li id="dcs-migrate-demo02__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-demo02__li15905189153217">Run the following command on the ECS to download the redis-shake: This section uses v2.1.2 as an example. You can also download <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-demo02__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz</pre>
|
||||
</li><li id="dcs-migrate-demo02__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-demo02__screen65481045101912">tar -xvf redis-shake-v2.1.2.tar.gz</pre>
|
||||
<div class="section" id="dcs-migrate-demo02__section194954610107"><h4 class="sectiontitle">Configuring the redis-shake Tool</h4><ol id="dcs-migrate-demo02__ol0483154263117"><li id="dcs-migrate-demo02__li630814352317">Log in to the ECS.</li><li id="dcs-migrate-demo02__li15905189153217">Run the following command on the ECS to download the redis-shake: This section uses v4.3.2 as an example. You can also download <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-demo02__screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/v4.3.2/redis-shake-v4.3.2-linux-amd64.tar.gz</pre>
|
||||
</li><li id="dcs-migrate-demo02__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-demo02__screen65481045101912">mkdir redis-shake-v4.3.2
|
||||
tar -C redis-shake-v4.3.2 -xzvf redis-shake-v4.3.2-linux-amd64.tar.gz</pre>
|
||||
<p id="dcs-migrate-demo02__p17330129173"><span><img id="dcs-migrate-demo02__image64611312101716" src="en-us_image_0000001964418130.png"></span></p>
|
||||
</li><li id="dcs-migrate-demo02__li52093712471">Go to the redis-shake directory.<pre class="screen" id="dcs-migrate-demo02__screen383515448361">cd redis-shake-v2.0.3</pre>
|
||||
</li><li id="dcs-migrate-demo02__li427914206484">Edit the <strong id="dcs-migrate-demo02__b94161456567">redis-shake.conf</strong> file by providing the following information about all the masters of both the source and the target:<pre class="screen" id="dcs-migrate-demo02__screen162871920114818">vim redis-shake.conf</pre>
|
||||
<div class="p" id="dcs-migrate-demo02__p58009481215">The modification is as follows:<pre class="screen" id="dcs-migrate-demo02__screen196193138478">source.type = cluster
|
||||
# If there is no password, skip the following parameter.
|
||||
source.password_raw = {source_redis_password}
|
||||
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
|
||||
source.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}
|
||||
target.type = cluster
|
||||
# If there is no password, skip the following parameter.
|
||||
target.password_raw = {target_redis_password}
|
||||
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
|
||||
target.address = {master1_ip}:{master1_port};{master2_ip}:{master2_port}...{masterN_ip}:{masterN_port}</pre>
|
||||
</li><li id="dcs-migrate-demo02__li52093712471">Go to the decompressed directory.<pre class="screen" id="dcs-migrate-demo02__screen383515448361">cd redis-shake-v4.3.2</pre>
|
||||
</li><li id="dcs-migrate-demo02__li427914206484">Edit the <strong id="dcs-migrate-demo02__b94161456567">shake.toml</strong> file by providing the following information of both the source and the target.<pre class="screen" id="dcs-migrate-demo02__screen162871920114818">vim shake.toml</pre>
|
||||
<div class="p" id="dcs-migrate-demo02__p58009481215">The modification is as follows:<pre class="screen" id="dcs-migrate-demo02__screen196193138478">[sync_reader]
|
||||
# If the source instance type is a Redis Cluster, set the value to <strong id="dcs-migrate-demo02__b98955312363">true</strong>.
|
||||
cluster = true
|
||||
# IP address and port of any node in the source Redis Cluster
|
||||
address = <em id="dcs-migrate-demo02__i2020264816374">{redis_ip}</em>:<em id="dcs-migrate-demo02__i7871155093717">{redis_port}</em>
|
||||
# If there is no password, skip the following parameter
|
||||
password = <em id="dcs-migrate-demo02__i11984132711382">{source_redis_password}</em>
|
||||
[redis_writer]
|
||||
# If the target instance type is a Redis Cluster, set the value to <strong id="dcs-migrate-demo02__b1363383415389">true</strong>.
|
||||
cluster = true
|
||||
# IP address and port of any node in the target Redis Cluster
|
||||
address = <em id="dcs-migrate-demo02__i46161952153712">{redis_ip}</em>:<em id="dcs-migrate-demo02__i561695273710">{redis_port}</em>
|
||||
# If there is no password, skip the following parameter
|
||||
password = <em id="dcs-migrate-demo02__i11417057173812">{target_redis_password}</em></pre>
|
||||
</div>
|
||||
<p id="dcs-migrate-demo02__p26193138477">Press <strong id="dcs-migrate-demo02__b1232910345714">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-demo02__b17329338576">:wq!</strong>. Press <strong id="dcs-migrate-demo02__b1132943135719">Enter</strong> to save the configuration and exit the editing interface.</p>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo02__section2049172055811"><h4 class="sectiontitle">Migrating Data Online</h4><div class="p" id="dcs-migrate-demo02__p229612448595">Run the following command to synchronize data between the source and the target Redis:<pre class="screen" id="dcs-migrate-demo02__screen153902112599">./redis-shake -type sync -conf redis-shake.conf</pre>
|
||||
<div class="section" id="dcs-migrate-demo02__section2049172055811"><h4 class="sectiontitle">Migrating Data Online</h4><div class="p" id="dcs-migrate-demo02__p229612448595">Run the following command to synchronize data between the source and the target Redis:<pre class="screen" id="dcs-migrate-demo02__screen153902112599">./redis-shake shake.toml</pre>
|
||||
</div>
|
||||
<p id="dcs-migrate-demo02__p111506489581">If the following information is displayed, the full synchronization has been completed and incremental synchronization begins.</p>
|
||||
<pre class="screen" id="dcs-migrate-demo02__screen1150174855820">sync rdb done.</pre>
|
||||
<pre class="screen" id="dcs-migrate-demo02__screen1150174855820">syncing aof</pre>
|
||||
<p id="dcs-migrate-demo02__p151501448145815">If the following information is displayed, no new data is incremented. You can stop the incremental synchronization by pressing <strong id="dcs-migrate-demo02__b852141612475">Ctrl</strong>+<strong id="dcs-migrate-demo02__b1351220201478">C</strong>.</p>
|
||||
<pre class="screen" id="dcs-migrate-demo02__screen121501848105813">sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0</pre>
|
||||
<pre class="screen" id="dcs-migrate-demo02__screen121501848105813">write_ops=[0.00], src-*, syncing aof, diff=[0]</pre>
|
||||
<div class="fignone" id="dcs-migrate-demo02__fig16151548165811"><span class="figcap"><b>Figure 1 </b>Online migration using redis-shake</span><br><span><img id="dcs-migrate-demo02__image7151194815582" src="en-us_image_0000002000818973.png"></span></div>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo02__section1284020211609"><h4 class="sectiontitle">Verifying the Migration</h4><ol id="dcs-migrate-demo02__ol1397335516813"><li id="dcs-migrate-demo02__li180911211257">After the data synchronization, connect to the Redis Cluster DCS instance by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo02__li199735553817">Run the <strong id="dcs-migrate-demo02__b8904623195811">info</strong> command to check whether the data has been successfully imported as required.<p id="dcs-migrate-demo02__p03492001695">If the data has not been fully imported, run the <strong id="dcs-migrate-demo02__b79291718165918">flushall</strong> or <strong id="dcs-migrate-demo02__b3929218155919">flushdb</strong> command to clear the cached data in the target instance, and migrate data again.</p>
|
||||
</li><li id="dcs-migrate-demo02__li105900617920">After the verification is complete, delete the redis shake configuration file.</li></ol>
|
||||
</li><li id="dcs-migrate-demo02__li105900617920">After the verification is complete, you are advised to clear the redis-shake configuration in time.</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -1,29 +1,27 @@
|
||||
<a name="dcs-migrate-demo03"></a><a name="dcs-migrate-demo03"></a>
|
||||
|
||||
<h1 class="topictitle1">Self-Hosted Redis Cluster Migration with redis-shake (RDB)</h1>
|
||||
<div id="body0000001963924208"><p id="dcs-migrate-demo03__p2682105116534">redis-shake is an open-source tool for migrating data online or offline (by importing backup files) between Redis Clusters. Data can be migrated to DCS Redis Cluster instances seamlessly because DCS Redis Cluster inherits the native Redis Cluster design.</p>
|
||||
<div id="body0000001963924208"><p id="dcs-migrate-demo03__p2682105116534">redis-shake is an open-source tool for migrating data online or offline (by importing backup files) between Redis Clusters. Data can be migrated to DCS Redis Cluster instances seamlessly because DCS Redis Cluster inherits the native Redis Cluster design. If the source Redis and the target Redis cannot be connected, or the source Redis is deployed on other clouds, you can migrate data by importing backup files.</p>
|
||||
<p id="dcs-migrate-demo03__p1814154103513">The following describes how to use Linux redis-shake to migrate self-hosted Redis Cluster to a DCS Redis Cluster instance offline.</p>
|
||||
<div class="note" id="dcs-migrate-demo03__note1435519462169"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo03__p0356174613168">If the source Redis and the target Redis cannot be connected, or the source Redis is deployed on other clouds, you can migrate data by importing backup files.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migrate-demo03__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migrate-demo03__dcs-migration-0312010_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo03__section11655174618156"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-demo03__ul1119121144311"><li id="dcs-migrate-demo03__li10204184311">A DCS Redis Cluster instance has been created. For details about how to create one, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.<p id="dcs-migrate-demo03__p261218321933">The memory of the target Redis instance cannot be smaller than that of the source Redis.</p>
|
||||
</li><li id="dcs-migrate-demo03__li1863392615714">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migrate-demo03__i44414446619"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance.</li></ul>
|
||||
</li><li id="dcs-migrate-demo03__li1863392615714">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migrate-demo03__i1589434320389"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo03__section460232510584"><h4 class="sectiontitle">Obtaining Information of the Source and Target Redis Nodes</h4><ol id="dcs-migrate-demo03__dcs-migrate-demo02_ol937917016457"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li10140101218452">Connect to the source and target Redis instances, respectively. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li75216113412">In online migration of Redis Clusters, the migration must be performed node by node. Run the following command to query the IP addresses and ports of all nodes in both the source and target Redis Clusters.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen9190174216389">redis-cli -h {redis_address} -p {redis_port} -a {redis_password} cluster nodes</pre>
|
||||
<div class="section" id="dcs-migrate-demo03__section460232510584"><h4 class="sectiontitle">Obtaining Information of the Source and Target Redis Nodes</h4><ol id="dcs-migrate-demo03__dcs-migrate-demo02_ol937917016457"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li10140101218452">Connect to the source and target Redis instances, respectively. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li75216113412">In online migration of Redis Clusters, the migration must be performed node by node. Run the following command to query the IP addresses and ports of all nodes in both the source and target Redis Clusters.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen9190174216389">redis-cli -h <em id="dcs-migrate-demo03__dcs-migrate-demo02_i163681016195210">{redis_address}</em> -p <em id="dcs-migrate-demo03__dcs-migrate-demo02_i14658151905215">{redis_port}</em> -a <em id="dcs-migrate-demo03__dcs-migrate-demo02_i996942265210">{redis_password}</em> cluster nodes</pre>
|
||||
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p18729195453"><em id="dcs-migrate-demo03__dcs-migrate-demo02_i38712590538">{redis_address}</em> indicates the Redis connection address, <em id="dcs-migrate-demo03__dcs-migrate-demo02_i19381910105416">{redis_port}</em> indicates the Redis port, and <em id="dcs-migrate-demo03__dcs-migrate-demo02_i6189101415410">{redis_password}</em> indicates the Redis connection password.</p>
|
||||
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p1719124210381">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
|
||||
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p1719124210381">In the output, obtain the IP addresses and ports of all the master nodes.</p>
|
||||
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p151917424388"><span><img id="dcs-migrate-demo03__dcs-migrate-demo02_image201913423389" src="en-us_image_0000002001365365.png"></span></p>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo03__section194954610107"><h4 class="sectiontitle">Installing RedisShake</h4><ol id="dcs-migrate-demo03__ol0483154263117"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li630814352317">Log in to the ECS.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li15905189153217">Run the following command on the ECS to download the redis-shake: This section uses v2.1.2 as an example. You can also download <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a> as required.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen195204110481">wget https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz</pre>
|
||||
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen65481045101912">tar -xvf redis-shake-v2.1.2.tar.gz</pre>
|
||||
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen65481045101912">tar -xvf release-v2.1.2-20220329.tar.gz</pre>
|
||||
<p id="dcs-migrate-demo03__dcs-migrate-demo02_p17330129173"><span><img id="dcs-migrate-demo03__dcs-migrate-demo02_image64611312101716" src="en-us_image_0000001964888588.png"></span></p>
|
||||
<p id="dcs-migrate-demo03__p16994185003913">If the source cluster is deployed in the data center intranet, install redis-shake on the intranet server. Export the source cluster backup file by referring to <a href="#dcs-migrate-demo03__section03191023122013">Exporting the Backup File</a>. Upload the backup to the ECS.</p>
|
||||
</li></ol>
|
||||
<div class="note" id="dcs-migrate-demo03__note206760465302"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo03__p1767612462306">If the source cluster is deployed in the data center intranet, install redis-shake on the intranet server. Export the source cluster backup file by referring to <a href="#dcs-migrate-demo03__section03191023122013">Exporting the Backup File</a>. Upload the backup to the cloud server as instructed by the following steps</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo03__section03191023122013"><a name="dcs-migrate-demo03__section03191023122013"></a><a name="section03191023122013"></a><h4 class="sectiontitle">Exporting the Backup File</h4><ol id="dcs-migrate-demo03__ol4778145172215"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li52093712471">Go to the redis-shake directory.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen383515448361">cd redis-shake-v2.0.3</pre>
|
||||
<div class="section" id="dcs-migrate-demo03__section03191023122013"><a name="dcs-migrate-demo03__section03191023122013"></a><a name="section03191023122013"></a><h4 class="sectiontitle">Exporting the Backup File</h4><ol id="dcs-migrate-demo03__ol4778145172215"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li52093712471">Go to the redis-shake directory.<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen383515448361">cd bin</pre>
|
||||
<p id="dcs-migrate-demo03__p880891033513"><span><img id="dcs-migrate-demo03__image10808121053515" src="en-us_image_0000002289570913.png"></span></p>
|
||||
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li427914206484">Edit the <strong id="dcs-migrate-demo03__b3204145510919">redis-shake.conf</strong> file by providing the following information about all the masters of the source:<pre class="screen" id="dcs-migrate-demo03__dcs-migrate-demo02_screen162871920114818">vim redis-shake.conf</pre>
|
||||
<div class="p" id="dcs-migrate-demo03__p993616452112">The modification is as follows:<pre class="screen" id="dcs-migrate-demo03__screen16360202195">source.type = cluster
|
||||
# If there is no password, skip the following parameter.
|
||||
@ -53,7 +51,7 @@ rdb.input = <em id="dcs-migrate-demo03__i3730185065519">{local_dump.0}</em>;<em
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migrate-demo03__section19218115382215"><h4 class="sectiontitle">Verifying the Migration</h4><ol id="dcs-migrate-demo03__dcs-migrate-demo02_ol1397335516813"><li id="dcs-migrate-demo03__dcs-migrate-demo02_li180911211257">After the data synchronization, connect to the Redis Cluster DCS instance by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li199735553817">Run the <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b8904623195811">info</strong> command to check whether the data has been successfully imported as required.<p id="dcs-migrate-demo03__dcs-migrate-demo02_p03492001695">If the data has not been fully imported, run the <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b79291718165918">flushall</strong> or <strong id="dcs-migrate-demo03__dcs-migrate-demo02_b3929218155919">flushdb</strong> command to clear the cached data in the target instance, and migrate data again.</p>
|
||||
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li105900617920">After the verification is complete, delete the redis shake configuration file.</li></ol>
|
||||
</li><li id="dcs-migrate-demo03__dcs-migrate-demo02_li105900617920">After the verification is complete, you are advised to clear the redis-shake configuration in time.</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
</tr>
|
||||
<tr id="dcs-migration-0312001__row16280122219310"><td class="cellrowborder" valign="top" headers="mcps1.3.11.3.2.4.1.1 "><p id="dcs-migration-0312001__p18280192216320">Whitelist or security group</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.11.3.2.4.1.2 "><p id="dcs-migration-0312001__p040819711215">DCS Redis 3.0, 4.0, 5.0, and 6.0 professional edition instances are deployed in different modes. Therefore, the access control methods vary. You can control access to your DCS instances by setting security groups or whitelists. For details, see <a href="en-us_topic_0090662012.html">How Do I Configure a Security Group?</a> or <a href="dcs-ug-190812001.html">Managing IP Address Whitelist</a>.</p>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.11.3.2.4.1.2 "><p id="dcs-migration-0312001__p040819711215">DCS Redis instances of various versions are deployed in different modes. Therefore, the access control methods vary. You can control access to your DCS instances by setting security groups or whitelists. For details, see <a href="en-us_topic_0090662012.html">How Do I Configure a Security Group?</a> or <a href="dcs-ug-190812001.html">Managing IP Address Whitelist</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-migration-0312001__row17930737299"><td class="cellrowborder" valign="top" width="16.831683168316832%" headers="mcps1.3.11.3.2.4.1.1 "><p id="dcs-migration-0312001__p1193113371495">...</p>
|
||||
|
||||
@ -2,19 +2,16 @@
|
||||
|
||||
<h1 class="topictitle1">Online Migration Between Instances</h1>
|
||||
<div id="body8662426"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p1244713381103">If the source and target instances are interconnected and the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b143842192411">SYNC</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b20384171917418">PSYNC</strong> commands are supported by the source instance, data can be migrated online in full or incrementally from the source to the target.</p>
|
||||
<div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_note163110283525"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p4701259102114">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section15790816165711"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul56215114194"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li618634772016">You cannot use public networks for online migration.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li963201191917">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1780945272915">Migrating a later Redis instance to an earlier one may fail.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001.html">Online Migration with Rump</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li12127172742014">During online migration, you are advised to set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b286126635">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b18611361133">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b138611618318">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the instance.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li773103010264">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section15790816165711"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul56215114194"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li618634772016">You cannot use public networks for online migration.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1780945272915">Migrating a later Redis instance to an earlier one may fail.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li12127172742014">During online migration, you are advised to set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b286126635">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b18611361133">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b138611618318">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the instance.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li773103010264">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li16130335174710"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b184741351155211">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</strong></li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section1128152020384"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul727834515383"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1394816445398">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>.<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p12232105715390">If the data exists on the target instance, the replicated data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</p>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section1128152020384"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul727834515383"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li97321521616">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1394816445398">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>.<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p12232105715390">If the data exists on the target instance, the replicated data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</p>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section157769524519"><h4 class="sectiontitle">Creating an Online Migration Task</h4><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol81391154144716"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li390016374490"><span>Log in to the DCS console.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p193754334219"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b383985310819">If the source and target Redis are under different accounts, use the source account to log in to DCS.</strong></p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li397632810712"><span>Click <span><img id="dcs-migration-0312003__en-us_topic_0000001935864141_i0d8b8411c49244f694e4f9ebeef4b3c5" src="en-us_image_0000001962038446.png"></span> in the upper left corner of the console and select the region where your <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b152730271894">source</strong> instance is located.</span><p><div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_note1641203313110"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p18818341014">Only when the online migration task and the source Redis are under an account and in a region, the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b2021193617133">SYNC</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b28381938151310">PSYNC</strong> commands of the source Redis are allowed. Otherwise, online migration cannot be performed.</p>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b39351247123317">Data Migration</strong>. The migration task list is displayed.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li67372014165120"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b13334015205519">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p87011743104513">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_note8226825195811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul12308184119132"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li8969127101514">Use the VPC of the source or target Redis.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18308441171318">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section157769524519"><h4 class="sectiontitle">Creating an Online Migration Task</h4><div class="caution" id="dcs-migration-0312003__en-us_topic_0000001935864141_note3954181894812"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p8954191874811">Only when the online migration task and the source Redis are under an account and in a region, the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b359211532531">SYNC</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b145931534539">PSYNC</strong> commands of the source Redis are allowed. Therefore, create one task under the same account in the same region as the source.</p>
|
||||
</div></div>
|
||||
<ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol81391154144716"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li390016374490"><span>Log in to the DCS console.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p193754334219"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b383985310819">If the source and target Redis are under different accounts, use the source account to log in to DCS.</strong></p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li397632810712"><span>Click <span><img id="dcs-migration-0312003__en-us_topic_0000001935864141_image210072562717" src="en-us_image_0000001549115173.png"></span> in the upper left corner of the console and select the region where your <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b152730271894">source</strong> instance is located.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b39351247123317">Data Migration</strong>. The migration task list is displayed.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li67372014165120"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b13334015205519">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p87011743104513">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul8707123364910"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1270763319492">Use the VPC of the source or target Redis.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li670713312496">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li47076332497">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_section0422112610171"><h4 class="sectiontitle">Checking the Network</h4><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol1260417035216"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li16049019525"><span>Check whether the source Redis instance, the target Redis instance, and the migration task are configured with the same VPC.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p188021330165115">If yes, go to <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272">Configuring the Online Migration Task</a>. If no, go to <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li160420185217">2</a>.</p>
|
||||
@ -22,23 +19,24 @@
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li423483319412"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li423483319412"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li423483319412"></a><span>Perform the following operations to establish the network.</span><p><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul17325432414"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li7271615152516">If the source and target Redis instances are <span id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ph4272141572517">in the same DCS region</span>, create a VPC peering connection by referring to "Peering Connection" in <em id="dcs-migration-0312003__en-us_topic_0000001935864141_i16457149181916">Virtual Private Cloud (VPC) User Guide</em>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li831118331565">If the source and target Redis instances are in different DCS regions, create a connection by referring to the <em id="dcs-migration-0312003__en-us_topic_0000001935864141_i3419115815206">Direct Connect User Guide</em>.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol20242048298"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li187884091914"><span>On the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b787651612226">Online Migration</strong> tab page, click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b208765165228">Configure</strong> in the row containing the online migration task you just created.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"></a><span>Select a migration type.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p72342811211">Supported migration types are <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b7961135591712">Full</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215">Table 1</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol20242048298"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li821594919919"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b172605644312">Next</strong> and configure the source and target Redis instances.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p22151849399">If the resources are not ready yet, click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b194412298582">Create</strong> to create a migration task. After they are ready, click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1482011810591">Configure</strong> on the right of the task to continue its configuration.</p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209"></a><span>Select a migration type.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p72342811211">Supported migration types are <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b7961135591712">Full</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215">Table 1</a>.</p>
|
||||
<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p1336613185314">To <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_section12424655143818">switch DCS instance IPs</a> after instance migration, select <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1555321222414">Full + Incremental</strong> for the migration type.</p>
|
||||
|
||||
<div class="tablenoborder"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.7.2.2.2.3.2.3.1.1"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p758103372214">Migration Type</p>
|
||||
<div class="tablenoborder"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215"></a><a name="en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.6.2.2.2.3.2.3.1.1"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p758103372214">Migration Type</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.7.2.2.2.3.2.3.1.2"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p1058153311225">Description</p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.6.2.2.2.3.2.3.1.2"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p1058153311225">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.3.2.3.1.1 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p458153332210">Full</p>
|
||||
<tbody><tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.3.2.3.1.1 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p458153332210">Full</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.3.2.3.1.2 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.3.2.3.1.2 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.3.2.3.1.1 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p85863316221">Full + incremental</p>
|
||||
<tr id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.3.2.3.1.1 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p85863316221">Full + incremental</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.3.2.3.1.2 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.3.2.3.1.2 "><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p110411470116">Once the migration starts, it remains <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1239633218259">Migrating</strong> until you click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b43962323258">Stop</strong> in the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b13961832182514">Operation</strong> column. After the migration is stopped, data in the source instance will not be lost, but data will not be written to the target instance. When the transmission network is stable, the delay of incremental migration is within seconds. The actual delay depends on the transmission quality of the network link.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -48,28 +46,26 @@
|
||||
<div class="fignone" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_fig23511729101218"><span class="figcap"><b>Figure 1 </b>Selecting the migration type</span><br><span><img id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_image2036555461718" src="en-us_image_0000001955094688.png"></span></div>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li76295537920"><span>Only if <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b49878456252">Migration Type</strong> is set to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b29879457251">Full + Incremental</strong>, you can specify a bandwidth limit.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p197736619241">The data synchronization rate can be kept around the bandwidth limit.</p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li13649906333"><span>Specify <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b34193412271">Auto-Reconnect</strong>. If this option is enabled, automatic reconnections will be performed indefinitely in the case of a network exception.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p67501140810">Full synchronization will be triggered and requires more bandwidth if incremental synchronization becomes unavailable. Exercise caution when enabling this option.</p>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li974533414185"><span>Configure <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b3314825122811">Source Redis</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1891962917288">Target Redis</strong>.</span><p><ol type="a" id="dcs-migration-0312003__en-us_topic_0000001935864141_ol1555514535326"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li13555165319328">Set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b693419218358">Source Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b116091302354">Redis in the cloud</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b23933593610">Source Redis Instance</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li9907815183313">Configure <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b993755923719">Target Redis Type</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1582032133811">Target Redis Instance</strong>:<ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul2161162093310"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li671817229332">If the target Redis and migration task are in a VPC, or across VPCs over a network in a region, set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b5559959134317">Target Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b134701755204319">Redis in the cloud</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b137741519447">Target Redis Instance</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li16161520163310">If the target Redis and migration task are in different regions, set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b45211048184716">Target Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b3853135016479">Self-hosted Redis</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1034819711485">Target Redis Instance</strong>. If the target Redis is a Redis Cluster, enter the IP addresses and ports of all masters in the cluster and separate multiple addresses with commas (,). For example: <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1991810485119">192.168.1.1:6379,192.168.0.0:6379</strong></li></ul>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li974533414185"><span>Configure <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b11621256105912">Source Data</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b19289959155915">Target Data</strong>.</span><p><ol type="a" id="dcs-migration-0312003__en-us_topic_0000001935864141_ol1555514535326"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li13555165319328">Set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b693419218358">Source Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b116091302354">Redis in the cloud</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b23933593610">Source Redis Instance</strong>.<div class="caution" id="dcs-migration-0312003__en-us_topic_0000001935864141_note383520197501"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p188351719165019">When a DCS instance is used as the source, do not select <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b204251830125319">Self-hosted Redis</strong>.</p>
|
||||
</div></div>
|
||||
</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li9907815183313">Configure <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b993755923719">Target Redis Type</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1582032133811">Target Redis Instance</strong>:<ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul2161162093310"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li671817229332">If the target Redis and migration task are in a VPC, or across VPCs over a network in a region, set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b5559959134317">Target Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b134701755204319">Redis in the cloud</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b137741519447">Target Redis Instance</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li16161520163310">If the target Redis and migration task are in different regions, set <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b45211048184716">Target Redis Type</strong> to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b3853135016479">Self-hosted Redis</strong> and add <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1034819711485">Target Redis Instance</strong>. If the target Redis is a Redis Cluster, enter the IP addresses and ports of all masters in the cluster and separate multiple addresses with commas (,). For example: <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b175493227472">192.168.1.1:6379,192.168.0.0:6379</strong></li></ul>
|
||||
</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li142491381316">Configure <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1139145818514">Source Redis Instance Password</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b53450118521">Target Redis Instance Password</strong>: If the instance is password-protected, click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b162141111105118">Test Connection</strong> to check whether the instance password is correct and whether the network is connected. If the instance is not password-protected, click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b7131131815246">Test Connection</strong> directly.<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p1992114918157">Currently, the users created in <a href="dcs-ug-221220.html">Managing Users</a> are unavailable here.</p>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1348442114911"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b13194159102331">Next</strong>.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b144078323546">Submit</strong>.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p4880126112412">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b335084213548">Migration Logs</strong> page.</p>
|
||||
<div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_note4427420124517"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul4321452125415"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li3321952195412">Once full + incremental migration starts, it remains <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b97341914165517">Migrating</strong> after full migration.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1348442114911"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b437620461919">Create</strong>.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b144078323546">Submit</strong>.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<ul id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ul4321452125415"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1514692725914">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b335084213548">Migration Logs</strong> page.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li3321952195412">Once full + incremental migration starts, it remains <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b97341914165517">Migrating</strong> after full migration.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_section3718231268"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p1571161034711">After the migration is complete, check data integrity in the following way.</p>
|
||||
<ol id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol11257313194715"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect the source Redis and the target Redis. For details, see <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1984811531475">info keyspace</strong> command on the source and the target Redis to check the values of <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1884820539719">keys</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b118481653872">expires</strong>.<div class="fignone" id="dcs-migration-0312003__en-us_topic_0000001935864141_fig19418122142418"><span class="figcap"><b>Figure 2 </b>Checking instance data</span><br><span><img id="dcs-migration-0312003__en-us_topic_0000001935864141_image141813218246" src="en-us_image_0000001990974029.png"></span></div>
|
||||
</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
<div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_note056170794"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p1657001596">During full migration, source Redis data updated during the migration will not be migrated to the target instance.</p>
|
||||
</div></div>
|
||||
<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p065112061111">During full migration, source Redis data updated during the migration will not be migrated to the target instance.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312003__en-us_topic_0000001935864141_section12424655143818"><a name="dcs-migration-0312003__en-us_topic_0000001935864141_section12424655143818"></a><a name="en-us_topic_0000001935864141_section12424655143818"></a><h4 class="sectiontitle">(Optional) Switching DCS Instance IP Addresses</h4><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p11840105818189">The prerequisites for switching source and target Redis instance IP addresses are as follows. The target Redis can be accessed automatically on a client after the switch.</p>
|
||||
<p id="dcs-migration-0312003__en-us_topic_0000001935864141_p18296610165612"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b15178422142312">Prerequisites:</strong></p>
|
||||
<ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul4247514112120"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li52471614172116">This function is supported by basic edition DCS Redis 4.0 instances and later, <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b593834495810">but not by professional edition DCS Redis instances</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li524741418214">For DCS Redis 3.0 instances, contact customer service to enable the whitelist for Redis 3.0 instance IP switches. The instance IP addresses can be switched only when the source instance is a DCS Redis 3.0 instance and the target instance is a basic edition DCS Redis 4.0, 5.0, or 6.0 instance.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li182471114112115">The IP addresses of a source or target instance with public access enabled cannot be switched.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2651414152315">Instance IPs can be switched only for the source and target Redis that are single-node, master/standby, read/write splitting, or Proxy Cluster instances.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li367971172719"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b18951555122716">Full + Incremental</strong> must be selected in <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209">2</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li121479425411">The source and target Redis instance ports must be consistent.</li></ul>
|
||||
<div class="notice" id="dcs-migration-0312003__en-us_topic_0000001935864141_note338831716433"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_ol14309115714817"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li43092575815">Online migration will stop during the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2030915573819">Instances will be read-only for one minute and disconnected for several seconds during the switching. </li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li373164010347">If your application cannot reconnect to Redis or handle exceptions, you may need to restart the application after the IP switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1130910571288">If the source and target instances are in different subnets, the subnet information will be updated after the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li17309135718816">If the source is a master/standby instance, the IP address of the standby node will not be switched. Ensure that this IP address is not used by your applications.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1630918571184">If your applications use a domain name to connect to Redis, the domain name will be used for the source instance. Select <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b8611119164913">Yes</strong> for <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b183710329493">Switch Domain Name</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li18309157481">Ensure that the passwords of the source and target instances are the same. If they are different, verification will fail after the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2391459144817">If a whitelist is configured for the source instance, ensure that the same whitelist is configured for the target instance before switching IP addresses.</li></ol>
|
||||
</div></div>
|
||||
<ol id="dcs-migration-0312003__en-us_topic_0000001935864141_ol43115541812"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li13269132134611"><span>On the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b2080817560288">Data Migration</strong> > <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b980935617287">Online Migration</strong> page, when the migration task status changes to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b188090568287">Incremental migration in progress</strong>, choose <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b138096563284">More</strong> > <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b3809356162818">Switch IP</strong> in the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b13809105622814">Operation</strong> column.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1992351284614"><span>In the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b4391525182414">Switch IP</strong> dialog box, select whether to switch the domain name.</span><p><div class="note" id="dcs-migration-0312003__en-us_topic_0000001935864141_note1659121725213"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul35917178526"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1359161711526">If a Redis domain name is used on the client, switch it or you must modify the domain name on the client.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li185916175526">If the domain name switch is not selected, only the instance IP addresses will be switched.</li></ul>
|
||||
<ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul4247514112120"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li52471614172116">This function is supported by DCS Redis 4.0 instances and later.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li182471114112115">The IP addresses of a source or target instance with public access enabled cannot be switched.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2651414152315">Instance IPs can be switched only for the source and target Redis that are single-node, master/standby, read/write splitting, or Proxy Cluster instances.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li367971172719"><strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b18951555122716">Full + Incremental</strong> must be selected in <a href="#dcs-migration-0312003__en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li18777171715209">2</a>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li121479425411">The source and target Redis instance ports must be consistent.</li></ul>
|
||||
<div class="caution" id="dcs-migration-0312003__en-us_topic_0000001935864141_note19780432207"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><ol id="dcs-migration-0312003__en-us_topic_0000001935864141_ol14309115714817"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li43092575815">Online migration will stop during the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2030915573819">Instances will be read-only for one minute and disconnected for several seconds during the switching. </li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li373164010347">If your application cannot reconnect to Redis or handle exceptions, you may need to restart the application after the IP switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1130910571288">If the source and target instances are in different subnets, the subnet information will be updated after the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li17309135718816">If the source is a master/standby instance, the IP address of the standby node will not be switched. Ensure that this IP address is not used by your applications.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1630918571184">If your applications use a domain name to connect to Redis, the domain name will be used for the source instance. Select <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b8611119164913">Yes</strong> for <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b183710329493">Switch Domain Name</strong>.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li18309157481">Ensure that the passwords of the source and target instances are the same. If they are different, verification will fail after the switching.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li2391459144817">If a whitelist is configured for the source instance, ensure that the same whitelist is configured for the target instance before switching IP addresses.</li></ol>
|
||||
</div></div>
|
||||
<ol id="dcs-migration-0312003__en-us_topic_0000001935864141_ol43115541812"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li13269132134611"><span>On the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b2080817560288">Data Migration</strong> > <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b980935617287">Online Migration</strong> page, when the migration task status changes to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b188090568287">Incremental migration in progress</strong>, choose <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b138096563284">More</strong> > <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b3809356162818">Switch IP</strong> in the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b13809105622814">Operation</strong> column.</span></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1992351284614"><span>In the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b4391525182414">Switch IP</strong> dialog box, select whether to switch the domain name.</span><p><ul id="dcs-migration-0312003__en-us_topic_0000001935864141_ul35917178526"><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1359161711526">If a Redis domain name is used on the client, switch it or you must modify the domain name on the client.</li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li185916175526">If the domain name switch is not selected, only the instance IP addresses will be switched.</li></ul>
|
||||
</p></li><li id="dcs-migration-0312003__en-us_topic_0000001935864141_li1959171765216"><span>Click <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1970718588275">OK</strong>. The IP address switching task is submitted successfully. When the status of the migration task changes to <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b171121359286">IP switched</strong>, the IP address switching is complete.</span><p><p id="dcs-migration-0312003__en-us_topic_0000001935864141_p948124214715">To restore the IPs, choose <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1952864103214">More</strong> > <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b1526707113216">Roll Back IP</strong> in the operation column. The IPs are rolled back when the task is in the <strong id="dcs-migration-0312003__en-us_topic_0000001935864141_b136781511327">Successful</strong> state.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
|
||||
@ -2,34 +2,37 @@
|
||||
|
||||
<h1 class="topictitle1">Backup Import Between DCS Redis Instances</h1>
|
||||
<div id="body8662426"><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p9488889217">You can migrate data between DCS instances by importing backup files.</p>
|
||||
<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul82381214112412"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li3238714152411">If the source Redis and target Redis are in the same region under the same DCS account, and the source Redis is not a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027">Importing Backup Data from a Redis Instance</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li132386143242">If the source Redis and target Redis are in different regions or under different DCS accounts, or the source Redis is a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358">Importing Backup Data from an OBS Bucket</a>.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul365114368261"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li5651123602613">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li96511336112619">Migration may fail if the target instance uses smaller specifications than its source.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815"></a><a name="en-us_topic_0000001893744560_section7611653155815"></a><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul17431141717136"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li984724094">You have successfully backed up the source Redis instance.<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul32651722396"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li16326201099">For <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027">Importing Backup Data from a Redis Instance</a>, you do not need to download the backup file to the local PC. For details about how to back up data, see <a href="dcs-ug-0312032.html">Manually Backing Up a DCS Instance</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li193934251896">For <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358">Importing Backup Data from an OBS Bucket</a>, download the backup file to the local PC by referring to <a href="dcs-ug-0312034.html">Downloading a Backup File</a>.</li></ul>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li543141716137">You have prepared the target Redis instance. If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p11513147445">Redis is backward compatible. The target instance version must be the same as or later than the source instance version.</p>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li184311817111318">Ensure that the target Redis instance has sufficient storage space. You can clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"></a><a name="en-us_topic_0000001893744560_section168361859027"></a><h4 class="sectiontitle">Importing Backup Data from a Redis Instance</h4><ol id="dcs-migration-0312004__en-us_topic_0000001893744560_ol1694114110143"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li109411816148"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li5415759599"><span>Click <span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_i0d8b8411c49244f694e4f9ebeef4b3c5" src="en-us_image_0000001999635737.png"></span> in the upper left corner of the console and select the region where your source and target instances are located.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1094120141419"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1424285011577">Data Migration</strong>. The migration task list is displayed.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li39411114149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7180145855711">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li49416181414"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1422038133115">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1294114141413"><span>For source Redis, set <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b53391211165812">Data Source</strong> to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b2033941195812">Redis</strong>.</span><p><div class="fignone" id="dcs-migration-0312004__en-us_topic_0000001893744560_fig38031824194312"><span class="figcap"><b>Figure 1 </b>Selecting a data source (Redis)</span><br><span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_image3803132434312" src="en-us_image_0000001955154978.png"></span></div>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1594112116144"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b25981239185918">Source Redis Instance</strong>, select the source instance to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li294112114146"><span>Select the backup task whose data is to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li394112191415"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7542142819110">Target Redis Instance</strong>, select the DCS Redis instance prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li9942101151410"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li119421618149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li15942121171414"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p5942141171410">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3492173611113">Successful</strong>.</p>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section24727511539"><h4 class="sectiontitle">Procedure</h4><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul82381214112412"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li3238714152411">If the source Redis and target Redis are in the same region under the same DCS account, and the source Redis is not a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027">Importing Backup Data from a Redis Instance</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li132386143242">If the source Redis and target Redis are in different regions or under different DCS accounts, or the source Redis is a single-node instance, see <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358">Importing Backup Data from an OBS Bucket</a>.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section168361859027"></a><a name="en-us_topic_0000001893744560_section168361859027"></a><h4 class="sectiontitle">Importing Backup Data from a Redis Instance</h4><ol id="dcs-migration-0312004__en-us_topic_0000001893744560_ol1694114110143"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li109411816148"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li5415759599"><span>Click <span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_image1356364172811" src="en-us_image_0000001549115173.png"></span> in the upper left corner of the console and select the region where your source and target instances are located.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1094120141419"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1424285011577">Data Migration</strong>. The migration task list is displayed.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li39411114149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7180145855711">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li49416181414"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1422038133115">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1294114141413"><span>For source Redis, set <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b53391211165812">Data Source</strong> to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b2033941195812">Redis</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1594112116144"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b25981239185918">Source Redis Instance</strong>, select the source instance to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li294112114146"><span>Select the backup task whose data is to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li394112191415"><span>For <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b7542142819110">Target Redis Instance</strong>, select the DCS Redis instance prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li9942101151410"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li119421618149"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li15942121171414"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p5942141171410">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3492173611113">Successful</strong>.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_section12790115912358"></a><a name="en-us_topic_0000001893744560_section12790115912358"></a><h4 class="sectiontitle">Importing Backup Data from an OBS Bucket</h4><p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same account and region as the target DCS Redis instance. After you have created a backup import task, data in the OBS bucket will be read and migrated to the target Redis.</p>
|
||||
<div class="note" id="dcs-migration-0312004__en-us_topic_0000001893744560_note1024063013419"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul119151459102810"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li89154599284">.aof, .rdb, .zip, and .tar.gz files can be uploaded to OBS buckets. You can directly upload .aof and .rdb files or compress them into .zip or .tar.gz files before uploading.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li159151759132820">To migrate data from a cluster Redis instance, download all backup files and upload all of them to the OBS bucket. Each backup file contains data for a shard of the instance. During the migration, you need to select backup files of all shards.</li></ul>
|
||||
</div></div>
|
||||
</div>
|
||||
<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul19605114770"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li89154599284">.aof, .rdb, .zip, and .tar.gz files can be uploaded to OBS buckets. You can directly upload .aof and .rdb files or compress them into .zip or .tar.gz files before uploading.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li186051146714">To migrate data from a cluster Redis instance, download all backup files and upload all of them to the OBS bucket. Each backup file contains data for a shard of the instance. During the migration, you need to select backup files of all shards.</li></ul>
|
||||
<ol id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li9758112393116"><span><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b25243103616">Create an OBS bucket in the account and region where the target Redis instance is located.</strong> If a qualified OBS bucket is available, you do not need to create one.</span><p><div class="p" id="dcs-migration-0312004__en-us_topic_0000001893744560_p1381182583111">When creating an OBS bucket, pay attention to the configuration of the following parameters. For details on how to set other parameters, see "Creating a Bucket" in <em id="dcs-migration-0312004__en-us_topic_0000001893744560_i104378420812">Object Storage Service User Guide</em>.<ul id="dcs-migration-0312004__en-us_topic_0000001893744560_ul1676254012574"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li18762740185715"><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b322512612920">Region</strong>:<p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p1348814534465">The OBS bucket must be in the same region as the target DCS Redis instance.</p>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li276217409575"><strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b15127014688">Default Storage Class</strong>: Select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b151276143820">Standard</strong> or <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b19127714085">Infrequent Access</strong>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p65128619477">Do not select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b103601829135710">Archive</strong>. Otherwise, the migration will fail.</p>
|
||||
</li></ul>
|
||||
</div>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li18291101435517"><span>Upload the backup file to the OBS bucket. </span><p><ol type="a" id="dcs-migration-0312004__en-us_topic_0000001893744560_ol16799172411561"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1713414272578">In the bucket list, click the name of the created bucket.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134202715717">In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b7335667220">Objects</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li61348275576">On the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b132501351112019">Objects</strong> tab page, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b11250651142011">Upload Object</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134142735713">Specify <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b166741139152">Storage Class</strong>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p819410917232">Do not select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b15813617181611">Archive</strong>. Otherwise, the migration will fail.</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li18291101435517"><span>Upload the backup file to the OBS bucket. </span><p><ol type="a" id="dcs-migration-0312004__en-us_topic_0000001893744560_ol16799172411561"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1713414272578">In the bucket list on the OBS console, click the name of the created bucket.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134202715717">In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b7335667220">Objects</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li61348275576">On the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b132501351112019">Objects</strong> tab page, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b11250651142011">Upload Object</strong>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li17134142735713">Specify <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b166741139152">Storage Class</strong>.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p819410917232">Do not select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b15813617181611">Archive</strong>. Otherwise, the migration will fail.</p>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li513562715716">Upload the objects.<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p19534101014172"><a name="dcs-migration-0312004__en-us_topic_0000001893744560_li513562715716"></a><a name="en-us_topic_0000001893744560_li513562715716"></a>Drag files or folders to the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b1466016717292">Upload Object</strong> area or click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b13375203619291">add file</strong>.</p>
|
||||
<p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1534181091717">A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB. If the total size of files to be uploaded exceeds 5 GB, click "How to Upload a File Larger than 5 GB" in the upper part of the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1831256132219">Upload Object</strong> dialog box and perform operations as instructed.</p>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li2013511276574">Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b4446102218714">Upload</strong>.</li></ol>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li390016374490"><span>Click <span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_image1225093910911" src="en-us_image_0000001963155450.png"></span> in the upper left corner and choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1829716568220">Distributed Cache Service for Redis</strong> under <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b11297155672219">Databases</strong> to open the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3976141122312">Data Migration</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1280408183113">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b5520013112315">Source Redis</strong> area, select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b85201113132311">OBS Bucket</strong> for <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b752051314230">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li144211117547"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1264738143811"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b109978308239">Target Redis</strong> area, select the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1499713302236">Target Redis Instance</strong> prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b678586674">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1464484671">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b390188571">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1746812449">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b38116245234">Successful</strong>.</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li390016374490"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b3976141122312">Data Migration</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_p1280408183113">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b5520013112315">Source Data</strong> area, select <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b85201113132311">OBS bucket</strong> for <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b752051314230">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li144211117547"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_li1264738143811"><span>In the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b109978308239">Target Data</strong> area, select the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1499713302236">Target Redis Instance</strong> prepared in <a href="#dcs-migration-0312004__en-us_topic_0000001893744560_section7611653155815">Prerequisites</a>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b31223114">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b453160796">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1294611119">Next</strong>.</span></li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_b1789717051">Submit</strong>.</span><p><p id="dcs-migration-0312004__en-us_topic_0000001893744560_dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0292910791_dcs-migration-190703002_b38116245234">Successful</strong>.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312004__en-us_topic_0000001893744560_section18148149291"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_p1571161034711">After the migration is complete, check data integrity in the following way.</p>
|
||||
<ol id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_ol11257313194715"><li id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect the source Redis and the target Redis. For details, see <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_b1984811531475">info keyspace</strong> command on the source and the target Redis to check the values of <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_b1884820539719">keys</strong> and <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_b118481653872">expires</strong>.<div class="fignone" id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_fig19418122142418"><span class="figcap"><b>Figure 1 </b>Checking instance data</span><br><span><img id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_image141813218246" src="en-us_image_0000001990974029.png"></span></div>
|
||||
</li><li id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312004__en-us_topic_0000001893744560_en-us_topic_0000001935864141_en-us_topic_0292880550_dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312008.html">Migrating Data Between DCS Instances</a></div>
|
||||
|
||||
@ -2,37 +2,35 @@
|
||||
|
||||
<h1 class="topictitle1">Migrating Redis from Another Cloud Online</h1>
|
||||
<div id="body1605611574151"><p id="dcs-migration-0312006__dcs-migration-190703003_p1244713381103">If the source and target instances are interconnected and the <strong id="dcs-migration-0312006__b105581587495">SYNC</strong> and <strong id="dcs-migration-0312006__b25591958184918">PSYNC</strong> commands are supported by the source instance, data can be migrated online in full or incrementally from another cloud to the target DCS.</p>
|
||||
<div class="note" id="dcs-migration-0312006__dcs-migration-190703003_note163110283525"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312006__dcs-migration-190703003_p4701259102114">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section77251317153217"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312006__dcs-migration-190703003_ul14396317163019"><li id="dcs-migration-0312006__li17890411372">If the <strong id="dcs-migration-0312006__b1331175045915">SYNC</strong> and <strong id="dcs-migration-0312006__b23117506593">PSYNC</strong> commands are disabled by the source instance, enable them by contacting the source vendor. Otherwise, the migration fails.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li15396117163010">You cannot use public networks for online migration.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li03966171308">During online migration, you are advised to set <strong id="dcs-migration-0312006__b145901593173515">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312006__b203454002373515">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-0312006__b177723090473515">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the source instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li13961317153011">The source must be Redis 3.0 or later.</li><li id="dcs-migration-0312006__li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-0312006__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section77251317153217"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312006__dcs-migration-190703003_ul14396317163019"><li id="dcs-migration-0312006__li17890411372">If the <strong id="dcs-migration-0312006__b1331175045915">SYNC</strong> and <strong id="dcs-migration-0312006__b23117506593">PSYNC</strong> commands are disabled by the source instance, enable them by contacting the source vendor. Otherwise, the migration fails.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li15396117163010">You cannot use public networks for online migration.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li03966171308">During online migration, you are advised to set <strong id="dcs-migration-0312006__b145901593173515">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312006__b203454002373515">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-0312006__b177723090473515">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the source instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li13961317153011">The source must be Redis 3.0 or later.</li><li id="dcs-migration-0312006__li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-0312006__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312006__li17587134317588"><strong id="dcs-migration-0312006__b1810214332128">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</strong></li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section15790816165711"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312006__dcs-migration-190703003_ul56215114194"><li id="dcs-migration-0312006__dcs-migration-190703003_li963201191917">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Tools and Schemes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li139861312152218">The IP address and port of the source Redis instance has been obtained.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li5270324091">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section15790816165711"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312006__dcs-migration-190703003_ul56215114194"><li id="dcs-migration-0312006__dcs-migration-190703003_li963201191917">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li139861312152218">The IP address and port of the source Redis instance has been obtained.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li5270324091">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section157769524519"><h4 class="sectiontitle">Creating an Online Migration Task</h4><ol id="dcs-migration-0312006__dcs-migration-190703003_ol81391154144716"><li id="dcs-migration-0312006__dcs-migration-190703003_li390016374490"><span>Log in to the DCS console using the account of the target DCS Redis instance.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1830151005519"><span>Click <span><img id="dcs-migration-0312006__dcs-migration-190703003_image07790385177" src="en-us_image_0143929918.png"></span> in the upper left corner of the console and select the region where your target instance is located.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b11427641642634">Data Migration</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li67372014165120"><span>Click <strong id="dcs-migration-0312006__dcs-migration-190703003_b61157650142634">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p15524526705">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><div class="note" id="dcs-migration-0312006__dcs-migration-190703003_note8226825195811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312006__dcs-migration-190703003_ul12308184119132"><li id="dcs-migration-0312006__dcs-migration-190703003_li1539920123575"><strong id="dcs-migration-0312006__dcs-migration-190703003_b10615958205517">Select the same VPC as the target Redis. Ensure that the migration resource can access the target Redis instance.</strong></li><li id="dcs-migration-0312006__dcs-migration-190703003_li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li18308441171318">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section157769524519"><h4 class="sectiontitle">Creating an Online Migration Task</h4><ol id="dcs-migration-0312006__dcs-migration-190703003_ol81391154144716"><li id="dcs-migration-0312006__dcs-migration-190703003_li390016374490"><span>Log in to the DCS console using the account of the target DCS Redis instance.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1830151005519"><span>Click <span><img id="dcs-migration-0312006__dcs-migration-190703003_image881083515291" src="en-us_image_0000001549115173.png"></span> in the upper left corner of the console and select the region where your target instance is located.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b11427641642634">Data Migration</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li67372014165120"><span>Click <strong id="dcs-migration-0312006__dcs-migration-190703003_b61157650142634">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p15524526705">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><ul id="dcs-migration-0312006__dcs-migration-190703003_ul1995182194019"><li id="dcs-migration-0312006__dcs-migration-190703003_li1539920123575"><strong id="dcs-migration-0312006__dcs-migration-190703003_b10615958205517">Select the same VPC as the target Redis. Ensure that the migration resource can access the target Redis instance.</strong></li><li id="dcs-migration-0312006__dcs-migration-190703003_li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li89513213403">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section117920569559"><h4 class="sectiontitle">Checking the Network</h4><ol id="dcs-migration-0312006__dcs-migration-190703003_ol1260417035216"><li id="dcs-migration-0312006__dcs-migration-190703003_li16049019525"><span>Check whether the source Redis instance, the target Redis instance, and the migration task are configured with the same VPC.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p188021330165115">If yes, go to <a href="#dcs-migration-0312006__dcs-migration-190703003_section14919536272">Configuring the Online Migration Task</a>. If no, go to <a href="#dcs-migration-0312006__dcs-migration-190703003_li160420185217">2</a>.</p>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li160420185217"><a name="dcs-migration-0312006__dcs-migration-190703003_li160420185217"></a><a name="dcs-migration-190703003_li160420185217"></a><span>Check whether the VPCs configured for the source Redis instance, the target Redis instance, and the migration task are connected to ensure that the VM resource of the migration task can access the source and target Redis instances.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p1480253095111">If yes, go to <a href="#dcs-migration-0312006__dcs-migration-190703003_section14919536272">Configuring the Online Migration Task</a>. If no, go to <a href="#dcs-migration-0312006__dcs-migration-190703003_li423483319412">3</a>.</p>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li423483319412"><a name="dcs-migration-0312006__dcs-migration-190703003_li423483319412"></a><a name="dcs-migration-190703003_li423483319412"></a><span>If the source and target Redis instances are on different clouds, create a connection using only Direct Connect. For details, see the <em id="dcs-migration-0312006__i15976103517313">Direct Connect User Guide</em>.</span></li></ol>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li423483319412"><a name="dcs-migration-0312006__dcs-migration-190703003_li423483319412"></a><a name="dcs-migration-190703003_li423483319412"></a><span>If the source and target Redis instances are on different clouds, create a Direct Connect connection. For details, see the <em id="dcs-migration-0312006__i15976103517313">Direct Connect User Guide</em>.</span></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section14919536272"><a name="dcs-migration-0312006__dcs-migration-190703003_section14919536272"></a><a name="dcs-migration-190703003_section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-0312006__dcs-migration-190703003_ol20242048298"><li id="dcs-migration-0312006__dcs-migration-190703003_li187884091914"><span>On the <strong id="dcs-migration-0312006__dcs-migration-190703003_b787651612226">Online Migration</strong> tab page, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b208765165228">Configure</strong> in the row containing the online migration task you just created.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li18777171715209"><span>Select a migration type.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p72342811211">Supported migration types are <strong id="dcs-migration-0312006__dcs-migration-190703003_b7961135591712">Full</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-0312006__dcs-migration-190703003_table55653322215">Table 1</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section14919536272"><a name="dcs-migration-0312006__dcs-migration-190703003_section14919536272"></a><a name="dcs-migration-190703003_section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-0312006__dcs-migration-190703003_ol20242048298"><li id="dcs-migration-0312006__dcs-migration-190703003_li141518544278"><span>Click <strong id="dcs-migration-0312006__dcs-migration-190703003_b199021033968">Next</strong> and configure the source and target Redis instances.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p1615195472713">If the resources are not ready yet, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b98531937869">Create</strong> to create a migration task. After they are ready, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b18532371069">Configure</strong> on the right of the task to continue its configuration.</p>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li18777171715209"><span>Select a migration type.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p72342811211">Supported migration types are <strong id="dcs-migration-0312006__dcs-migration-190703003_b7961135591712">Full</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-0312006__dcs-migration-190703003_table55653322215">Table 1</a>.</p>
|
||||
|
||||
<div class="tablenoborder"><a name="dcs-migration-0312006__dcs-migration-190703003_table55653322215"></a><a name="dcs-migration-190703003_table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-0312006__dcs-migration-190703003_table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-0312006__dcs-migration-190703003_row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.7.2.2.2.2.2.3.1.1"><p id="dcs-migration-0312006__dcs-migration-190703003_p758103372214">Migration Type</p>
|
||||
<div class="tablenoborder"><a name="dcs-migration-0312006__dcs-migration-190703003_table55653322215"></a><a name="dcs-migration-190703003_table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-0312006__dcs-migration-190703003_table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-0312006__dcs-migration-190703003_row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.6.2.2.2.2.2.3.1.1"><p id="dcs-migration-0312006__dcs-migration-190703003_p758103372214">Migration Type</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.7.2.2.2.2.2.3.1.2"><p id="dcs-migration-0312006__dcs-migration-190703003_p1058153311225">Description</p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.6.2.2.2.2.2.3.1.2"><p id="dcs-migration-0312006__dcs-migration-190703003_p1058153311225">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="dcs-migration-0312006__dcs-migration-190703003_row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312006__dcs-migration-190703003_p458153332210">Full</p>
|
||||
<tbody><tr id="dcs-migration-0312006__dcs-migration-190703003_row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312006__dcs-migration-190703003_p458153332210">Full</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312006__dcs-migration-190703003_p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-0312006__dcs-migration-190703003_b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312006__dcs-migration-190703003_p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-0312006__dcs-migration-190703003_b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-migration-0312006__dcs-migration-190703003_row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312006__dcs-migration-190703003_p85863316221">Full + incremental</p>
|
||||
<tr id="dcs-migration-0312006__dcs-migration-190703003_row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312006__dcs-migration-190703003_p85863316221">Full + incremental</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312006__dcs-migration-190703003_p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312006__dcs-migration-190703003_p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<p id="dcs-migration-0312006__dcs-migration-190703003_p110411470116">Once the migration starts, it remains <strong id="dcs-migration-0312006__dcs-migration-190703003_b1239633218259">Migrating</strong> until you click <strong id="dcs-migration-0312006__dcs-migration-190703003_b43962323258">Stop</strong> in the <strong id="dcs-migration-0312006__dcs-migration-190703003_b13961832182514">Operation</strong> column. After the migration is stopped, data in the source instance will not be lost, but data will not be written to the target instance. When the transmission network is stable, the delay of incremental migration is within seconds. The actual delay depends on the transmission quality of the network link.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -47,16 +45,15 @@
|
||||
</li><li id="dcs-migration-0312006__dcs-migration-190703003_li9907815183313">Configure <strong id="dcs-migration-0312006__dcs-migration-190703003_b993755923719">Target Redis Type</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b1582032133811">Target Redis Instance</strong>:<p id="dcs-migration-0312006__dcs-migration-190703003_p1765351142813">Set <strong id="dcs-migration-0312006__dcs-migration-190703003_b113540431316">Redis in the cloud</strong> for <strong id="dcs-migration-0312006__dcs-migration-190703003_b142121046732">Target Redis Type</strong> and add <strong id="dcs-migration-0312006__dcs-migration-190703003_b14980352338">Target Redis Instance</strong>.</p>
|
||||
</li><li id="dcs-migration-0312006__dcs-migration-190703003_li13145145319231">Configure <strong id="dcs-migration-0312006__dcs-migration-190703003_b19707205817319">Source Redis Instance Password</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b1770711584313">Target Redis Instance Password</strong>: If the instance is password-protected, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b6707258236">Test Connection</strong> to check whether the instance password is correct and whether the network is connected. If the instance is not password-protected, click <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b54195135235">Test Connection</strong> directly. If the test fails, check whether the password is correct, and whether the migration task network is connected.<p id="dcs-migration-0312006__dcs-migration-190703003_p1992114918157">If a DCS Redis instance is used, the users created in <a href="dcs-ug-221220.html">Managing Users</a> are currently unavailable.</p>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1348442114911"><span>Click <strong id="dcs-migration-0312006__dcs-migration-190703003_b13194159102331">Next</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-0312006__dcs-migration-190703003_b46184816117">Submit</strong>.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<p id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_p4880126112412">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-0312006__dcs-migration-190703003_b335084213548">Migration Logs</strong> page.</p>
|
||||
<div class="note" id="dcs-migration-0312006__dcs-migration-190703003_note4427420124517"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312006__dcs-migration-190703003_ul4321452125415"><li id="dcs-migration-0312006__dcs-migration-190703003_li1037218318491">Once incremental migration starts, it remains <strong id="dcs-migration-0312006__dcs-migration-190703003_b5271257515">Migrating</strong> after full migration.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-0312006__dcs-migration-190703003_b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li1348442114911"><span>Click <strong id="dcs-migration-0312006__dcs-migration-190703003_b1440582413532">Create</strong>.</span></li><li id="dcs-migration-0312006__dcs-migration-190703003_li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-0312006__dcs-migration-190703003_b46184816117">Submit</strong>.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<ul id="dcs-migration-0312006__dcs-migration-190703003_ul9276115554113"><li id="dcs-migration-0312006__dcs-migration-190703003_li6230145854111">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-0312006__dcs-migration-190703003_b335084213548">Migration Logs</strong> page.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1037218318491">Once incremental migration starts, it remains <strong id="dcs-migration-0312006__dcs-migration-190703003_b5271257515">Migrating</strong> after full migration.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-0312006__dcs-migration-190703003_b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section3718231268"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_p1571161034711">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-0312006__dcs-migration-190703003_ol1116739195110"><li id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-0312006__dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-0312006__dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312006__dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
<p id="dcs-migration-0312006__dcs-migration-190703003_p68531049182811">During full migration, source Redis data updated during the migration will not be migrated to the target instance.</p>
|
||||
<p id="dcs-migration-0312006__dcs-migration-190703003_p510235911518"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -1,35 +1,34 @@
|
||||
<a name="dcs-migration-0312010"></a><a name="dcs-migration-0312010"></a>
|
||||
|
||||
<h1 class="topictitle1">Self-Hosted Redis Migration with redis-cli (AOF)</h1>
|
||||
<div id="body1521621550550"><p id="dcs-migration-0312010__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. This section describes how to use redis-cli to migrate a data from a self-hosted Redis instance to a DCS instance.</p>
|
||||
<div id="body1521621550550"><p id="dcs-migration-0312010__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. This section describes how to use redis-cli to migrate a data from a self-hosted Redis instance to a DCS instance. To migrate the source backup to a DCS instance via an OBS bucket, see <a href="dcs-migration-190703002.html">Self-Hosted Redis Migration with Backup Files</a>.</p>
|
||||
<p id="dcs-migration-0312010__p187251431124014">An AOF file can be generated quickly. It applies to scenarios where you can access the Redis server and modify the configurations, such as scenarios with self-built Redis servers.</p>
|
||||
<div class="section" id="dcs-migration-0312010__section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312010__ul144975114312"><li id="dcs-migration-0312010__li11497511123114">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312010__li4497511153115">Smaller target instance specifications than source instance specifications may cause failures.</li><li id="dcs-migration-0312010__li43541426123817">Migrate data during off-peak hours.</li><li id="dcs-migration-0312010__li3936193514315">Before data migration, suspend your services so that data changes newly generated will not be lost during the migration.</li></ul>
|
||||
<div class="section" id="dcs-migration-0312010__section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312010__ul144975114312"><li id="dcs-migration-0312010__li11497511123114">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-0312010__li4497511153115">Migration may fail if the target instance uses smaller specifications than its source.</li><li id="dcs-migration-0312010__li43541426123817">Migrate data during off-peak hours.</li><li id="dcs-migration-0312010__li3936193514315">Before data migration, suspend your services so that newly generated data changes will not be lost during the migration.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312010__section722619530128"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312010__ul1119121144311"><li id="dcs-migration-0312010__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312010__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li><li id="dcs-migration-0312010__li72019114316">An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see <em id="dcs-migration-0312010__i397111469181"></em><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a>.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312010__section715982193316"><h4 class="sectiontitle">Generating an AOF File</h4><ol id="dcs-migration-0312010__ol51514326911"><li id="dcs-migration-0312010__li5535369167">Log in to the ECS.</li><li id="dcs-migration-0312010__li74512146382">Install redis-cli. The following steps assume that your client is installed on the Linux OS.<ol type="a" id="dcs-migration-0312010__ol14316633183210"><li id="dcs-migration-0312010__li61510320920">Run the following command to download Redis: You can also install other Redis versions. For details, see the <a href="https://redis.io/download?spm=a2c4g.11186623.2.15.4e732074zS4LSS#installation" target="_blank" rel="noopener noreferrer">Redis official website</a>.<pre class="screen" id="dcs-migration-0312010__screen49403453552">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</pre>
|
||||
</li><li id="dcs-migration-0312010__li145586109393">Run the following command to decompress the source code package of your Redis client:<pre class="screen" id="dcs-migration-0312010__screen11689857184920">tar -xzf redis-5.0.8.tar.gz</pre>
|
||||
</li><li id="dcs-migration-0312010__li5558131033913">Run the following commands to go to the Redis directory and compile the source code of your Redis client:<pre class="screen" id="dcs-migration-0312010__screen1140715135010">cd redis-5.0.8
|
||||
make
|
||||
cd src</pre>
|
||||
cd src
|
||||
make</pre>
|
||||
</li></ol>
|
||||
</li><li id="dcs-migration-0312010__li524113915916">Run the following command to enable cache persistence and obtain the AOF persistence file:<pre class="screen" id="dcs-migration-0312010__screen1914272120563">redis-cli -h {source_redis_address} -p {port} -a {password} config set appendonly yes</pre>
|
||||
</li><li id="dcs-migration-0312010__li524113915916">Run the following command to enable cache persistence and obtain the AOF persistence file:<pre class="screen" id="dcs-migration-0312010__screen1914272120563">redis-cli -h <em id="dcs-migration-0312010__i1577318272537">{source_redis_address}</em> -p <em id="dcs-migration-0312010__i143011530205312">{port}</em> -a <em id="dcs-migration-0312010__i1531713410532">{password}</em> config set appendonly yes</pre>
|
||||
<p id="dcs-migration-0312010__p250125111178"><em id="dcs-migration-0312010__i13984648182118">{source_redis_address}</em> is the connection address of the source Redis, <em id="dcs-migration-0312010__i171855567214">{port}</em> is the port of the source Redis, and <em id="dcs-migration-0312010__i72839692211">{password}</em> is the connection password of the source Redis.</p>
|
||||
<p id="dcs-migration-0312010__p1274325217213">If the size of the AOF file does not change after you have enabled persistence, the AOF file contains full cached data.</p>
|
||||
<div class="note" id="dcs-migration-0312010__note183105714711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-0312010__ul14169633163914"><li id="dcs-migration-0312010__li15169233123919">To find out the path for storing the AOF file, use redis-cli to access the Redis instance, and run the <strong id="dcs-migration-0312010__b61691633143916">config get dir</strong> command. Unless otherwise specified, the file is named as <strong id="dcs-migration-0312010__b9514329195810">appendonly.aof</strong> by default.</li><li id="dcs-migration-0312010__li151694330394">To disable synchronization after the AOF file is generated, use redis-cli to log in to the Redis instance and run the <strong id="dcs-migration-0312010__b171692033103916">config set appendonly no</strong> command.</li></ul>
|
||||
</div></div>
|
||||
<ul id="dcs-migration-0312010__ul46572428303"><li id="dcs-migration-0312010__li1212004563017">If the size of the AOF file does not change after you have enabled persistence, the AOF file contains full cached data.</li><li id="dcs-migration-0312010__li15169233123919">To find out the path for storing the AOF file, use redis-cli to access the Redis instance, and run the <strong id="dcs-migration-0312010__b61691633143916">config get dir</strong> command. Unless otherwise specified, the file is named as <strong id="dcs-migration-0312010__b9514329195810">appendonly.aof</strong> by default.</li><li id="dcs-migration-0312010__li1965718422303">To disable synchronization after the AOF file is generated, use redis-cli to log in to the Redis instance and run the <strong id="dcs-migration-0312010__b171692033103916">config set appendonly no</strong> command.</li></ul>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312010__section1146318206338"><h4 class="sectiontitle">Uploading the AOF file to ECS</h4><p id="dcs-migration-0312010__p155931633134017">To save time, you are advised to compress the AOF file and upload it to ECS using an appropriate mode (for example, SFTP mode).</p>
|
||||
<div class="note" id="dcs-migration-0312010__note22211616174320"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312010__dcs-migration-0312012_p1922181634311">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
</div></div>
|
||||
<p id="dcs-migration-0312010__dcs-migration-0312012_p1922181634311">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312010__section1458283216500"><h4 class="sectiontitle">Importing Data</h4><p id="dcs-migration-0312010__p674955013201">Log in to the ECS and run the following command to import data.</p>
|
||||
<pre class="screen" id="dcs-migration-0312010__screen556113424442">redis-cli -h {dcs_instance_address} -p {port} -a {password} --pipe < appendonly.aof</pre>
|
||||
<pre class="screen" id="dcs-migration-0312010__screen556113424442">redis-cli -h <em id="dcs-migration-0312010__i169361516548">{dcs_instance_address}</em> -p <em id="dcs-migration-0312010__i1127314194542">{port}</em> -a <em id="dcs-migration-0312010__i527733114548">{password}</em> --pipe < appendonly.aof</pre>
|
||||
<p id="dcs-migration-0312010__p9732153942313"><em id="dcs-migration-0312010__i582833142315">{dcs_instance_address}</em> indicates the address of the target Redis instance, <em id="dcs-migration-0312010__i222815396233">{port}</em> indicates the port of the target Redis instance, and <em id="dcs-migration-0312010__i25712477234">{password}</em> indicates the password for connecting to the target Redis instance.</p>
|
||||
<p id="dcs-migration-0312010__p1730911332441">It takes 4 to 10 seconds to import an AOF file of 1 million data (20 bytes per data segment) to a VPC.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312010__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312010__p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312010__b4358102614910">info</strong> command to check whether the data has been successfully imported as required. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312010__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312010__p279273895413">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-0312010__ol569010368361"><li id="dcs-migration-0312010__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-0312010__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312010__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-0312010__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-0312010__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-0312010__dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-0312010__dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-0312010__dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312010__dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312010__dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
<p id="dcs-migration-0312010__p1692631220146">If the import fails, check the procedure. If the import command is incorrect, run the <strong id="dcs-migration-0312010__b4876205882515">flushall</strong> or <strong id="dcs-migration-0312010__b7685714263">flushdb</strong> command to clear the cache data in the target instance, modify the import command, and try again.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<a name="dcs-migration-0312011"></a><a name="dcs-migration-0312011"></a>
|
||||
|
||||
<h1 class="topictitle1">Self-Hosted Redis Migration with redis-cli (RDB)</h1>
|
||||
<div id="body1526373894623"><p id="dcs-migration-0312011__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. redis-cli supports data export as an RDB file. If your Redis service does not support AOF file export, use redis-cli to obtain an RDB file. Then, use another tool (such as redis-shake) to import the file to a DCS instance.</p>
|
||||
<div id="body1526373894623"><p id="dcs-migration-0312011__p98811414163215">redis-cli is the command line tool of Redis, which can be used after you install the Redis server. redis-cli supports data export as an RDB file. If your Redis service does not support AOF file export, use redis-cli to obtain an RDB file. Then, use another tool (such as redis-shake) to import the file to a DCS instance. To migrate the source backup to a DCS instance via an OBS bucket, see <a href="dcs-migration-190703002.html">Self-Hosted Redis Migration with Backup Files</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312011__section01321811133220"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-0312011__ul1383184352119"><li id="dcs-migration-0312011__li55401126183312">Migrate data during off-peak hours.</li><li id="dcs-migration-0312011__li1154265184218">When the source is Redis native cluster data, individually export the data of each node in the cluster, and then import the data node by node.</li><li id="dcs-migration-0312011__li921571317245">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312011__section722619530128"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312011__ul1986482133811"><li id="dcs-migration-0312011__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-0312011__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
@ -19,8 +19,8 @@ save 60 10000 //Writes changed data into an RDB file if there are more than 10,0
|
||||
</li><li id="dcs-migration-0312011__li5535369167">Log in to the ECS.</li><li id="dcs-migration-0312011__li61510320920">Install redis-cli. The following steps assume that your client is installed on the Linux OS.<ol type="a" id="dcs-migration-0312011__dcs-migration-0312010_ol14316633183210"><li id="dcs-migration-0312011__dcs-migration-0312010_li61510320920">Run the following command to download Redis: You can also install other Redis versions. For details, see the <a href="https://redis.io/download?spm=a2c4g.11186623.2.15.4e732074zS4LSS#installation" target="_blank" rel="noopener noreferrer">Redis official website</a>.<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen49403453552">wget http://download.redis.io/releases/redis-5.0.8.tar.gz</pre>
|
||||
</li><li id="dcs-migration-0312011__dcs-migration-0312010_li145586109393">Run the following command to decompress the source code package of your Redis client:<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen11689857184920">tar -xzf redis-5.0.8.tar.gz</pre>
|
||||
</li><li id="dcs-migration-0312011__dcs-migration-0312010_li5558131033913">Run the following commands to go to the Redis directory and compile the source code of your Redis client:<pre class="screen" id="dcs-migration-0312011__dcs-migration-0312010_screen1140715135010">cd redis-5.0.8
|
||||
make
|
||||
cd src</pre>
|
||||
cd src
|
||||
make</pre>
|
||||
</li></ol>
|
||||
</li><li id="dcs-migration-0312011__li15744151813501">Run the following command to export the RDB file:<pre class="screen" id="dcs-migration-0312011__screen17614142965716">redis-cli -h <em id="dcs-migration-0312011__i02045745318">{source_redis_address}</em> -p <em id="dcs-migration-0312011__i871581011537">{port}</em> -a <em id="dcs-migration-0312011__i1825120148535">{password}</em> --rdb <em id="dcs-migration-0312011__i1354615193531">{output.rdb}</em></pre>
|
||||
<p id="dcs-migration-0312011__p1912591714586"><em id="dcs-migration-0312011__i166361442113616">{source_redis_address}</em> is the connection address of the source Redis, <em id="dcs-migration-0312011__i13637174283617">{port}</em> is the port of the source Redis, <em id="dcs-migration-0312011__i1637242183614">{password}</em> is the connection password of the source Redis, and <em id="dcs-migration-0312011__i449763413377">{output.rdb}</em> is the RDB file name.</p>
|
||||
@ -28,13 +28,14 @@ cd src</pre>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312011__section1146318206338"><h4 class="sectiontitle">Uploading the RDB File to ECS</h4><p id="dcs-migration-0312011__p35492597526">To save time, you are advised to compress the RDB file and upload it to ECS using an appropriate mode (for example, SFTP mode).</p>
|
||||
<div class="note" id="dcs-migration-0312011__note22211616174320"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-0312012_p1922181634311">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
</div></div>
|
||||
<p id="dcs-migration-0312011__p1892282317124">Ensure that the ECS has sufficient disk space for data file decompression, and can communicate with the DCS instance. Generally, the ECS and DCS instance are configured to belong to the same VPC and subnet, and the configured security group rules do not restrict access ports. For details about how to configure a security group, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312011__section1458283216500"><h4 class="sectiontitle">Importing Data</h4><p id="dcs-migration-0312011__p61091244194614">Use redis-shake to import data.</p>
|
||||
<p id="dcs-migration-0312011__p1363992155616">It takes 4 to 10 seconds to import an RDB file of 1 million data (20 bytes per data segment) to a VPC.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-0312011__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312011__dcs-migration-0312010_p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-0312011__dcs-migration-0312010_b4358102614910">info</strong> command to check whether the data has been successfully imported as required. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
|
||||
<div class="section" id="dcs-migration-0312011__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312011__dcs-migration-0312010_p279273895413">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-0312011__dcs-migration-0312010_ol569010368361"><li id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312011__dcs-migration-0312010_dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
<p id="dcs-migration-0312011__dcs-migration-0312010_p1692631220146">If the import fails, check the procedure. If the import command is incorrect, run the <strong id="dcs-migration-0312011__dcs-migration-0312010_b4876205882515">flushall</strong> or <strong id="dcs-migration-0312011__dcs-migration-0312010_b7685714263">flushdb</strong> command to clear the cache data in the target instance, modify the import command, and try again.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@ chmod +x rump;</pre>
|
||||
</li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-090626001_0__section141871352314"><h4 class="sectiontitle">Migrating Data</h4><p id="dcs-migration-090626001_0__p108479412467">Run the following command to migrate data:</p>
|
||||
<pre class="screen" id="dcs-migration-090626001_0__screen13983121614716">rump -from {source_redis_address} -to {target_redis_address}</pre>
|
||||
<pre class="screen" id="dcs-migration-090626001_0__screen13983121614716">rump -from <em id="dcs-migration-090626001_0__i15701192145611">{source_redis_address}</em> -to <em id="dcs-migration-090626001_0__i1655612514564">{target_redis_address}</em></pre>
|
||||
<ul id="dcs-migration-090626001_0__ul1329418594559"><li id="dcs-migration-090626001_0__li729495905515"><em id="dcs-migration-090626001_0__i145831453099">{source_redis_address}</em><p id="dcs-migration-090626001_0__p18240112751315">Source Redis instance address, in the format of redis://[user:password@]host:port/db. <strong id="dcs-migration-090626001_0__b1443491331614">[user:password@]</strong> is optional. If the instance is accessed in password-protected mode, you must specify the password in the RFC 3986 format. <strong id="dcs-migration-090626001_0__b1362925162011">user</strong> can be omitted, but the colon (:) cannot be omitted. For example, the address may be <strong id="dcs-migration-090626001_0__b1328114243813">redis://:mypassword@192.168.0.45:6379/1</strong>.</p>
|
||||
<p id="dcs-migration-090626001_0__p6431942563"><strong id="dcs-migration-090626001_0__b19217515151510">db</strong> is the sequence number of the database. If it is not specified, the default value is 0.</p>
|
||||
</li><li id="dcs-migration-090626001_0__li112941859115514">{<em id="dcs-migration-090626001_0__i1792821155512">target_redis_address</em>}<p id="dcs-migration-090626001_0__p5557561916">Address of the target Redis instance, in the same format as the source.</p>
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<td class="cellrowborder" rowspan="3" valign="top" width="19.3%" headers="mcps1.3.2.3.2.5.1.2 "><p id="dcs-migration-090626002__p4719133623517">DCS console</p>
|
||||
<p id="dcs-migration-090626002__p12190177115511"></p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="41.17%" headers="mcps1.3.2.3.2.5.1.3 "><p id="dcs-migration-090626002__p34967352372">Migrate data from an earlier-version DCS Redis instance to a later-version DCS Redis instance, for example, from a DCS Redis 3.0 instance to a DCS Redis 4.0/5.0/6.0 instance.</p>
|
||||
<td class="cellrowborder" valign="top" width="41.17%" headers="mcps1.3.2.3.2.5.1.3 "><p id="dcs-migration-090626002__p34967352372">Migrate data from an earlier-version DCS Redis instance to a later-version DCS Redis instance, for example, from a DCS Redis 3.0 instance to a DCS Redis 6.0 instance.</p>
|
||||
<ul id="dcs-migration-090626002__ul182661246163717"><li id="dcs-migration-090626002__li11266146153718">If the network between the source and target DCS Redis instances is connected, follow the instructions in <a href="dcs-migration-0312003.html">Online Migration Between Instances</a>.</li><li id="dcs-migration-090626002__li14941149113714">If the network is not connected, follow the instructions in <a href="dcs-migration-0312004.html">Backup Import Between DCS Redis Instances</a>.</li></ul>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="23.47%" headers="mcps1.3.2.3.2.5.1.4 "><p id="dcs-migration-090626002__p9807143810205"><strong id="dcs-migration-090626002__b104871526336">Attempts to migrate data from a later-version Redis instance to an earlier-version Redis instance are not recommended because they will fail</strong> due to data compatibility issues between different Redis versions.</p>
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<h1 class="topictitle1">Backup Import from Another Cloud</h1>
|
||||
<div id="body1605605971285"><p id="dcs-migration-1117001__dcs-migration-190703002_p592264013322">This section describes how to migrate Redis from another cloud to DCS by importing backup files.</p>
|
||||
<p id="dcs-migration-1117001__dcs-migration-190703002_p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same account and region as the target DCS Redis instance. After you have created a migration task on the DCS console, DCS will read data from the OBS bucket and data will be migrated to the target instance.</p>
|
||||
<div class="section" id="dcs-migration-1117001__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migration-1117001__en-us_topic_0000001893744560_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
|
||||
<div class="section" id="dcs-migration-1117001__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-1117001__en-us_topic_0000001893744560_ul365114368261"><li id="dcs-migration-1117001__en-us_topic_0000001893744560_li5651123602613">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-1117001__en-us_topic_0000001893744560_li96511336112619">Migration may fail if the target instance uses smaller specifications than its source.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-1117001__dcs-migration-190703002_section393611177"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-1117001__dcs-migration-190703002_ul20616194735711"><li id="dcs-migration-1117001__dcs-migration-190703002_li1953741872914">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Tools and Schemes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li17389364337">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li16161947155711">Prepare the source Redis backup file. The backup file must be in .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
<div class="section" id="dcs-migration-1117001__dcs-migration-190703002_section393611177"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-1117001__dcs-migration-190703002_ul20616194735711"><li id="dcs-migration-1117001__dcs-migration-190703002_li1953741872914">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li17389364337">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li16161947155711">Prepare the source Redis backup file. The backup file must be in .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-1117001__dcs-migration-190703002_li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-1117001__dcs-migration-190703002_section119981132024"><h4 class="sectiontitle">Creating an OBS Bucket and Uploading Backup Files</h4><ol id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li526813435394"><span>Create an OBS bucket.</span><p><ol type="a" id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol1428871018424"><li id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li928820103427">Log in to the OBS Console and click <strong id="dcs-migration-1117001__dcs-ug-0312037_b166887291556">Create Bucket</strong>.</li><li id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810">Select a region.<p id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p6758547101115"><a name="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a><a name="dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a>The OBS bucket must be in the same region as the target DCS Redis instance.</p>
|
||||
</li><li id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li17551201611127">Specify <strong id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b35011159155518">Bucket Name</strong>.<p id="dcs-migration-1117001__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p13756232101216">The bucket name must meet the naming rules specified on the console.</p>
|
||||
@ -23,9 +23,13 @@
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-1117001__dcs-migration-190703002_section9876193816277"><h4 class="sectiontitle">Creating a Migration Task</h4><ol id="dcs-migration-1117001__dcs-migration-190703002_ol81391154144716"><li id="dcs-migration-1117001__dcs-migration-190703002_li03689479305"><span>Go to the DCS console.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-1117001__dcs-migration-190703002_b1073120416274">Data Migration</strong>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-1117001__dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span><p><p id="dcs-migration-1117001__dcs-migration-190703002_p044117593568">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-1117001__dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-1117001__dcs-migration-190703002_b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-1117001__dcs-migration-190703002_b19787171684717">OBS Bucket</strong> for <strong id="dcs-migration-1117001__dcs-migration-190703002_b19254112645013">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li1281412951215"><span>Click <strong id="dcs-migration-1117001__dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li1264738143811"><span>In the <strong id="dcs-migration-1117001__dcs-migration-190703002_b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-1117001__dcs-migration-190703002_b81601464910">Target Redis Instance</strong> prepared in <a href="dcs-migration-190703002.html#dcs-migration-190703002__section393611177">Prerequisites</a>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-1117001__dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-1117001__dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-1117001__dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-1117001__dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-1117001__dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-1117001__dcs-migration-190703002_b38116245234">Successful</strong>.</p>
|
||||
</p></li><li id="dcs-migration-1117001__dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-1117001__dcs-migration-190703002_b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-1117001__dcs-migration-190703002_b19787171684717">OBS bucket</strong> for <strong id="dcs-migration-1117001__dcs-migration-190703002_b19254112645013">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li1281412951215"><span>Click <strong id="dcs-migration-1117001__dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li1264738143811"><span>In the <strong id="dcs-migration-1117001__dcs-migration-190703002_b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-1117001__dcs-migration-190703002_b81601464910">Target Redis Instance</strong> prepared in <a href="dcs-migration-190703002.html#dcs-migration-190703002__section393611177">Prerequisites</a>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-1117001__dcs-migration-190703002_b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-1117001__dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-1117001__dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-1117001__dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-1117001__dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-1117001__dcs-migration-190703002_p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-1117001__dcs-migration-190703002_b38116245234">Successful</strong>.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-1117001__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-1117001__dcs-migration-190703002_p279273895413">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-1117001__dcs-migration-190703002_ol569010368361"><li id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-1117001__dcs-migration-190703002_dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<h1 class="topictitle1">Self-Hosted Redis Migration with Backup Files</h1>
|
||||
<div id="body1562138749036"><p id="dcs-migration-190703002__p592264013322">This section describes how to migrate self-hosted Redis to DCS by importing backup files.</p>
|
||||
<p id="dcs-migration-190703002__p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same account and region as the target DCS Redis instance. After you have created a migration task on the DCS console, DCS will read data from the OBS bucket and data will be migrated to the target instance.</p>
|
||||
<div class="section" id="dcs-migration-190703002__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-migration-190703002__en-us_topic_0000001893744560_p1469113513465">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</p>
|
||||
<div class="section" id="dcs-migration-190703002__section025432520201"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-190703002__en-us_topic_0000001893744560_ul365114368261"><li id="dcs-migration-190703002__en-us_topic_0000001893744560_li5651123602613">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-190703002__en-us_topic_0000001893744560_li96511336112619">Migration may fail if the target instance uses smaller specifications than its source.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703002__section393611177"><a name="dcs-migration-190703002__section393611177"></a><a name="section393611177"></a><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-190703002__ul20616194735711"><li id="dcs-migration-190703002__li1953741872914">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Tools and Schemes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-190703002__li17389364337">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</li><li id="dcs-migration-190703002__li16161947155711">Prepare the source Redis backup file. The backup file must be in .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-190703002__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-190703002__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
<div class="section" id="dcs-migration-190703002__section393611177"><a name="dcs-migration-190703002__section393611177"></a><a name="section393611177"></a><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-190703002__ul20616194735711"><li id="dcs-migration-190703002__li1953741872914">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-190703002__li17389364337">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</li><li id="dcs-migration-190703002__li16161947155711">Prepare the source Redis backup file. The backup file must be in .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-190703002__li20949052135714">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-190703002__li125429292588">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703002__section119981132024"><h4 class="sectiontitle">Creating an OBS Bucket and Uploading Backup Files</h4><ol id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li526813435394"><span>Create an OBS bucket.</span><p><ol type="a" id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol1428871018424"><li id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li928820103427">Log in to the OBS Console and click <strong id="dcs-migration-190703002__dcs-ug-0312037_b166887291556">Create Bucket</strong>.</li><li id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810">Select a region.<p id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p6758547101115"><a name="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a><a name="dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a>The OBS bucket must be in the same region as the target DCS Redis instance.</p>
|
||||
</li><li id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li17551201611127">Specify <strong id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b35011159155518">Bucket Name</strong>.<p id="dcs-migration-190703002__dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p13756232101216">The bucket name must meet the naming rules specified on the console.</p>
|
||||
@ -23,11 +23,12 @@
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703002__section9876193816277"><h4 class="sectiontitle">Creating a Migration Task</h4><ol id="dcs-migration-190703002__ol81391154144716"><li id="dcs-migration-190703002__li03689479305"><span>Go to the DCS console.</span></li><li id="dcs-migration-190703002__li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-190703002__b1073120416274">Data Migration</strong>.</span></li><li id="dcs-migration-190703002__li67372014165120"><span>Click <strong id="dcs-migration-190703002__b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-190703002__li14133134613500"><span>Enter the task name and description.</span><p><p id="dcs-migration-190703002__p044117593568">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-190703002__li7814624195313"><span>In the <strong id="dcs-migration-190703002__b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-190703002__b19787171684717">OBS Bucket</strong> for <strong id="dcs-migration-190703002__b19254112645013">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-190703002__li1281412951215"><span>Click <strong id="dcs-migration-190703002__b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-190703002__li1264738143811"><span>In the <strong id="dcs-migration-190703002__b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-190703002__b81601464910">Target Redis Instance</strong> prepared in <a href="#dcs-migration-190703002__section393611177">Prerequisites</a>.</span></li><li id="dcs-migration-190703002__dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-190703002__b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-190703002__b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-190703002__li949595110140"><span>Click <strong id="dcs-migration-190703002__b423713107215">Next</strong>.</span></li><li id="dcs-migration-190703002__li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-190703002__b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-190703002__p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-190703002__b38116245234">Successful</strong>.</p>
|
||||
</p></li><li id="dcs-migration-190703002__li7814624195313"><span>In the <strong id="dcs-migration-190703002__b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-190703002__b19787171684717">OBS bucket</strong> for <strong id="dcs-migration-190703002__b19254112645013">Data Source</strong> and then select the OBS bucket to which you have uploaded backup files.</span></li><li id="dcs-migration-190703002__li1281412951215"><span>Click <strong id="dcs-migration-190703002__b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-190703002__li1264738143811"><span>In the <strong id="dcs-migration-190703002__b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-190703002__b81601464910">Target Redis Instance</strong> prepared in <a href="#dcs-migration-190703002__section393611177">Prerequisites</a>.</span></li><li id="dcs-migration-190703002__dcs-migration-190703002_li101346111301"><span>If the target Redis instance has a password, enter the password and click <strong id="dcs-migration-190703002__b26391638134910">Test Connection</strong> to check whether the password is correct. If the instance is not password-protected, click <strong id="dcs-migration-190703002__b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-190703002__li949595110140"><span>Click <strong id="dcs-migration-190703002__b423713107215">Next</strong>.</span></li><li id="dcs-migration-190703002__li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-190703002__b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-190703002__p104923381679">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-190703002__b38116245234">Successful</strong>.</p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703002__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-190703002__dcs-migration-0312010_p279273895413">After the data is imported successfully, access the DCS instance and run the <strong id="dcs-migration-190703002__dcs-migration-0312010_b4358102614910">info</strong> command to check whether the data has been successfully imported as required. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</p>
|
||||
<p id="dcs-migration-190703002__dcs-migration-0312010_p1692631220146">If the import fails, check the procedure. If the import command is incorrect, run the <strong id="dcs-migration-190703002__dcs-migration-0312010_b4876205882515">flushall</strong> or <strong id="dcs-migration-190703002__dcs-migration-0312010_b7685714263">flushdb</strong> command to clear the cache data in the target instance, modify the import command, and try again.</p>
|
||||
<div class="section" id="dcs-migration-190703002__section1762337185412"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-190703002__p279273895413">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-190703002__ol569010368361"><li id="dcs-migration-190703002__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-190703002__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-190703002__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-190703002__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-190703002__dcs-migration-190703003_en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-190703002__dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-190703002__dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-190703002__dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-190703002__dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-190703002__dcs-migration-190703003_b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -2,38 +2,36 @@
|
||||
|
||||
<h1 class="topictitle1">Migrating Self-Built Redis Online</h1>
|
||||
<div id="body1562138749036"><p id="dcs-migration-190703003__p1244713381103">If the source self-host and target instances are interconnected and the <strong id="dcs-migration-190703003__b18112161719418">SYNC</strong> and <strong id="dcs-migration-190703003__b01122172041">PSYNC</strong> commands are supported by the source instance, data can be migrated online in full or incrementally from the source to the target DCS.</p>
|
||||
<div class="note" id="dcs-migration-190703003__note163110283525"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migration-190703003__p4701259102114">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migration-190703003__section77251317153217"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-190703003__ul14396317163019"><li id="dcs-migration-190703003__li1657415321689">If the <strong id="dcs-migration-190703003__b1255891994619">SYNC</strong> and <strong id="dcs-migration-190703003__b655815190465">PSYNC</strong> commands are disabled by the source instance, enable them before migrating data. Otherwise, the migration fails.</li><li id="dcs-migration-190703003__li15396117163010">You cannot use public networks for online migration.</li><li id="dcs-migration-190703003__li03966171308">During online migration, you are advised to set <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b9548141910176">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b16885030121716">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-190703003__b143014479573">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the source instance.</li><li id="dcs-migration-190703003__li13961317153011">The source must be Redis 3.0 or later.</li><li id="dcs-migration-190703003__li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-190703003__li773103010264">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li></ul>
|
||||
<div class="section" id="dcs-migration-190703003__section77251317153217"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-migration-190703003__ul14396317163019"><li id="dcs-migration-190703003__li1657415321689">If the <strong id="dcs-migration-190703003__b1255891994619">SYNC</strong> and <strong id="dcs-migration-190703003__b655815190465">PSYNC</strong> commands are disabled by the source instance, enable them before migrating data. Otherwise, the migration fails.</li><li id="dcs-migration-190703003__li15396117163010">You cannot use public networks for online migration.</li><li id="dcs-migration-190703003__li03966171308">During online migration, you are advised to set <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b9548141910176">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b16885030121716">client-output-buffer-slave-hard-limit</strong> and <strong id="dcs-migration-190703003__b143014479573">client-output-buffer-slave-soft-limit</strong> to 20% of the maximum memory of the source instance.</li><li id="dcs-migration-190703003__li13961317153011">The source must be Redis 3.0 or later.</li><li id="dcs-migration-190703003__li18051932613">For earlier instances whose passwords contain single quotation marks ('), modify the password for online migration or try other methods.</li><li id="dcs-migration-190703003__li773103010264">To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see <a href="dcs-ug-023129.html">Transmitting DCS Redis Data with Encryption Using SSL</a>.</li><li id="dcs-migration-190703003__li1743125453920"><strong id="dcs-migration-190703003__b553163711502">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours. Otherwise, source instance CPU usage may surge and latency may increase.</strong></li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703003__section15790816165711"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-190703003__ul56215114194"><li id="dcs-migration-190703003__li963201191917">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Tools and Schemes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-190703003__li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</li><li id="dcs-migration-190703003__li139861312152218">The IP address and port of the source Redis instance has been obtained.</li><li id="dcs-migration-190703003__li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-190703003__li5270324091">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
<div class="section" id="dcs-migration-190703003__section15790816165711"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-190703003__ul56215114194"><li id="dcs-migration-190703003__li963201191917">Before migrating data, read through <a href="dcs-migration-090626002.html">Migration Solution Notes</a> to learn about the DCS data migration function and select an appropriate target instance.</li><li id="dcs-migration-190703003__li2988793125">By default, a cluster instance has only one DB (DB0). Before you migrate data from a multi-DB single-node or master/standby instance to a Redis Cluster instance, check whether any data exists on databases other than DB0. To ensure that the migration succeeds, move all data to DB0 by referring to <a href="dcs-migration-090626001_0.html">Online Migration from Another Cloud Using Rump</a>.</li><li id="dcs-migration-190703003__li139861312152218">The IP address and port of the source Redis instance has been obtained.</li><li id="dcs-migration-190703003__li1527810451382">If a target DCS Redis instance is not available, create one first. For details, see <a href="dcs-ug-0312003.html">Creating a DCS Redis Instance</a>.</li><li id="dcs-migration-190703003__li5270324091">If you already have a DCS Redis instance, you do not need to create one again. For comparing migration data and reserving sufficient memory, you are advised to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703003__section157769524519"><a name="dcs-migration-190703003__section157769524519"></a><a name="section157769524519"></a><h4 class="sectiontitle">Creating an Online Migration Task</h4><ol id="dcs-migration-190703003__ol81391154144716"><li id="dcs-migration-190703003__li390016374490"><span>Log in to the DCS console using the account of the target DCS Redis instance.</span></li><li id="dcs-migration-190703003__li1830151005519"><span>Click <span><img id="dcs-migration-190703003__image07790385177" src="en-us_image_0143929918.png"></span> in the upper left corner of the console and select the region where your target instance is located.</span></li><li id="dcs-migration-190703003__li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b11427641642634">Data Migration</strong>.</span></li><li id="dcs-migration-190703003__li67372014165120"><span>Click <strong id="dcs-migration-190703003__b61157650142634">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-190703003__li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-190703003__p15524526705">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-190703003__li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><div class="note" id="dcs-migration-190703003__note8226825195811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-190703003__ul12308184119132"><li id="dcs-migration-190703003__li1539920123575"><strong id="dcs-migration-190703003__b10615958205517">Select the same VPC as the target Redis. Ensure that the migration resource can access the target Redis instance.</strong></li><li id="dcs-migration-190703003__li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-190703003__li18308441171318">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-migration-190703003__section157769524519"><a name="dcs-migration-190703003__section157769524519"></a><a name="section157769524519"></a><h4 class="sectiontitle">Creating an Online Migration Task</h4><ol id="dcs-migration-190703003__ol81391154144716"><li id="dcs-migration-190703003__li390016374490"><span>Log in to the DCS console using the account of the target DCS Redis instance.</span></li><li id="dcs-migration-190703003__li1830151005519"><span>Click <span><img id="dcs-migration-190703003__image881083515291" src="en-us_image_0000001549115173.png"></span> in the upper left corner of the console and select the region where your target instance is located.</span></li><li id="dcs-migration-190703003__li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b11427641642634">Data Migration</strong>.</span></li><li id="dcs-migration-190703003__li67372014165120"><span>Click <strong id="dcs-migration-190703003__b61157650142634">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-190703003__li1381824764611"><span>Enter the task name and description.</span><p><p id="dcs-migration-190703003__p15524526705">The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).</p>
|
||||
</p></li><li id="dcs-migration-190703003__li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><ul id="dcs-migration-190703003__ul1995182194019"><li id="dcs-migration-190703003__li1539920123575"><strong id="dcs-migration-190703003__b10615958205517">Select the same VPC as the target Redis. Ensure that the migration resource can access the target Redis instance.</strong></li><li id="dcs-migration-190703003__li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b167811718103719">Basic Information</strong> page of the task.) If a whitelist is configured for the source or target instance, add the migration IP address to the whitelist or disable the whitelist.</li><li id="dcs-migration-190703003__li89513213403">To allow the VM used by the migration task to access the source and target instances, set an outbound rule for the task's security group to allow traffic through the IP addresses and ports of the source and target instances. By default, all outbound traffic is allowed.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703003__section117920569559"><h4 class="sectiontitle">Checking the Network</h4><ol id="dcs-migration-190703003__ol1260417035216"><li id="dcs-migration-190703003__li16049019525"><span>Check whether the source Redis instance, the target Redis instance, and the migration task are configured with the same VPC.</span><p><p id="dcs-migration-190703003__p188021330165115">If yes, go to <a href="#dcs-migration-190703003__section157769524519">Creating an Online Migration Task</a>. If no, go to <a href="#dcs-migration-190703003__li160420185217">2</a>.</p>
|
||||
</p></li><li id="dcs-migration-190703003__li160420185217"><a name="dcs-migration-190703003__li160420185217"></a><a name="li160420185217"></a><span>Check whether the VPCs configured for the source Redis instance, the target Redis instance, and the migration task are connected to ensure that the VM resource of the migration task can access the source and target Redis instances.</span><p><p id="dcs-migration-190703003__p1480253095111">If yes, go to <a href="#dcs-migration-190703003__section14919536272">Configuring the Online Migration Task</a>. If no, go to <a href="#dcs-migration-190703003__li423483319412">3</a>.</p>
|
||||
</p></li><li id="dcs-migration-190703003__li423483319412"><a name="dcs-migration-190703003__li423483319412"></a><a name="li423483319412"></a><span>Perform the following operations to establish the network.</span><p><ul id="dcs-migration-190703003__ul17325432414"><li id="dcs-migration-190703003__li7271615152516">If the VPC of the source and target Redis instances are of the same cloud vendor and in the same region, create a VPC peering connection by referring to "VPC Peering Connection" in the <em id="dcs-migration-190703003__i4602173825519">Virtual Private Cloud User Guide</em>.</li><li id="dcs-migration-190703003__li1073215431842">If the source and target Redis instances are on different clouds or in different regions, create a connection using only Direct Connect. For details, see the <em id="dcs-migration-190703003__i22974405618">Direct Connect User Guide</em>.</li></ul>
|
||||
</p></li><li id="dcs-migration-190703003__li423483319412"><a name="dcs-migration-190703003__li423483319412"></a><a name="li423483319412"></a><span>Perform the following operations to establish the network.</span><p><ul id="dcs-migration-190703003__ul17325432414"><li id="dcs-migration-190703003__li7271615152516">If the VPC of the source and target Redis instances are of the same cloud vendor and in the same region, create a VPC peering connection by referring to "VPC Peering Connection" in the <em id="dcs-migration-190703003__i4602173825519">Virtual Private Cloud User Guide</em>.</li><li id="dcs-migration-190703003__li1073215431842">If the source and target Redis instances are on different clouds or in different regions, create a Direct Connect connection. For details, see the <em id="dcs-migration-190703003__i22974405618">Direct Connect User Guide</em>.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703003__section14919536272"><a name="dcs-migration-190703003__section14919536272"></a><a name="section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-190703003__ol20242048298"><li id="dcs-migration-190703003__li187884091914"><span>On the <strong id="dcs-migration-190703003__b787651612226">Online Migration</strong> tab page, click <strong id="dcs-migration-190703003__b208765165228">Configure</strong> in the row containing the online migration task you just created.</span></li><li id="dcs-migration-190703003__li18777171715209"><span>Select a migration type.</span><p><p id="dcs-migration-190703003__p72342811211">Supported migration types are <strong id="dcs-migration-190703003__b7961135591712">Full</strong> and <strong id="dcs-migration-190703003__b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-190703003__table55653322215">Table 1</a>.</p>
|
||||
<div class="section" id="dcs-migration-190703003__section14919536272"><a name="dcs-migration-190703003__section14919536272"></a><a name="section14919536272"></a><h4 class="sectiontitle">Configuring the Online Migration Task</h4><ol id="dcs-migration-190703003__ol20242048298"><li id="dcs-migration-190703003__li141518544278"><span>Click <strong id="dcs-migration-190703003__b199021033968">Next</strong> and configure the source and target Redis instances.</span><p><p id="dcs-migration-190703003__p1615195472713">If the resources are not ready yet, click <strong id="dcs-migration-190703003__b98531937869">Create</strong> to create a migration task. After they are ready, click <strong id="dcs-migration-190703003__b18532371069">Configure</strong> on the right of the task to continue its configuration.</p>
|
||||
</p></li><li id="dcs-migration-190703003__li18777171715209"><span>Select a migration type.</span><p><p id="dcs-migration-190703003__p72342811211">Supported migration types are <strong id="dcs-migration-190703003__b7961135591712">Full</strong> and <strong id="dcs-migration-190703003__b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-190703003__table55653322215">Table 1</a>.</p>
|
||||
|
||||
<div class="tablenoborder"><a name="dcs-migration-190703003__table55653322215"></a><a name="table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-190703003__table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-190703003__row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.7.2.2.2.2.2.3.1.1"><p id="dcs-migration-190703003__p758103372214">Migration Type</p>
|
||||
<div class="tablenoborder"><a name="dcs-migration-190703003__table55653322215"></a><a name="table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-190703003__table55653322215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Migration type description</caption><thead align="left"><tr id="dcs-migration-190703003__row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.6.2.2.2.2.2.3.1.1"><p id="dcs-migration-190703003__p758103372214">Migration Type</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.7.2.2.2.2.2.3.1.2"><p id="dcs-migration-190703003__p1058153311225">Description</p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.6.2.2.2.2.2.3.1.2"><p id="dcs-migration-190703003__p1058153311225">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="dcs-migration-190703003__row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.2.2.3.1.1 "><p id="dcs-migration-190703003__p458153332210">Full</p>
|
||||
<tbody><tr id="dcs-migration-190703003__row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.2.2.3.1.1 "><p id="dcs-migration-190703003__p458153332210">Full</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.2.2.3.1.2 "><p id="dcs-migration-190703003__p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-190703003__b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.2.2.3.1.2 "><p id="dcs-migration-190703003__p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-190703003__b2535184111510">Source instance data updated during the migration will not be migrated to the target instance.</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-migration-190703003__row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.7.2.2.2.2.2.3.1.1 "><p id="dcs-migration-190703003__p85863316221">Full + incremental</p>
|
||||
<tr id="dcs-migration-190703003__row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.6.2.2.2.2.2.3.1.1 "><p id="dcs-migration-190703003__p85863316221">Full + incremental</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.7.2.2.2.2.2.3.1.2 "><p id="dcs-migration-190703003__p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.6.2.2.2.2.2.3.1.2 "><p id="dcs-migration-190703003__p858103352214">Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.</p>
|
||||
<p id="dcs-migration-190703003__p110411470116">Once the migration starts, it remains <strong id="dcs-migration-190703003__b1239633218259">Migrating</strong> until you click <strong id="dcs-migration-190703003__b43962323258">Stop</strong> in the <strong id="dcs-migration-190703003__b13961832182514">Operation</strong> column. After the migration is stopped, data in the source instance will not be lost, but data will not be written to the target instance. When the transmission network is stable, the delay of incremental migration is within seconds. The actual delay depends on the transmission quality of the network link.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -48,16 +46,15 @@
|
||||
</li><li id="dcs-migration-190703003__li9907815183313">Configure <strong id="dcs-migration-190703003__b993755923719">Target Redis Type</strong> and <strong id="dcs-migration-190703003__b1582032133811">Target Redis Instance</strong>:<p id="dcs-migration-190703003__p1765351142813">Set <strong id="dcs-migration-190703003__b113540431316">Redis in the cloud</strong> for <strong id="dcs-migration-190703003__b142121046732">Target Redis Type</strong> and add <strong id="dcs-migration-190703003__b14980352338">Target Redis Instance</strong>.</p>
|
||||
</li><li id="dcs-migration-190703003__li13145145319231">Configure <strong id="dcs-migration-190703003__b19707205817319">Source Redis Instance Password</strong> and <strong id="dcs-migration-190703003__b1770711584313">Target Redis Instance Password</strong>: If the instance is password-protected, click <strong id="dcs-migration-190703003__b6707258236">Test Connection</strong> to check whether the instance password is correct and whether the network is connected. If the instance is not password-protected, click <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b54195135235">Test Connection</strong> directly. If the test fails, check whether the password is correct, and whether the migration task network is connected.<p id="dcs-migration-190703003__p1992114918157">If a DCS Redis instance is used, the users created in <a href="dcs-ug-221220.html">Managing Users</a> are currently unavailable.</p>
|
||||
</li></ol>
|
||||
</p></li><li id="dcs-migration-190703003__li1348442114911"><span>Click <strong id="dcs-migration-190703003__b13194159102331">Next</strong>.</span></li><li id="dcs-migration-190703003__li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-190703003__b46184816117">Submit</strong>.</span><p><p id="dcs-migration-190703003__p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<p id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_p4880126112412">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-190703003__b335084213548">Migration Logs</strong> page.</p>
|
||||
<div class="note" id="dcs-migration-190703003__note4427420124517"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-migration-190703003__ul4321452125415"><li id="dcs-migration-190703003__li1037218318491">Once incremental migration starts, it remains <strong id="dcs-migration-190703003__b5271257515">Migrating</strong> after full migration.</li><li id="dcs-migration-190703003__li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-190703003__b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-migration-190703003__li1348442114911"><span>Click <strong id="dcs-migration-190703003__b1440582413532">Create</strong>.</span></li><li id="dcs-migration-190703003__li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-190703003__b46184816117">Submit</strong>.</span><p><p id="dcs-migration-190703003__p9625422141910">Go back to the data migration task list. After the migration is successful, the task status changes to <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
|
||||
<ul id="dcs-migration-190703003__ul9276115554113"><li id="dcs-migration-190703003__li6230145854111">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-190703003__b335084213548">Migration Logs</strong> page.</li><li id="dcs-migration-190703003__li1037218318491">Once incremental migration starts, it remains <strong id="dcs-migration-190703003__b5271257515">Migrating</strong> after full migration.</li><li id="dcs-migration-190703003__li23211252175420">To manually stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-190703003__b15871442195617">Stop</strong> above the migration task.</li></ul>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-migration-190703003__section3718231268"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_p1571161034711">Before data migration, if the target Redis has no data, check data integrity after the migration is complete in the following way:</p>
|
||||
<ol id="dcs-migration-190703003__ol1116739195110"><li id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis. Connect to Redis by referring to <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</li><li id="dcs-migration-190703003__li10257713154717">Run the <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-190703003__en-us_topic_0292880550_dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-190703003__p203461224529"><span><img id="dcs-migration-190703003__image152912031408" src="en-us_image_0293255709.png"></span></p>
|
||||
</li><li id="dcs-migration-190703003__li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-190703003__b7585046192918">keys</strong> and <strong id="dcs-migration-190703003__b2585204614294">expires</strong> of the source Redis and the target Redis. If the differences are the same, the data is complete and the migration is successful.</li></ol>
|
||||
<p id="dcs-migration-190703003__p68531049182811">During full migration, source Redis data updated during the migration will not be migrated to the target instance.</p>
|
||||
<p id="dcs-migration-190703003__p510235911518"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
</div>
|
||||
<div class="section" id="dcs-pd-0326006__en-us_topic_0164539340_section3787617165612"><h4 class="sectiontitle">IAM</h4><p id="dcs-pd-0326006__en-us_topic_0164539340_p13804175495119">IAM provides identity authentication, permissions management, and access control.</p>
|
||||
<p id="dcs-pd-0326006__en-us_topic_0164539340_p18473114845611">With IAM, you can control access to DCS.</p>
|
||||
<p id="dcs-pd-0326006__p74243733918"></p>
|
||||
</div>
|
||||
<div class="section" id="dcs-pd-0326006__en-us_topic_0164539340_section97528162561"><h4 class="sectiontitle">Cloud Eye</h4><p id="dcs-pd-0326006__en-us_topic_0164539340_p24324301564">Cloud Eye is a secure, scalable, and integrated monitoring service. With Cloud Eye, you can monitor your DCS service and configure alarm rules and notifications.</p>
|
||||
</div>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<p id="dcs-pd-200713005__p65258307396">DCS for Redis instances support most Redis commands, which are listed in <a href="#dcs-pd-200713005__section2058132020426">Commands Supported by DCS for Redis 3.0</a>. Any client compatible with the Redis protocol can access DCS.</p>
|
||||
<ul id="dcs-pd-200713005__ul1642552619390"><li id="dcs-pd-200713005__li15425626153919">For security purposes, some Redis commands are disabled in DCS, as listed in <a href="#dcs-pd-200713005__section144182915424">Commands Disabled by DCS for Redis 3.0</a>.</li><li id="dcs-pd-200713005__li13425142615396">Some Redis commands are supported by cluster DCS instances for multi-key operations in the same slot. For details, see <a href="dcs-pd-200813003.html">Command Restrictions</a>.</li><li id="dcs-pd-200713005__li1425026203912">Some Redis commands have usage restrictions, which are described in <a href="dcs-pd-200813004.html">Other Command Usage Restrictions</a>.</li></ul>
|
||||
<div class="section" id="dcs-pd-200713005__section2058132020426"><a name="dcs-pd-200713005__section2058132020426"></a><a name="section2058132020426"></a><h4 class="sectiontitle">Commands Supported by DCS for Redis 3.0</h4><p id="dcs-pd-200713005__p2778541611">The following lists commands supported by DCS for Redis 3.0.</p>
|
||||
<div class="note" id="dcs-pd-200713005__note13541148141"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-pd-200713005__ul4789126134416"><li id="dcs-pd-200713005__li186251733818">Commands available since later Redis versions are not supported by earlier-version instances. Run a command on redis-cli to check whether it is supported by DCS for Redis. If the message "(error) ERR unknown command" is returned, the command is not supported.</li><li id="dcs-pd-200713005__li20789152613447">The following commands listed in the tables are not supported by Proxy Cluster instances:<ul id="dcs-pd-200713005__ul11953224145519"><li id="dcs-pd-200713005__li1774801819158"><strong id="dcs-pd-200713005__b133570887875752">List</strong> group: <strong id="dcs-pd-200713005__b75772088375752">BLPOP</strong>, <strong id="dcs-pd-200713005__b62289710475752">BRPOP</strong>, and <strong id="dcs-pd-200713005__b81346919575752">BRPOPLRUSH</strong></li><li id="dcs-pd-200713005__li10998739195513"><strong id="dcs-pd-200713005__b143928421875752">CLIENT</strong> commands in the <strong id="dcs-pd-200713005__b56066599375752">Server</strong> group: <strong id="dcs-pd-200713005__b117892832775752">CLIENT KILL</strong>, <strong id="dcs-pd-200713005__b86365414475752">CLIENT GETNAME</strong>, <strong id="dcs-pd-200713005__b72903347075752">CLIENT LIST</strong>, <strong id="dcs-pd-200713005__b138062778075752">CLIENT SETNAME</strong>, <strong id="dcs-pd-200713005__b101134770275752">CLIENT PAUSE</strong>, and <strong id="dcs-pd-200713005__b156580356775752">CLIENT REPLY</strong>.</li><li id="dcs-pd-200713005__li1977013286566"><strong id="dcs-pd-200713005__b150953173575752">Server</strong> group: <strong id="dcs-pd-200713005__b207356468875752">MONITOR</strong></li><li id="dcs-pd-200713005__li1141531983820"><strong id="dcs-pd-200713005__b166668124575752">Key</strong> group: <strong id="dcs-pd-200713005__b32673635575752">RANDOMKE</strong> (for old Proxy Cluster instances)</li></ul>
|
||||
<div class="note" id="dcs-pd-200713005__note13541148141"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-pd-200713005__ul4789126134416"><li id="dcs-pd-200713005__li186251733818">Commands available since later Redis versions are not supported by earlier-version instances. Run a command on redis-cli to check whether it is supported by DCS for Redis. If the message "(error) ERR unknown command" is returned, the command is not supported.</li><li id="dcs-pd-200713005__li20789152613447">The following commands listed in the tables are not supported by Proxy Cluster instances:<ul id="dcs-pd-200713005__ul11953224145519"><li id="dcs-pd-200713005__li1774801819158"><strong id="dcs-pd-200713005__b133570887875752">List</strong> group: <strong id="dcs-pd-200713005__b75772088375752">BLPOP</strong>, <strong id="dcs-pd-200713005__b62289710475752">BRPOP</strong>, and <strong id="dcs-pd-200713005__b81346919575752">BRPOPLRUSH</strong></li><li id="dcs-pd-200713005__li10998739195513"><strong id="dcs-pd-200713005__b143928421875752">CLIENT</strong> commands in the <strong id="dcs-pd-200713005__b56066599375752">Server</strong> group: <strong id="dcs-pd-200713005__b117892832775752">CLIENT KILL</strong>, <strong id="dcs-pd-200713005__b86365414475752">CLIENT GETNAME</strong>, <strong id="dcs-pd-200713005__b72903347075752">CLIENT LIST</strong>, <strong id="dcs-pd-200713005__b138062778075752">CLIENT SETNAME</strong>, <strong id="dcs-pd-200713005__b101134770275752">CLIENT PAUSE</strong>, and <strong id="dcs-pd-200713005__b156580356775752">CLIENT REPLY</strong>.</li><li id="dcs-pd-200713005__li1977013286566"><strong id="dcs-pd-200713005__b150953173575752">Server</strong> group: <strong id="dcs-pd-200713005__b207356468875752">MONITOR</strong></li><li id="dcs-pd-200713005__li1141531983820"><strong id="dcs-pd-200713005__b166668124575752">Key</strong> group: <strong id="dcs-pd-200713005__b32673635575752">RANDOMKEY</strong> (for old Proxy Cluster instances)</li></ul>
|
||||
</li></ul>
|
||||
</div></div>
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
<h1 class="topictitle1">Command Restrictions</h1>
|
||||
<div id="body1600245575467"><p id="dcs-pd-200813003__p18341248161510">Some Redis commands are supported by Redis Cluster DCS instances for multi-key operations in the same slot. For details, see <a href="#dcs-pd-200813003__table7589193113396">Table 1</a>.</p>
|
||||
<p id="dcs-pd-200813003__p451610566582">Some commands support multiple keys but do not support cross-slot access. For details, see <a href="#dcs-pd-200813003__table152098710112">Table 2</a>.</p>
|
||||
<p id="dcs-pd-200813003__p6685341152010"><a href="#dcs-pd-200813003__table10266172324619">Table 3</a> lists commands restricted for Proxy Cluster DCS Redis 4.0 instances.</p>
|
||||
<p id="dcs-pd-200813003__p131840255316"><a href="#dcs-pd-200813003__table1626238165">Table 4</a> lists commands restricted for read/write splitting DCS Redis 4.0 instances.</p>
|
||||
<p id="dcs-pd-200813003__p6685341152010"><a href="#dcs-pd-200813003__table10266172324619">Table 3</a> lists commands restricted for Proxy Cluster DCS Redis instances.</p>
|
||||
<p id="dcs-pd-200813003__p131840255316"><a href="#dcs-pd-200813003__table1626238165">Table 4</a> lists commands restricted for read/write splitting DCS Redis instances.</p>
|
||||
|
||||
<div class="tablenoborder"><a name="dcs-pd-200813003__table7589193113396"></a><a name="table7589193113396"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-pd-200813003__table7589193113396" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Redis commands restricted in Redis Cluster DCS instances</caption><thead align="left"><tr id="dcs-pd-200813003__row17608931153912"><th align="left" class="cellrowborder" valign="top" width="28.17%" id="mcps1.3.5.2.3.1.1"><p id="dcs-pd-200813003__p861118318394">Category</p>
|
||||
</th>
|
||||
@ -126,7 +126,7 @@
|
||||
</tr>
|
||||
<tr id="dcs-pd-200813003__en-us_topic_0269770665_row1227514019276"><td class="cellrowborder" valign="top" width="29.53%" headers="mcps1.3.7.2.3.1.1 "><p id="dcs-pd-200813003__en-us_topic_0269770665_p172758407278">Multi-key commands that do not support cross-slot access</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="70.47%" headers="mcps1.3.7.2.3.1.2 "><p id="dcs-pd-200813003__en-us_topic_0269770665_p162756405277">SMOVE, SORT, BITOP, MSETNX, RENAME, RENAMENX, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, PFMERGE, PFCOUNT, BLMOVE, COPY, GEOSEARCHSTORE, LMOVE, ZRANGESTORE</p>
|
||||
<td class="cellrowborder" valign="top" width="70.47%" headers="mcps1.3.7.2.3.1.2 "><p id="dcs-pd-200813003__en-us_topic_0269770665_p162756405277">SMOVE, SORT, BITOP, MSETNX, RENAME, RENAMENX, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, PFMERGE, PFCOUNT, BLMOVE, COPY, GEOSEARCHSTORE, LMOVE, ZRANGESTORE, XREAD, XREADGROUP</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -215,9 +215,9 @@
|
||||
</tr>
|
||||
<tr id="dcs-pd-200813003__row9686155173418"><td class="cellrowborder" valign="top" headers="mcps1.3.8.2.4.1.1 "><p id="dcs-pd-200813003__p1568695583413">SCAN</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.8.2.4.1.2 "><p id="dcs-pd-200813003__p11342946205817">Proxy Cluster instances do not support the <b><span class="cmdname" id="dcs-pd-200813003__cmdname42931833112216">SCAN</span></b> command in pipelines.</p>
|
||||
<p id="dcs-pd-200813003__p1834204635812">For a Proxy Cluster instance, you can issue the <b><span class="cmdname" id="dcs-pd-200813003__cmdname16461132582220">SCAN</span></b> command to a specific shard by adding <em id="dcs-pd-200813003__i115191841191417">ip</em>:<em id="dcs-pd-200813003__i185209411147">port</em>. (Shard IP addresses and ports can be queried through the <b><span class="cmdname" id="dcs-pd-200813003__cmdname8788410221">icluster nodes</span></b> command.)</p>
|
||||
<p id="dcs-pd-200813003__p4320644122310">If running the <b><span class="cmdname" id="dcs-pd-200813003__cmdname16300195315193">SCAN</span></b> command fails to return the required information, your proxy cluster may be of an earlier version. Contact customer service to upgrade the proxy version.</p>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.8.2.4.1.2 "><p id="dcs-pd-200813003__p11342946205817">Proxy Cluster instances do not support the <strong id="dcs-pd-200813003__b13804582311">SCAN</strong> command in transactions.</p>
|
||||
<p id="dcs-pd-200813003__p1834204635812">For a Proxy Cluster instance, you can issue the <strong id="dcs-pd-200813003__b189141363118">SCAN</strong> command to a specific shard by adding <em id="dcs-pd-200813003__i115191841191417">ip</em>:<em id="dcs-pd-200813003__i185209411147">port</em>. (Shard IP addresses and ports can be queried through the <strong id="dcs-pd-200813003__b159791883112">icluster nodes</strong> command.)</p>
|
||||
<p id="dcs-pd-200813003__p4320644122310">If running the <strong id="dcs-pd-200813003__b62891922183119">SCAN</strong> command fails to return the required information, your proxy cluster may be of an earlier version. Contact customer service to upgrade the proxy version.</p>
|
||||
<pre class="screen" id="dcs-pd-200813003__screen52912142200">icluster nodes
|
||||
<em id="dcs-pd-200813003__i17193173012333">xxx</em> 192.168.00.00:1111@<em id="dcs-pd-200813003__i13552154614330">xxx xxx</em> connected 10923-16383
|
||||
<em id="dcs-pd-200813003__i1639283320330">xxx</em> 192.168.00.01:2222@<em id="dcs-pd-200813003__i5424185053317">xxx xxx</em> connected 0-5460
|
||||
@ -276,8 +276,8 @@ value1
|
||||
cluster keyslot key1
|
||||
9189
|
||||
icluster nodes
|
||||
<em id="dcs-pd-200813003__i923058246">xxx</em> 192.168.00.00:1111@<em id="dcs-pd-200813003__i895834074">xxx xxx</em> connected 10923-16383
|
||||
<em id="dcs-pd-200813003__i590127652">xxx</em> 192.168.00.01:2222@<em id="dcs-pd-200813003__i183131581">xxx xxx</em> connected 0-5460
|
||||
<em id="dcs-pd-200813003__i179098602">xxx</em> 192.168.00.00:1111@<em id="dcs-pd-200813003__i1564655905">xxx xxx</em> connected 10923-16383
|
||||
<em id="dcs-pd-200813003__i149675756">xxx</em> 192.168.00.01:2222@<em id="dcs-pd-200813003__i1980701983">xxx xxx</em> connected 0-5460
|
||||
<em id="dcs-pd-200813003__i7208113933315">xxx</em> 192.168.00.02:3333@<em id="dcs-pd-200813003__i1133145423318">xxx xxx</em> connected 5461-10922
|
||||
MEMORY USAGE key1 192.168.00.02:3333
|
||||
54</pre>
|
||||
@ -323,7 +323,7 @@ MEMORY USAGE key1 192.168.00.02:3333
|
||||
<tr id="dcs-pd-200813003__row173910913554"><td class="cellrowborder" valign="top" headers="mcps1.3.8.2.4.1.1 "><p id="dcs-pd-200813003__p1873213811109">MULTI</p>
|
||||
</td>
|
||||
<td class="cellrowborder" rowspan="2" valign="top" headers="mcps1.3.8.2.4.1.2 "><p id="dcs-pd-200813003__p12110222115">The order of cross-slot commands in a transaction is not guaranteed.</p>
|
||||
<p id="dcs-pd-200813003__p201246150139">The following commands cannot be used in transactions: <strong id="dcs-pd-200813003__b41621049123615">WATCH</strong><strong id="dcs-pd-200813003__b19425171243719">, </strong><strong id="dcs-pd-200813003__b61621349163618">MONITOR</strong><strong id="dcs-pd-200813003__b10425412113710">, </strong><strong id="dcs-pd-200813003__b1116274915369">RANDOMKEY</strong><strong id="dcs-pd-200813003__b1342511217376">, </strong><strong id="dcs-pd-200813003__b616274903619">KEYS</strong><strong id="dcs-pd-200813003__b1042591253715">, </strong><strong id="dcs-pd-200813003__b151622491365">SCAN</strong><strong id="dcs-pd-200813003__b174252012163712">, </strong><strong id="dcs-pd-200813003__b101623492368">SUBSCRIBE</strong><strong id="dcs-pd-200813003__b742518123373">, </strong><strong id="dcs-pd-200813003__b6162144913613">UNSUBSCRIBE</strong><strong id="dcs-pd-200813003__b8425912183710">, </strong><strong id="dcs-pd-200813003__b91631949133610">PSUBSCRIBE</strong><strong id="dcs-pd-200813003__b1942551210378">, </strong><strong id="dcs-pd-200813003__b101631249143610">PUNSUBSCRIBE</strong><strong id="dcs-pd-200813003__b104251712163716">, </strong><strong id="dcs-pd-200813003__b1316324963610">SCRIPT</strong><strong id="dcs-pd-200813003__b144251812153712">, </strong><strong id="dcs-pd-200813003__b71631449193619">EVAL</strong><strong id="dcs-pd-200813003__b1042512124371">, </strong><strong id="dcs-pd-200813003__b1616394923611">EVALSHA</strong><strong id="dcs-pd-200813003__b642501214377">, </strong><strong id="dcs-pd-200813003__b416324912366">DBSIZE</strong><strong id="dcs-pd-200813003__b84251912193712">, </strong><strong id="dcs-pd-200813003__b216310497369">AUTH</strong><strong id="dcs-pd-200813003__b342571210379">, </strong><strong id="dcs-pd-200813003__b1516384963617">FLUSHDB</strong><strong id="dcs-pd-200813003__b44251312183711">,</strong><strong id="dcs-pd-200813003__b1416374933611"> FLUSHALL</strong><strong id="dcs-pd-200813003__b19425201283717">, </strong><strong id="dcs-pd-200813003__b111641149193620">CLIENT</strong><strong id="dcs-pd-200813003__b104251812193718">, </strong><strong id="dcs-pd-200813003__b6164184917365">MEMORY</strong></p>
|
||||
<p id="dcs-pd-200813003__p201246150139">The following commands cannot be used in transactions: <strong id="dcs-pd-200813003__b18638336125714">WATCH</strong><strong id="dcs-pd-200813003__b26383363578">, </strong><strong id="dcs-pd-200813003__b18638163614575">MONITOR</strong><strong id="dcs-pd-200813003__b26381936115713">, </strong><strong id="dcs-pd-200813003__b36386364579">RANDOMKEY</strong><strong id="dcs-pd-200813003__b1163815368570">, </strong><strong id="dcs-pd-200813003__b13638103655717">KEYS</strong><strong id="dcs-pd-200813003__b19638113619579">, </strong><strong id="dcs-pd-200813003__b136394364578">SCAN</strong><strong id="dcs-pd-200813003__b166391336155717">, </strong><strong id="dcs-pd-200813003__b563993618577">SUBSCRIBE</strong><strong id="dcs-pd-200813003__b19639836115713">, </strong><strong id="dcs-pd-200813003__b9639183620575">UNSUBSCRIBE</strong><strong id="dcs-pd-200813003__b20639133616572">, </strong><strong id="dcs-pd-200813003__b863903675714">PSUBSCRIBE</strong><strong id="dcs-pd-200813003__b1763918367576">, </strong><strong id="dcs-pd-200813003__b263913655720">PUNSUBSCRIBE</strong><strong id="dcs-pd-200813003__b864019364571">, </strong><strong id="dcs-pd-200813003__b186401036155717">SCRIPT</strong><strong id="dcs-pd-200813003__b156404368571">, </strong><strong id="dcs-pd-200813003__b166401136185712">EVAL</strong><strong id="dcs-pd-200813003__b86406368577">, </strong><strong id="dcs-pd-200813003__b13640836125711">EVALSHA</strong><strong id="dcs-pd-200813003__b12640436105719">, </strong><strong id="dcs-pd-200813003__b164013363577">DBSIZE</strong><strong id="dcs-pd-200813003__b4641143685714">, </strong><strong id="dcs-pd-200813003__b264133613573">AUTH</strong><strong id="dcs-pd-200813003__b46411236155711">, </strong><strong id="dcs-pd-200813003__b136416362572">FLUSHDB</strong><strong id="dcs-pd-200813003__b76418367577">,</strong><strong id="dcs-pd-200813003__b96411036175716"> FLUSHALL</strong><strong id="dcs-pd-200813003__b1641936145710">, </strong><strong id="dcs-pd-200813003__b1641183645710">CLIENT</strong><strong id="dcs-pd-200813003__b864103655712">, </strong><strong id="dcs-pd-200813003__b1464118366577">MEMORY</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-pd-200813003__row9633181011556"><td class="cellrowborder" valign="top" headers="mcps1.3.8.2.4.1.1 "><p id="dcs-pd-200813003__p111831644171018">EXEC</p>
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="37.25627437256274%" id="mcps1.3.4.6.2.5.1.2"><p id="dcs-pd-210626001__en-us_topic_0170871404_p0389195420143">Description</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="19.24807519248075%" id="mcps1.3.4.6.2.5.1.3"><p id="dcs-pd-210626001__en-us_topic_0170871404_p1535154264310">Type</p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="19.22807719228077%" id="mcps1.3.4.6.2.5.1.3"><p id="dcs-pd-210626001__en-us_topic_0170871404_p1535154264310">Type</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="21.947805219478052%" id="mcps1.3.4.6.2.5.1.4"><p id="dcs-pd-210626001__en-us_topic_0170871404_p974155917423">Dependency</p>
|
||||
<th align="left" class="cellrowborder" valign="top" width="21.967803219678032%" id="mcps1.3.4.6.2.5.1.4"><p id="dcs-pd-210626001__en-us_topic_0170871404_p974155917423">Dependency</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -24,27 +24,36 @@
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="37.25627437256274%" headers="mcps1.3.4.6.2.5.1.2 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p5487235383">All permissions for DCS. Users granted these permissions can operate and use all DCS instances.</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="19.24807519248075%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p1553534274311">System-defined policy</p>
|
||||
<td class="cellrowborder" valign="top" width="19.22807719228077%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p1553534274311">System-defined policy</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="21.947805219478052%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p187411759134214">None</p>
|
||||
<td class="cellrowborder" valign="top" width="21.967803219678032%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p187411759134214">None</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-pd-210626001__en-us_topic_0170871404_row44875320385"><td class="cellrowborder" valign="top" width="21.547845215478453%" headers="mcps1.3.4.6.2.5.1.1 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p154881315384">DCS UserAccess</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="37.25627437256274%" headers="mcps1.3.4.6.2.5.1.2 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p135401738111817">Common user permissions for DCS, excluding permissions for creating, modifying, deleting DCS instances and modifying instance specifications.</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="19.24807519248075%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p105352423430">System-defined policy</p>
|
||||
<td class="cellrowborder" valign="top" width="19.22807719228077%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p105352423430">System-defined policy</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="21.947805219478052%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__p5471145020319">None</p>
|
||||
<td class="cellrowborder" valign="top" width="21.967803219678032%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__p5471145020319">None</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-pd-210626001__en-us_topic_0170871404_row74888313389"><td class="cellrowborder" valign="top" width="21.547845215478453%" headers="mcps1.3.4.6.2.5.1.1 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p84888393814">DCS ReadOnlyAccess</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="37.25627437256274%" headers="mcps1.3.4.6.2.5.1.2 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p15462747114710">Read-only permissions for DCS. Users granted these permissions can only view DCS instance data.</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="19.24807519248075%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p185361428432">System-defined policy</p>
|
||||
<td class="cellrowborder" valign="top" width="19.22807719228077%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__en-us_topic_0170871404_p185361428432">System-defined policy</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="21.947805219478052%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__p125865548312">None</p>
|
||||
<td class="cellrowborder" valign="top" width="21.967803219678032%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__p125865548312">None</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-pd-210626001__row164014408225"><td class="cellrowborder" valign="top" width="21.547845215478453%" headers="mcps1.3.4.6.2.5.1.1 "><p id="dcs-pd-210626001__p119617175173">DCS Administrator</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="37.25627437256274%" headers="mcps1.3.4.6.2.5.1.2 "><p id="dcs-pd-210626001__p2909173815020">Administrator permissions for DCS. Users granted these permissions can operate and use all DCS instances.</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="19.22807719228077%" headers="mcps1.3.4.6.2.5.1.3 "><p id="dcs-pd-210626001__p6976843155011">System-defined role</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="21.967803219678032%" headers="mcps1.3.4.6.2.5.1.4 "><p id="dcs-pd-210626001__p1796161716175"><strong id="dcs-pd-210626001__b41981432262">Server Administrator</strong> and <strong id="dcs-pd-210626001__b18766541142614">Tenant Guest</strong> roles, which must be attached in the same project as the <strong id="dcs-pd-210626001__b115161319132717">DCS Administrator</strong> role</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -2,11 +2,9 @@
|
||||
|
||||
<h1 class="topictitle1">Transmitting DCS Redis Data with Encryption Using SSL</h1>
|
||||
<div id="body8662426"><p id="dcs-ug-023129__en-us_topic_0000001504253601_p14831738141319"><strong id="dcs-ug-023129__en-us_topic_0000001504253601_b1468437122710">Single-node, master/standby, and Redis Cluster </strong><strong id="dcs-ug-023129__en-us_topic_0000001504253601_b116846712715">DCS Redis 6.0/7.0 </strong>instances support SSL encryption to ensure data transmission security. This function is not available for other instance versions. RESP (Redis Serialization Protocol), the communication protocol of Redis, only supports plaintext transmission in versions earlier than Redis 6.0.</p>
|
||||
<div class="note" id="dcs-ug-023129__en-us_topic_0000001504253601_note05891541663"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-023129__en-us_topic_0000001504253601_p145906411619">Due to SSL encryption, SSL and client IP pass-through cannot be enabled at the same time. Encrypted links do not carry client IPs.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-023129__en-us_topic_0000001504253601_section156811458191719"><h4 class="sectiontitle">Enabling or Disabling SSL</h4><ol id="dcs-ug-023129__en-us_topic_0000001504253601_ol152071869186"><li id="dcs-ug-023129__en-us_topic_0000001504253601_li1799392835619"><span>Log in to the DCS console.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li110442415511"><span>Click <span><img id="dcs-ug-023129__en-us_topic_0000001504253601_en-us_topic_0148195277_i0d8b8411c49244f694e4f9ebeef4b3c5" src="en-us_image_0148195246.png"></span> in the upper left corner of the management console and select the region where your instance is located.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li5422205224520"><span>In the navigation pane, choose <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b15744112554210">Cache Manager</strong>.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li26520051765"><span>On the <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b199361833144212">Cache Manager</strong> page, click a DCS instance.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li133599641916"><span>In the navigation pane, choose <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b397112483426">SSL</strong>.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li167091433390"><span>Click <span><img id="dcs-ug-023129__en-us_topic_0000001504253601_image13215191461418" src="en-us_image_0000001505063901.png"></span> next to <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b0919115513429">SSL Certificate</strong> to enable or disable SSL.</span><p><div class="notice" id="dcs-ug-023129__en-us_topic_0000001504253601_note156188365456"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="dcs-ug-023129__en-us_topic_0000001504253601_ul15317153894518"><li id="dcs-ug-023129__en-us_topic_0000001504253601_li20317538184511">Enabling or disabling SSL will restart the instance and disconnect it for a few seconds. Wait until off-peak hours and ensure that your application can re-connect.</li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li931733864514">The restart cannot be undone. For single-node DCS instances and other instances where AOF persistence is disabled (<strong id="dcs-ug-023129__en-us_topic_0000001504253601_b743144613432">appendonly</strong> is set to <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b15741104716432">no</strong>), data will be cleared and ongoing backup tasks will be stopped. Exercise caution when performing this operation.</li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li135468222328">Enabling SSL will deteriorate read/write performance.</li></ul>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li212154615418"><span>Click <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b461653317448">Download Certificate</strong> to download the SSL certificate.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li28571232164919"><span>Decompress the SSL certificate and upload the decompressed <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b64721942114415">ca.crt</strong> file to the server where the Redis client is located.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li59022234564"><span>Add the path of the <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b16459854134411">ca.crt</strong> file to the command for connecting to the instance. For example, to access an instance on redis-cli, see <a href="dcs-ug-0326009.html">Accessing a DCS Redis Instance Through redis-cli</a>.</span></li></ol>
|
||||
<div class="section" id="dcs-ug-023129__en-us_topic_0000001504253601_section732116365"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="dcs-ug-023129__en-us_topic_0000001504253601_ul10213383392"><li id="dcs-ug-023129__en-us_topic_0000001504253601_li398954415393">Either SSL or client IP pass-through can be enabled. When SSL is enabled, data is encrypted without carrying client IP addresses.</li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li9989134416392"><strong id="dcs-ug-023129__en-us_topic_0000001504253601_b719373075612">Enabling SSL will deteriorate read/write performance.</strong></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li7301144016391"><strong id="dcs-ug-023129__en-us_topic_0000001504253601_b5705234195612">Enabling or disabling SSL will restart the instance and disconnect it for a few seconds. Wait until off-peak hours and ensure that your application can re-connect.</strong></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li10301174010398"><strong id="dcs-ug-023129__en-us_topic_0000001504253601_b1911716155578">The restart cannot be undone. For single-node DCS instances and other instances where AOF persistence is disabled ("appendonly" is set to "no"), data will be cleared and ongoing backup tasks will be stopped. Exercise caution when performing this operation.</strong></li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-023129__en-us_topic_0000001504253601_section156811458191719"><h4 class="sectiontitle">Enabling or Disabling SSL</h4><ol id="dcs-ug-023129__en-us_topic_0000001504253601_ol152071869186"><li id="dcs-ug-023129__en-us_topic_0000001504253601_li1799392835619"><span>Log in to the DCS console.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li110442415511"><span>Click <span><img id="dcs-ug-023129__en-us_topic_0000001504253601_en-us_topic_0148195277_image42701547122512" src="en-us_image_0000001549115173.png"></span> in the upper left corner of the console and select the region where your instance is located.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li5422205224520"><span>In the navigation pane, choose <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b15744112554210">Cache Manager</strong>.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li26520051765"><span>On the <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b199361833144212">Cache Manager</strong> page, click a DCS instance.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li133599641916"><span>In the navigation pane, choose <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b397112483426">SSL</strong>.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li167091433390"><span>Click <span><img id="dcs-ug-023129__en-us_topic_0000001504253601_image13215191461418" src="en-us_image_0000001505063901.png"></span> next to <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b0919115513429">SSL Certificate</strong> to enable or disable SSL.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li212154615418"><span>Click <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b461653317448">Download Certificate</strong> to download the SSL certificate.</span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li28571232164919"><span>Decompress the SSL certificate and upload the decompressed <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b64721942114415">ca.crt</strong> file to the server where the Redis client is located. </span></li><li id="dcs-ug-023129__en-us_topic_0000001504253601_li59022234564"><span>Add the path of the <strong id="dcs-ug-023129__en-us_topic_0000001504253601_b16459854134411">ca.crt</strong> file to the command for connecting to the instance. For example, to access an instance on redis-cli, see <a href="dcs-ug-0326009.html">Connecting to Redis on redis-cli</a>.</span></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -3,11 +3,18 @@
|
||||
<h1 class="topictitle1">Connecting to Redis on phpredis (PHP)</h1>
|
||||
<div id="body32001227"><p id="dcs-ug-0312009__en-us_topic_0148195315_p1484772321512">This section describes how to connect to Redis on phpredis. For more information about how to use other Redis clients, visit <a href="https://redis.io/clients" target="_blank" rel="noopener noreferrer">the Redis official website</a>.</p>
|
||||
<p id="dcs-ug-0312009__en-us_topic_0148195315_p1455012259374">The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).</p>
|
||||
<div class="note" id="dcs-ug-0312009__en-us_topic_0148195315_note20184812103319"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312009__en-us_topic_0148195315_p141841112113312">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use phpredis to connect to a Redis Cluster instance, see the <a href="https://github.com/phpredis/phpredis#readme" target="_blank" rel="noopener noreferrer">phpredis description</a>.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-0312009__en-us_topic_0148195315_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312009__en-us_topic_0148195315_ul46828691102415"><li id="dcs-ug-0312009__en-us_topic_0148195315_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312009__en-us_topic_0148195315_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312009__en-us_topic_0148195315_li152161914112">If the ECS runs the Linux OS, ensure that the GCC compilation environment has been installed on the ECS.</li></ul>
|
||||
<div class="section" id="dcs-ug-0312009__en-us_topic_0148195315_section16849161391017"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-ug-0312009__en-us_topic_0148195315_p1648117181109">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use phpredis to connect to a Redis Cluster instance, see the <a href="https://github.com/phpredis/phpredis#readme" target="_blank" rel="noopener noreferrer">phpredis description</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312009__en-us_topic_0148195315_section418118191507"><h4 class="sectiontitle">Connecting to Redis on phpredis</h4><ol id="dcs-ug-0312009__en-us_topic_0148195315_ol1323114404446"><li id="dcs-ug-0312009__en-us_topic_0148195315_li8233164074413"><a name="dcs-ug-0312009__en-us_topic_0148195315_li8233164074413"></a><a name="en-us_topic_0148195315_li8233164074413"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312009__en-us_topic_0148195315_p1424144054413">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
<div class="section" id="dcs-ug-0312009__en-us_topic_0148195315_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312009__en-us_topic_0148195315_ul46828691102415"><li id="dcs-ug-0312009__en-us_topic_0148195315_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312009__en-us_topic_0148195315_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312009__en-us_topic_0148195315_li152161914112">The Linux ECS must have GNU Compiler Collection (GCC) installed. To query the GCC version, run the <strong id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195299_b1992028142616">gcc --version</strong> command.<p id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195299_p134011850550">Run the following command to install GCC on the ECS if needed, CentOS is used as an example:</p>
|
||||
<pre class="screen" id="dcs-ug-0312009__en-us_topic_0148195315_en-us_topic_0148195299_screen55587413567">yum install -y make
|
||||
yum install -y pcre-devel
|
||||
yum install -y zlib-devel
|
||||
yum install -y libevent-devel
|
||||
yum install -y openssl-devel
|
||||
yum install -y gcc-c++</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312009__en-us_topic_0148195315_section418118191507"><h4 class="sectiontitle">Connecting to Redis on phpredis</h4><ol id="dcs-ug-0312009__en-us_topic_0148195315_ol1323114404446"><li id="dcs-ug-0312009__en-us_topic_0148195315_li8233164074413"><a name="dcs-ug-0312009__en-us_topic_0148195315_li8233164074413"></a><a name="en-us_topic_0148195315_li8233164074413"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312009__en-us_topic_0148195315_p1424144054413">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312009__en-us_topic_0148195315_li72012449106"><span>Log in to the ECS.</span><p><p id="dcs-ug-0312009__en-us_topic_0148195315_p15921942481">The following uses CentOS as an example to describe how to access an instance through phpredis.</p>
|
||||
</p></li><li id="dcs-ug-0312009__en-us_topic_0148195315_li7280162510450"><span>Install GCC-C++ and Make compilation components.</span><p><p id="dcs-ug-0312009__en-us_topic_0148195315_p1151123644514"><strong id="dcs-ug-0312009__en-us_topic_0148195315_b153615618458">yum install gcc-c++ make</strong></p>
|
||||
</p></li><li id="dcs-ug-0312009__en-us_topic_0148195315_li185032864518"><span>Install the PHP development package and CLI tool.</span><p><p id="dcs-ug-0312009__en-us_topic_0148195315_p26951570469">Run the following <strong id="dcs-ug-0312009__en-us_topic_0148195315_b1294195412502">yum</strong> command to install the PHP development package:</p>
|
||||
@ -50,7 +57,7 @@
|
||||
echo $value;
|
||||
$redis->close();
|
||||
?></pre>
|
||||
<p id="dcs-ug-0312009__en-us_topic_0148195315_p96081455513"><em id="dcs-ug-0312009__en-us_topic_0148195315_i0711211145012">{redis_instance_address}</em> indicates the example IP address/domain name of the DCS instance and <em id="dcs-ug-0312009__en-us_topic_0148195315_i19711711135016">{port}</em> indicates the port number of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312009__en-us_topic_0148195315_li8233164074413">1</a>. Change them as required. <em id="dcs-ug-0312009__en-us_topic_0148195315_i132641725135014">{password}</em> indicates the password used to log in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. If password-free access is enabled, shield the <strong id="dcs-ug-0312009__en-us_topic_0148195315_b1213628133613">if</strong> statement for password authentication.</p>
|
||||
<p id="dcs-ug-0312009__en-us_topic_0148195315_p96081455513"><em id="dcs-ug-0312009__en-us_topic_0148195315_i0711211145012">{redis_instance_address}</em> indicates the example IP address/domain name of the DCS instance and <em id="dcs-ug-0312009__en-us_topic_0148195315_i19711711135016">{port}</em> indicates the port number of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312009__en-us_topic_0148195315_li8233164074413">1</a>. Change them as required. <em id="dcs-ug-0312009__en-us_topic_0148195315_i132641725135014">{password}</em> indicates the password used to log in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. If password-free access is enabled, shield the <strong id="dcs-ug-0312009__en-us_topic_0148195315_b1686516335433">if</strong> statement for password authentication. </p>
|
||||
</li><li id="dcs-ug-0312009__en-us_topic_0148195315_li13961652072">Run the <strong id="dcs-ug-0312009__en-us_topic_0148195315_b182075219504">php redis.php</strong> command to access the DCS instance.</li></ol>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
|
||||
@ -3,12 +3,19 @@
|
||||
<h1 class="topictitle1">Connecting to Redis on hiredis (C++)</h1>
|
||||
<div id="body8662426"><p id="dcs-ug-0312010__en-us_topic_0148195243_p1484772321512">This section describes how to access a Redis instance on hiredis (C++). For more information about how to use other Redis clients, visit <a href="https://redis.io/clients" target="_blank" rel="noopener noreferrer">the Redis official website</a>.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p8450193791013">The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).</p>
|
||||
<div class="note" id="dcs-ug-0312010__en-us_topic_0148195243_note20184812103319"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312010__en-us_topic_0148195243_p141841112113312">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use C++ to connect to a Redis Cluster instance, see the <a href="https://github.com/sewenew/redis-plus-plus?_ga=2.64990636.268662337.1603553558-977760105.1588733325#redis-cluster" target="_blank" rel="noopener noreferrer">C++ Redis client description</a>.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p6132159103917">To access a Redis 7.0 instance, use a hiredis <a href="https://github.com/redis/hiredis/releases/tag/v1.1.0-rc1" target="_blank" rel="noopener noreferrer">1.1.0-rc1</a> or later client. For example, valkey 7.2.5 and later are recommended.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-0312010__en-us_topic_0148195243_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312010__en-us_topic_0148195243_ul46828691102415"><li id="dcs-ug-0312010__en-us_topic_0148195243_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312010__en-us_topic_0148195243_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312010__en-us_topic_0148195243_li152161914112">If the ECS runs the Linux OS, ensure that the GCC compilation environment has been installed on the ECS.</li></ul>
|
||||
<div class="section" id="dcs-ug-0312010__en-us_topic_0148195243_section9918355719"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-ug-0312010__en-us_topic_0148195243_p12356114412713">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To use C++ to connect to a Redis Cluster instance, see the <a href="https://github.com/sewenew/redis-plus-plus?_ga=2.64990636.268662337.1603553558-977760105.1588733325#redis-cluster" target="_blank" rel="noopener noreferrer">C++ Redis client description</a>.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p5356544575">To access a Redis 7.0 instance, use a hiredis <a href="https://github.com/redis/hiredis/releases/tag/v1.1.0-rc1" target="_blank" rel="noopener noreferrer">1.1.0-rc1</a> or later client. For example, valkey 7.2.5 and later are recommended.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312010__en-us_topic_0148195243_section6715101110310"><h4 class="sectiontitle">Connecting to Redis on hiredis</h4><ol id="dcs-ug-0312010__en-us_topic_0148195243_ol4547181014320"><li id="dcs-ug-0312010__en-us_topic_0148195243_li1655151054317"><a name="dcs-ug-0312010__en-us_topic_0148195243_li1655151054317"></a><a name="en-us_topic_0148195243_li1655151054317"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312010__en-us_topic_0148195243_p165602107438">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
<div class="section" id="dcs-ug-0312010__en-us_topic_0148195243_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312010__en-us_topic_0148195243_ul46828691102415"><li id="dcs-ug-0312010__en-us_topic_0148195243_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312010__en-us_topic_0148195243_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312010__en-us_topic_0148195243_li152161914112">The Linux ECS must have GNU Compiler Collection (GCC) installed. To query the GCC version, run the <strong id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195299_b1992028142616">gcc --version</strong> command.<p id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195299_p134011850550">Run the following command to install GCC on the ECS if needed, CentOS is used as an example:</p>
|
||||
<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_en-us_topic_0148195299_screen55587413567">yum install -y make
|
||||
yum install -y pcre-devel
|
||||
yum install -y zlib-devel
|
||||
yum install -y libevent-devel
|
||||
yum install -y openssl-devel
|
||||
yum install -y gcc-c++</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312010__en-us_topic_0148195243_section6715101110310"><h4 class="sectiontitle">Connecting to Redis on hiredis</h4><ol id="dcs-ug-0312010__en-us_topic_0148195243_ol4547181014320"><li id="dcs-ug-0312010__en-us_topic_0148195243_li1655151054317"><a name="dcs-ug-0312010__en-us_topic_0148195243_li1655151054317"></a><a name="en-us_topic_0148195243_li1655151054317"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312010__en-us_topic_0148195243_p165602107438">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312010__en-us_topic_0148195243_li175501736825"><span>Log in to the ECS.</span><p><p id="dcs-ug-0312010__en-us_topic_0148195243_p1453163716214">The following uses CentOS as an example to describe how to access an instance in C++.</p>
|
||||
</p></li><li id="dcs-ug-0312010__en-us_topic_0148195243_li240661954320"><span>Install GCC, Make, and hiredis.</span><p><p id="dcs-ug-0312010__en-us_topic_0148195243_p1810485434">If the system does not provide a compiling environment, run the following <strong id="dcs-ug-0312010__en-us_topic_0148195243_b139421447111315">yum</strong> command to install the environment:</p>
|
||||
<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen1188513214152">yum install gcc make</pre>
|
||||
@ -28,13 +35,13 @@ int main(int argc, char **argv) {
|
||||
redisContext *conn;
|
||||
redisReply *reply;
|
||||
if (argc < 3) {
|
||||
printf("Usage: example {instance_ip_address} 6379 {password}\n");
|
||||
printf("Usage: example <em id="dcs-ug-0312010__en-us_topic_0148195243_i284174118453">{instance_ip_address}</em> 6379 <em id="dcs-ug-0312010__en-us_topic_0148195243_i1178344144513">{password}</em>\n");
|
||||
exit(0);
|
||||
}
|
||||
const char *hostname = argv[1];
|
||||
const int port = atoi(argv[2]);
|
||||
const char *password = argv[3];
|
||||
struct timeval timeout = { 1, 500000 }; // 1.5 seconds
|
||||
struct timeval timeout = <em id="dcs-ug-0312010__en-us_topic_0148195243_i8603155684518">{ 1, 500000 }</em>; // 1.5 seconds
|
||||
conn = redisConnectWithTimeout(hostname, port, timeout);
|
||||
if (conn == NULL || conn->err) {
|
||||
if (conn) {
|
||||
@ -67,21 +74,21 @@ int main(int argc, char **argv) {
|
||||
</li><li id="dcs-ug-0312010__en-us_topic_0148195243_li45820814718">Run the following command to compile the code:<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen17592164402315">gcc connRedis.c -o connRedis -I /usr/local/include/hiredis -lhiredis</pre>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p1094812195020">If an error is reported, locate the directory where the <strong id="dcs-ug-0312010__en-us_topic_0148195243_b7579138151">hiredis.h</strong> file is saved and modify the compilation command.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p6781027145015">After the compilation, an executable <strong id="dcs-ug-0312010__en-us_topic_0148195243_b3152616191515">connRedis</strong> file is obtained.</p>
|
||||
</li><li id="dcs-ug-0312010__en-us_topic_0148195243_li13134113319491">Run the following command to access the chosen DCS Redis instance:<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen1317152502410">./connRedis {redis_instance_address} 6379 {password}</pre>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p156153275218"><em id="dcs-ug-0312010__en-us_topic_0148195243_i213424919573">{redis_instance_address}</em> indicates the IP address/domain name of DCS instance and <span class="parmname" id="dcs-ug-0312010__en-us_topic_0148195243_parmname1113414985714"><b>6379</b></span> is an example port number of DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312010__en-us_topic_0148195243_li1655151054317">1</a>. Change them as required. <em id="dcs-ug-0312010__en-us_topic_0148195243_i6461078717">{password}</em> indicates the password used to log in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation.</p>
|
||||
</li><li id="dcs-ug-0312010__en-us_topic_0148195243_li13134113319491">Run the following command to access the chosen DCS Redis instance:<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen1317152502410">./connRedis <em id="dcs-ug-0312010__en-us_topic_0148195243_i54495112455">{redis_instance_address}</em> 6379 <em id="dcs-ug-0312010__en-us_topic_0148195243_i1927418145459">{password}</em></pre>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p156153275218"><em id="dcs-ug-0312010__en-us_topic_0148195243_i166091975418">{redis_instance_address}</em> indicates the IP address/domain name of DCS instance and <span class="parmname" id="dcs-ug-0312010__en-us_topic_0148195243_parmname8609197184117"><b>6379</b></span> is an example port number of DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312010__en-us_topic_0148195243_li1655151054317">1</a>. Change them as required. <em id="dcs-ug-0312010__en-us_topic_0148195243_i191531724154118">{password}</em> indicates the password used to log in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the password setting in the command for a password-free instance.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p9507135912526">You have successfully accessed the instance if the following command output is displayed:</p>
|
||||
<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen17216114885311">AUTH: OK
|
||||
SET: OK
|
||||
GET welcome: Hello, DCS for Redis!</pre>
|
||||
</li></ol>
|
||||
<div class="notice" id="dcs-ug-0312010__en-us_topic_0148195243_note773193685410"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-ug-0312010__en-us_topic_0148195243_p15747364548">If an error is reported, indicating that the hiredis library files cannot be found, run the following commands to copy related files to the system directories and add dynamic links:</p>
|
||||
<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen18277426122614">mkdir /usr/lib/hiredis
|
||||
<div class="caution" id="dcs-ug-0312010__en-us_topic_0148195243_note1789355852417"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="dcs-ug-0312010__en-us_topic_0148195243_p861018332516">If an error is reported, indicating that the hiredis library files cannot be found, run the following commands to copy related files to the system directories and add dynamic links:</p>
|
||||
<pre class="screen" id="dcs-ug-0312010__en-us_topic_0148195243_screen561073192514">mkdir /usr/lib/hiredis
|
||||
cp /usr/local/lib/libhiredis.so.0.13 /usr/lib/hiredis/
|
||||
mkdir /usr/include/hiredis
|
||||
cp /usr/local/include/hiredis/hiredis.h /usr/include/hiredis/
|
||||
echo '/usr/local/lib' >>;>>;/etc/ld.so.conf
|
||||
ldconfig</pre>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p6269181419559">Replace the locations of the <strong id="dcs-ug-0312010__en-us_topic_0148195243_b1165117397189">so</strong> and <strong id="dcs-ug-0312010__en-us_topic_0148195243_b136511397185">.h</strong> files with actual ones before running the commands.</p>
|
||||
<p id="dcs-ug-0312010__en-us_topic_0148195243_p36109382518">Replace the locations of the <strong id="dcs-ug-0312010__en-us_topic_0148195243_b1165117397189">so</strong> and <strong id="dcs-ug-0312010__en-us_topic_0148195243_b136511397185">.h</strong> files with actual ones before running the commands.</p>
|
||||
</div></div>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
|
||||
@ -3,36 +3,43 @@
|
||||
<h1 class="topictitle1">Connecting to Redis on redis-py (Python)</h1>
|
||||
<div id="body8662426"><p id="dcs-ug-0312011__en-us_topic_0148195287_p1484772321512">This section describes how to access a Redis instance on redis-py. For more information about how to use other Redis clients, visit <a href="https://redis.io/clients" target="_blank" rel="noopener noreferrer">the Redis official website</a>.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p459512561136">The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).</p>
|
||||
<div class="note" id="dcs-ug-0312011__en-us_topic_0148195287_note8657839139"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312011__en-us_topic_0148195287_p815674955111">Use redis-py to connect to single-node, master/standby, and Proxy Cluster instances and redis-py-cluster to connect to Redis Cluster instances.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p6132159103917">To access a Redis 7.0 instance, use a redis-py <a href="https://github.com/redis/redis-py/releases/tag/v4.3.0" target="_blank" rel="noopener noreferrer">4.3.0</a> or later client. <a href="https://github.com/redis/redis-py/releases/tag/v5.0.0" target="_blank" rel="noopener noreferrer">5.0.0</a> and later versions are recommended.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section13633153683417"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-ug-0312011__en-us_topic_0148195287_p21741148163417">Use redis-py to connect to single-node, master/standby, read/write splitting, and Proxy Cluster instances and redis-py-cluster to connect to Redis Cluster instances.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p217414863413">To access a Redis 7.0 instance, use a redis-py <a href="https://github.com/redis/redis-py/releases/tag/v4.3.0" target="_blank" rel="noopener noreferrer">4.3.0</a> or later client. <a href="https://github.com/redis/redis-py/releases/tag/v5.0.0" target="_blank" rel="noopener noreferrer">5.0.0</a> and later versions are recommended.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312011__en-us_topic_0148195287_ul46828691102415"><li id="dcs-ug-0312011__en-us_topic_0148195287_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312011__en-us_topic_0148195287_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312011__en-us_topic_0148195287_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312011__en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li152161914112">If the ECS runs the Linux OS, ensure that the Python compilation environment has been installed on the ECS.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section886785613318"><h4 class="sectiontitle">Connecting to Redis on redis-py</h4><ol id="dcs-ug-0312011__en-us_topic_0148195287_ol750153111581"><li id="dcs-ug-0312011__en-us_topic_0148195287_li450593110588"><a name="dcs-ug-0312011__en-us_topic_0148195287_li450593110588"></a><a name="en-us_topic_0148195287_li450593110588"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312011__en-us_topic_0148195287_p1852693175815">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section886785613318"><h4 class="sectiontitle">Procedure</h4><ul id="dcs-ug-0312011__en-us_topic_0148195287_ul1195010681013"><li id="dcs-ug-0312011__en-us_topic_0148195287_li99501662107">To access a single-node, master/standby, read/write splitting, or Proxy Cluster instance, see <a href="#dcs-ug-0312011__en-us_topic_0148195287_section63591955155713">Accessing a Non-Redis Cluster Instance Using redis-py</a>.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li89500612109">To access a Redis Cluster instance, see <a href="#dcs-ug-0312011__en-us_topic_0148195287_section14400336866">Accessing a Redis Cluster Instance Using redis-py</a>.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section63591955155713"><a name="dcs-ug-0312011__en-us_topic_0148195287_section63591955155713"></a><a name="en-us_topic_0148195287_section63591955155713"></a><h4 class="sectiontitle">Accessing a Non-Redis Cluster Instance Using redis-py</h4><ol id="dcs-ug-0312011__en-us_topic_0148195287_ol750153111581"><li id="dcs-ug-0312011__en-us_topic_0148195287_li450593110588"><a name="dcs-ug-0312011__en-us_topic_0148195287_li450593110588"></a><a name="en-us_topic_0148195287_li450593110588"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312011__en-us_topic_0148195287_p1852693175815">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li197981138115816"><span>Log in to the ECS.</span><p><p id="dcs-ug-0312011__en-us_topic_0148195287_p038214401588">The following uses CentOS as an example to describe how to access an instance using a Python client.</p>
|
||||
</p></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li1765193715571"><span>Access the DCS Redis instance.</span><p><div class="p" id="dcs-ug-0312011__en-us_topic_0148195287_p1288092295413">If the ECS OS does not provide Python, run the following <strong id="dcs-ug-0312011__en-us_topic_0148195287_b6661195415228">yum</strong> command to install it:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen820211362616">yum install python</pre>
|
||||
<div class="note" id="dcs-ug-0312011__en-us_topic_0148195287_note7781121311542"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312011__en-us_topic_0148195287_p1178141314540">The Python version must be 3.6 or later. If the default Python version is earlier than 3.6, perform the following operations to change it:</p>
|
||||
<ol type="a" id="dcs-ug-0312011__en-us_topic_0148195287_ol107811913195417"><li id="dcs-ug-0312011__en-us_topic_0148195287_li157816132545">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b19386125585810">rm -rf python</strong> command to delete the Python symbolic link.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li147817139546">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b530853913437">ln -s python</strong><em id="dcs-ug-0312011__en-us_topic_0148195287_i1922893620437">X.X.X</em><strong id="dcs-ug-0312011__en-us_topic_0148195287_b1030818392438"> python</strong> command to create another Python link. In the command, <em id="dcs-ug-0312011__en-us_topic_0148195287_i19308049134312">X.X.X</em> indicates the Python version number.</li></ol>
|
||||
</div></div>
|
||||
<ul id="dcs-ug-0312011__en-us_topic_0148195287_ul1178291312546"><li id="dcs-ug-0312011__en-us_topic_0148195287_li167827135540"><strong id="dcs-ug-0312011__en-us_topic_0148195287_b136981824162319">For single-node, master/standby, or Proxy Cluster types:</strong><ol type="a" id="dcs-ug-0312011__en-us_topic_0148195287_ol1878241385416"><li id="dcs-ug-0312011__en-us_topic_0148195287_li19781141311541">Install Python and redis-py.<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol17811513125413"><li id="dcs-ug-0312011__en-us_topic_0148195287_li117811135549">If the system does not provide Python, run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b1820042212333">yum</strong> command to install it.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li47818139549">Run the following command to download and decompress the redis-py package:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen15525175415714">wget https://github.com/andymccurdy/redis-py/archive/master.zip
|
||||
</p></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li1765193715571"><span>Access the DCS Redis instance.</span><p><ol type="a" id="dcs-ug-0312011__en-us_topic_0148195287_ol5241181516014"><li id="dcs-ug-0312011__en-us_topic_0148195287_li17241201519018">If the ECS OS does not provide Python, run the following <strong id="dcs-ug-0312011__en-us_topic_0148195287_b6661195415228">yum</strong> command to install it:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen64591117165410">yum install python</pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p1178141314540">The Python version must be 3.6 or later. If the default Python version is earlier than 3.6, perform the following operations to change it:</p>
|
||||
<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol107811913195417"><li id="dcs-ug-0312011__en-us_topic_0148195287_li157816132545">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b19386125585810">rm -rf python</strong> command to delete the Python symbolic link.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li147817139546">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b530853913437">ln -s python</strong><em id="dcs-ug-0312011__en-us_topic_0148195287_i1922893620437">X.X.X</em><strong id="dcs-ug-0312011__en-us_topic_0148195287_b1030818392438"> python</strong> command to create another Python link. In the command, <em id="dcs-ug-0312011__en-us_topic_0148195287_i19308049134312">X.X.X</em> indicates the Python version number.</li></ol>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li19781141311541">Install Python and redis-py.<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol17811513125413"><li id="dcs-ug-0312011__en-us_topic_0148195287_li117811135549">If the system does not provide Python, run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b1820042212333">yum</strong> command to install it.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li47818139549">Run the following command to download and decompress the redis-py package:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen15525175415714">wget https://github.com/andymccurdy/redis-py/archive/master.zip
|
||||
unzip master.zip</pre>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li478117137543">Go to the directory where the decompressed redis-py package is saved, and install redis-py.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen15453122755818">python setup.py install</pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p16781141335410">After the installation, run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b678131318549">python</strong> command. redis-py have been successfully installed if the following command output is displayed:</p>
|
||||
<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig135939194314"><span class="figcap"><b>Figure 1 </b>Running the python command</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image8361392435" src="en-us_image_0000001188005622.png"></span></div>
|
||||
<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig135939194314"><span class="figcap"><b>Figure 1 </b>Running the python command</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image8361392435" src="en-us_image_0000002278891732.png"></span></div>
|
||||
</li></ol>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li197821713135417">Use the redis-py client to connect to the instance. In the following steps, commands are executed in CLI mode. (Alternatively, write the commands into a Python script and then execute the script.)<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol157811213195418"><li id="dcs-ug-0312011__en-us_topic_0148195287_li1678121355410">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b14882210122012">python</strong> command to enter the CLI mode. You have entered CLI mode if the following command output is displayed:<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig01801119455"><span class="figcap"><b>Figure 2 </b>Entering the CLI mode</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image21811612454" src="en-us_image_0000001187846598.png"></span></div>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li197821713135417">Use the redis-py client to connect to the instance. In the following steps, commands are executed in CLI mode. (Alternatively, write the commands into a Python script and then execute the script.)<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol157811213195418"><li id="dcs-ug-0312011__en-us_topic_0148195287_li1678121355410">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b14882210122012">python</strong> command to enter the CLI mode. You have entered CLI mode if the following command output is displayed:<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig01801119455"><span class="figcap"><b>Figure 2 </b>Entering the CLI mode</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image21811612454" src="en-us_image_0000002313524429.png"></span></div>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li278111135547">Run the following command to access the chosen DCS Redis instance:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen127811013185412">r = redis.StrictRedis(host='XXX.XXX.XXX.XXX', port=6379, password='******');</pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p97811713195417"><em id="dcs-ug-0312011__en-us_topic_0148195287_i131179547528">XXX.XXX.XXX.XXX</em> indicates the IP address/domain name of the DCS instance and <span class="parmname" id="dcs-ug-0312011__en-us_topic_0148195287_parmname211725410524"><b>6379</b></span> is an example port number of the instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312011__en-us_topic_0148195287_li450593110588">1</a>. Change them as required. <em id="dcs-ug-0312011__en-us_topic_0148195287_i12054692453417">******</em> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p97811713195417"><em id="dcs-ug-0312011__en-us_topic_0148195287_i131179547528">XXX.XXX.XXX.XXX</em> indicates the IP address/domain name of the DCS instance and <span class="parmname" id="dcs-ug-0312011__en-us_topic_0148195287_parmname211725410524"><b>6379</b></span> is an example port number of the instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312011__en-us_topic_0148195287_li450593110588">1</a>. Change them as required. <strong id="dcs-ug-0312011__en-us_topic_0148195287_b7595519162513">******</strong> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b162926753912">, password='******'</strong> part in the command for a password-free instance.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p978151311545">You have successfully accessed the instance if the following command output is displayed. Enter commands to perform read and write operations on the database.</p>
|
||||
<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig2367133024516"><span class="figcap"><b>Figure 3 </b>Redis connected successfully</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image12368430124511" src="en-us_image_0000001233126245.png"></span></div>
|
||||
<div class="fignone" id="dcs-ug-0312011__en-us_topic_0148195287_fig2367133024516"><span class="figcap"><b>Figure 3 </b>Redis connected successfully</span><br><span><img id="dcs-ug-0312011__en-us_topic_0148195287_image12368430124511" src="en-us_image_0000002313491413.png"></span></div>
|
||||
</li></ol>
|
||||
</li></ol>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li478221313548"><strong id="dcs-ug-0312011__en-us_topic_0148195287_b10230555172315">For the Redis Cluster type:</strong><ol type="a" id="dcs-ug-0312011__en-us_topic_0148195287_ol6782101355411"><li id="dcs-ug-0312011__en-us_topic_0148195287_li67822013145419">Install the redis-py-cluster client.<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol12782413195414"><li id="dcs-ug-0312011__en-us_topic_0148195287_li1978271335410">Download the released version.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen142781858165516">wget https://github.com/Grokzen/redis-py-cluster/releases/download/2.1.3/redis-py-cluster-2.1.3.tar.gz</pre>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li478211314542">Decompress the package.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen1472621311564">tar -xvf redis-py-cluster-2.1.3.tar.gz</pre>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li5782413155410">Go to the directory where the decompressed redis-py-cluster package is saved, and install redis-py-cluster.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen78371961574">python setup.py install</pre>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312011__en-us_topic_0148195287_section14400336866"><a name="dcs-ug-0312011__en-us_topic_0148195287_section14400336866"></a><a name="en-us_topic_0148195287_section14400336866"></a><h4 class="sectiontitle">Accessing a Redis Cluster Instance Using redis-py</h4><ol id="dcs-ug-0312011__en-us_topic_0148195287_ol13359342166"><li id="dcs-ug-0312011__en-us_topic_0148195287_li143595429615"><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312011__en-us_topic_0148195287_p93598421461">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li13359164211615"><span>Log in to the ECS.</span><p><p id="dcs-ug-0312011__en-us_topic_0148195287_p63593421564">The following uses CentOS as an example to describe how to access an instance using a Python client.</p>
|
||||
</p></li><li id="dcs-ug-0312011__en-us_topic_0148195287_li235920421664"><span>Access the DCS Redis instance.</span><p><ol type="a" id="dcs-ug-0312011__en-us_topic_0148195287_ol835924217617"><li id="dcs-ug-0312011__en-us_topic_0148195287_li93591942465">If the ECS OS does not provide Python, run the following <strong id="dcs-ug-0312011__en-us_topic_0148195287_b1909758532">yum</strong> command to install it:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen123592042267">yum install python</pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p183594428618">The Python version must be 3.6 or later. If the default Python version is earlier than 3.6, perform the following operations to change it:</p>
|
||||
<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol183590421469"><li id="dcs-ug-0312011__en-us_topic_0148195287_li1635924210610">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b763018116">rm -rf python</strong> command to delete the Python symbolic link.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li5359194218619">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b127605385376">ln -s python</strong><em id="dcs-ug-0312011__en-us_topic_0148195287_i177601938123713">X.X.X</em><strong id="dcs-ug-0312011__en-us_topic_0148195287_b1876063818378"> python</strong> command to create another Python link. In the command, <em id="dcs-ug-0312011__en-us_topic_0148195287_i20761103811372">X.X.X</em> indicates the Python version number.</li></ol>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li820517171074">Install the redis-py-cluster client.<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol1436014422068"><li id="dcs-ug-0312011__en-us_topic_0148195287_li1436015422064">Download the released version.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen14360144215613">wget https://github.com/Grokzen/redis-py-cluster/releases/download/2.1.3/redis-py-cluster-2.1.3.tar.gz</pre>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li436015421167">Decompress the package.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen143601942164">tar -xvf redis-py-cluster-2.1.3.tar.gz</pre>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li113608421765">Go to the directory where the decompressed redis-py-cluster package is saved, and install redis-py-cluster.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen113604421164">python setup.py install</pre>
|
||||
</li></ol>
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li107821013145417">Access the DCS Redis instance by using redis-py-cluster.<p id="dcs-ug-0312011__en-us_topic_0148195287_p77821713115413"><a name="dcs-ug-0312011__en-us_topic_0148195287_li107821013145417"></a><a name="en-us_topic_0148195287_li107821013145417"></a>In the following steps, commands are executed in CLI mode. (Alternatively, write the commands into a Python script and then execute the script.)</p>
|
||||
<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol878213139545"><li id="dcs-ug-0312011__en-us_topic_0148195287_li14782213155412">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b1787240593">python</strong> command to enter the CLI mode.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li8782161314544">Run the following command to access the chosen DCS Redis instance. If the instance does not have a password, exclude <strong id="dcs-ug-0312011__en-us_topic_0148195287_b277142714469">password='******'</strong> from the command.<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen878218131542">>>> from rediscluster import RedisCluster
|
||||
</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li4804345195320">Access the DCS Redis instance by using redis-py-cluster.<div class="p" id="dcs-ug-0312011__en-us_topic_0148195287_p9332357195311"><a name="dcs-ug-0312011__en-us_topic_0148195287_li4804345195320"></a><a name="en-us_topic_0148195287_li4804345195320"></a>In the following steps, commands are executed in CLI mode. (Alternatively, write the commands into a Python script and then execute the script.)<ol class="substepthirdol" id="dcs-ug-0312011__en-us_topic_0148195287_ol781020455532"><li id="dcs-ug-0312011__en-us_topic_0148195287_li0810545195319">Run the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b2015957189">python</strong> command to enter the CLI mode.</li><li id="dcs-ug-0312011__en-us_topic_0148195287_li8810114515535">Run the following command to access the chosen DCS Redis instance:<pre class="screen" id="dcs-ug-0312011__en-us_topic_0148195287_screen0810184514532">>>> from rediscluster import RedisCluster
|
||||
|
||||
>>> startup_nodes = [{"host": "192.168.0.143", "port": "6379"},{"host": "192.168.0.144", "port": "6379"},{"host": "192.168.0.145", "port": "6379"},{"host": "192.168.0.146", "port": "6379"}]
|
||||
|
||||
@ -41,12 +48,13 @@ unzip master.zip</pre>
|
||||
>>> rc.set("foo", "bar")
|
||||
True
|
||||
>>> print(rc.get("foo"))
|
||||
'bar'</pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p12782201315417"></p>
|
||||
'bar'
|
||||
>>> </pre>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p3710103795910"><strong id="dcs-ug-0312011__en-us_topic_0148195287_b382445916372">******</strong> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the <strong id="dcs-ug-0312011__en-us_topic_0148195287_b15421730173818">, password='******'</strong> part in the command for a password-free instance.</p>
|
||||
<p id="dcs-ug-0312011__en-us_topic_0148195287_p596925212212">You have successfully accessed the instance if the following command output is displayed. Enter commands to perform read and write operations on the database.</p>
|
||||
</li></ol>
|
||||
</li></ol>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li></ol>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,26 +3,33 @@
|
||||
<h1 class="topictitle1">Connecting to Redis on ioredis (Node.js)</h1>
|
||||
<div id="body8662426"><p id="dcs-ug-0312012__en-us_topic_0148195323_p1484772321512">This section describes how to access a Redis instance on ioredis. For more information about how to use other Redis clients, visit <a href="https://redis.io/clients" target="_blank" rel="noopener noreferrer">the Redis official website</a>.</p>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p57021931375">The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).</p>
|
||||
<div class="note" id="dcs-ug-0312012__en-us_topic_0148195323_note20184812103319"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312012__en-us_topic_0148195323_p141841112113312">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To access a Redis Cluster instance on ioredis, see <a href="https://github.com/NodeRedis/cluster-key-slot" target="_blank" rel="noopener noreferrer">Node.js Redis client description</a>.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312012__en-us_topic_0148195323_ul46828691102415"><li id="dcs-ug-0312012__en-us_topic_0148195323_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312012__en-us_topic_0148195323_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li152161914112">If the ECS runs the Linux OS, ensure that the GCC compilation environment has been installed on the ECS.</li></ul>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section027824413101"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-ug-0312012__en-us_topic_0148195323_p0149753101012">The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances. To access a Redis Cluster instance on ioredis, see <a href="https://github.com/NodeRedis/cluster-key-slot" target="_blank" rel="noopener noreferrer">Node.js Redis client description</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section195273281212"><h4 class="sectiontitle">Connecting to Redis on ioredis</h4><ul id="dcs-ug-0312012__en-us_topic_0148195323_ul177687518141"><li id="dcs-ug-0312012__en-us_topic_0148195323_li17768145111419"><strong id="dcs-ug-0312012__en-us_topic_0148195323_b1138521918425">For client servers running Ubuntu (Debian series):</strong></li></ul>
|
||||
<ol id="dcs-ug-0312012__en-us_topic_0148195323_ol10257131219160"><li id="dcs-ug-0312012__en-us_topic_0148195323_li5233248151213"><a name="dcs-ug-0312012__en-us_topic_0148195323_li5233248151213"></a><a name="en-us_topic_0148195323_li5233248151213"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p18243194818121">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li643787195111"><span>Log in to the ECS.</span></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li19257712171619"><span>Install Node.js.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen42641489118">apt install nodejs-legacy</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p5417192152011">If the preceding command does not work, run the following commands:</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen10346333132219">wget https://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz --no-check-certificate
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312012__en-us_topic_0148195323_ul46828691102415"><li id="dcs-ug-0312012__en-us_topic_0148195323_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312012__en-us_topic_0148195323_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li152161914112">The Linux ECS must have GNU Compiler Collection (GCC) installed. To query the GCC version, run the <strong id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195299_b1992028142616">gcc --version</strong> command.<p id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195299_p134011850550">Run the following command to install GCC on the ECS if needed, CentOS is used as an example:</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195299_screen55587413567">yum install -y make
|
||||
yum install -y pcre-devel
|
||||
yum install -y zlib-devel
|
||||
yum install -y libevent-devel
|
||||
yum install -y openssl-devel
|
||||
yum install -y gcc-c++</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section195273281212"><h4 class="sectiontitle">Connecting to Redis on ioredis</h4><ul id="dcs-ug-0312012__en-us_topic_0148195323_ul153960451798"><li id="dcs-ug-0312012__en-us_topic_0148195323_li193961245499">For a client server running Ubuntu (Debian series), see <a href="#dcs-ug-0312012__en-us_topic_0148195323_section10247113513274">For Client Servers Running Ubuntu (Debian Series)</a>.</li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1639615451698">For a client server running CentOS (Red Hat series), see <a href="#dcs-ug-0312012__en-us_topic_0148195323_section485881815286">For client servers running CentOS (Red Hat series)</a>.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section10247113513274"><a name="dcs-ug-0312012__en-us_topic_0148195323_section10247113513274"></a><a name="en-us_topic_0148195323_section10247113513274"></a><h4 class="sectiontitle">For Client Servers Running Ubuntu (Debian Series)</h4><ol id="dcs-ug-0312012__en-us_topic_0148195323_ol9131414152811"><li id="dcs-ug-0312012__en-us_topic_0148195323_li41311414288"><a name="dcs-ug-0312012__en-us_topic_0148195323_li41311414288"></a><a name="en-us_topic_0148195323_li41311414288"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p161321417281">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1013214182819"><span>Log in to the ECS.</span></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li161319149281"><span>Install Node.js.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen141331472810">apt install nodejs-legacy</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p313131412810">If the preceding command does not work, run the following commands:</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1134141284">wget https://nodejs.org/dist/v4.28.5/node-v4.28.5.tar.gz --no-check-certificate
|
||||
tar -xvf node-v4.28.5.tar.gz
|
||||
cd node-v4.28.5
|
||||
./configure
|
||||
make
|
||||
make install</pre>
|
||||
<div class="note" id="dcs-ug-0312012__en-us_topic_0148195323_note1699823913203"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312012__en-us_topic_0148195323_p18998153912015">After the installation is complete, run the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b166785417422">node --version</strong> command to query the Node.js version to check whether the installation is successful.</p>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1393302820161"><span>Install the node package manager (npm).</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen189437191238">apt install npm</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1847315281611"><span>Install the Redis client ioredis.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen5751133052315">npm install ioredis</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li654316451712"><span>Edit the sample script for connecting to a DCS Redis instance.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p186035445228">Add the following content to the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b192401455191515">ioredisdemo.js</strong> script, including information about connection and data reading.</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen0943145614236">var Redis = require('ioredis');
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p10131714132817">After the installation is complete, run the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b166785417422">node --version</strong> command to query the Node.js version to check whether the installation is successful.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li51371422810"><span>Install the node package manager (npm).</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen101321413284">apt install npm</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li614131417283"><span>Install the Redis client ioredis.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen5141414142810">npm install ioredis</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1614214172811"><span>Edit the sample script for connecting to a DCS Redis instance.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p1414714172819">Add the following content to the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b192401455191515">ioredisdemo.js</strong> script, including information about connection and data reading.</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen12146142281">var Redis = require('ioredis');
|
||||
var redis = new Redis({
|
||||
port: 6379, // Redis port
|
||||
host: '192.168.0.196', // Redis host
|
||||
@ -43,26 +50,24 @@ redis.sadd('set', 1, 3, 5, 7);
|
||||
redis.sadd('set', [1, 3, 5, 7]);
|
||||
// All arguments are passed directly to the redis server:
|
||||
redis.set('key', 100, 'EX', 10);</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p1812329142415"><em id="dcs-ug-0312012__en-us_topic_0148195323_i1675119102411">host</em> indicates the example IP address/domain name of the DCS instance and <em id="dcs-ug-0312012__en-us_topic_0148195323_i1075119104413">port</em> indicates the port number of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312012__en-us_topic_0148195323_li5233248151213">1</a>. Change them as required. <em id="dcs-ug-0312012__en-us_topic_0148195323_i1156036113716">******</em> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li20350145511811"><span>Run the sample script to access the chosen DCS Redis instance.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen17910185112314">node ioredisdemo.js</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p01491412819"><strong id="dcs-ug-0312012__en-us_topic_0148195323_b281414231045">host</strong> indicates the example IP address/domain name of the DCS instance and <strong id="dcs-ug-0312012__en-us_topic_0148195323_b10815142310415">port</strong> indicates the port of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312012__en-us_topic_0148195323_li41311414288">1</a>. Change them as required. <strong id="dcs-ug-0312012__en-us_topic_0148195323_b19798104818419">******</strong> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the password setting in the command for a password-free instance.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li514161418283"><span>Run the sample script to access the chosen DCS Redis instance.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1141414192816">node ioredisdemo.js</pre>
|
||||
</p></li></ol>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p1987582762715"></p>
|
||||
<ul id="dcs-ug-0312012__en-us_topic_0148195323_ul194361539181515"><li id="dcs-ug-0312012__en-us_topic_0148195323_li1043615395153"><strong id="dcs-ug-0312012__en-us_topic_0148195323_b8482143744710">For client servers running CentOS (Red Hat series):</strong></li></ul>
|
||||
<ol id="dcs-ug-0312012__en-us_topic_0148195323_ol129825117273"><li id="dcs-ug-0312012__en-us_topic_0148195323_li11511175651212"><a name="dcs-ug-0312012__en-us_topic_0148195323_li11511175651212"></a><a name="en-us_topic_0148195323_li11511175651212"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p1552810568127">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li53764167515"><span>Log in to the ECS.</span></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li1198391111271"><span>Install Node.js.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1999816402252">yum install nodejs</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p17990131113271">If the preceding command does not work, run the following commands:</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen7966135613252">wget https://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz --no-check-certificate
|
||||
tar -xvf node-v0.12.4.tar.gz
|
||||
cd node-v0.12.4
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312012__en-us_topic_0148195323_section485881815286"><a name="dcs-ug-0312012__en-us_topic_0148195323_section485881815286"></a><a name="en-us_topic_0148195323_section485881815286"></a><h4 class="sectiontitle">For client servers running CentOS (Red Hat series)</h4><ol id="dcs-ug-0312012__en-us_topic_0148195323_ol1535124914282"><li id="dcs-ug-0312012__en-us_topic_0148195323_li10535549122814"><a name="dcs-ug-0312012__en-us_topic_0148195323_li10535549122814"></a><a name="en-us_topic_0148195323_li10535549122814"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_en-us_topic_0148195323_p161321417281">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li75351749192814"><span>Log in to the ECS.</span></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li12535114916284"><span>Install Node.js.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen453516490289">yum install nodejs</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p1553514918289">If the preceding command does not work, run the following commands:</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen8535049162820">wget https://nodejs.org/dist/v4.28.5/node-v4.28.5.tar.gz --no-check-certificate
|
||||
tar -xvf node-v4.28.5.tar.gz
|
||||
cd node-v4.28.5
|
||||
./configure
|
||||
make
|
||||
make install</pre>
|
||||
<div class="note" id="dcs-ug-0312012__en-us_topic_0148195323_note41541282719"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312012__en-us_topic_0148195323_p1817412152714">After the installation is complete, run the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b18530132313484">node --version</strong> command to query the Node.js version to check whether the installation is successful.</p>
|
||||
</div></div>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li142141212272"><span>Install npm.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1410913146256">yum install npm</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li132811124276"><span>Install the Redis client ioredis.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen41415253255">npm install ioredis</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li12371312102715"><span>Edit the sample script for connecting to a DCS Redis instance.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p1343181217274">Add the following content to the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b56631937121710">ioredisdemo.js</strong> script, including information about connection and data reading.</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen12461212192719">var Redis = require('ioredis');
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p18535134918287">After the installation is complete, run the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b18530132313484">node -v</strong> command to query the Node.js version to check whether the installation is successful.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li4535144912812"><span>Install the node package manager (npm).</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen185351749102811">yum install npm</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li115351649202813"><span>Install the Redis client ioredis.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen19535649102818">npm install ioredis</pre>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li16535164962817"><span>Edit the sample script for connecting to a DCS Redis instance.</span><p><p id="dcs-ug-0312012__en-us_topic_0148195323_p7535349152814">Add the following content to the <strong id="dcs-ug-0312012__en-us_topic_0148195323_b684012586107">ioredisdemo.js</strong> script, including information about connection and data reading.</p>
|
||||
<pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen85351949122814">var Redis = require('ioredis');
|
||||
var redis = new Redis({
|
||||
port: 6379, // Redis port
|
||||
host: '192.168.0.196', // Redis host
|
||||
@ -83,8 +88,8 @@ redis.sadd('set', 1, 3, 5, 7);
|
||||
redis.sadd('set', [1, 3, 5, 7]);
|
||||
// All arguments are passed directly to the redis server:
|
||||
redis.set('key', 100, 'EX', 10);</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p89311292712"><em id="dcs-ug-0312012__en-us_topic_0148195323_i13522637347">host</em> indicates the example IP address/domain name of the DCS instance and <em id="dcs-ug-0312012__en-us_topic_0148195323_i16523237749">port</em> indicates the port number of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312012__en-us_topic_0148195323_li11511175651212">1</a>. Change them as required. <em id="dcs-ug-0312012__en-us_topic_0148195323_i20244152303816">******</em> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li19108121232714"><span>Run the sample script to access the chosen DCS Redis instance.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1881544518249">node ioredisdemo.js</pre>
|
||||
<p id="dcs-ug-0312012__en-us_topic_0148195323_p1653504918284"><strong id="dcs-ug-0312012__en-us_topic_0148195323_b3590411993">host</strong> indicates the example IP address/domain name of the DCS instance and <strong id="dcs-ug-0312012__en-us_topic_0148195323_b1359141693">port</strong> indicates the port of the DCS instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312012__en-us_topic_0148195323_li10535549122814">1</a>. Change them as required. <strong id="dcs-ug-0312012__en-us_topic_0148195323_b572911881118">******</strong> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the password setting in the command for a password-free instance.</p>
|
||||
</p></li><li id="dcs-ug-0312012__en-us_topic_0148195323_li453517490289"><span>Run the sample script to access the chosen DCS Redis instance.</span><p><pre class="screen" id="dcs-ug-0312012__en-us_topic_0148195323_screen1535194912810">node ioredisdemo.js</pre>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,12 +3,19 @@
|
||||
<h1 class="topictitle1">Connecting to Redis on StackExchange.Redis (C#)</h1>
|
||||
<div id="body8662426"><p id="dcs-ug-0312013__en-us_topic_0148195355_p1484772321512">This section describes how to access a Redis instance on StackExchange.Redis. For more information about how to use other Redis clients, visit <a href="https://redis.io/clients" target="_blank" rel="noopener noreferrer">the Redis official website</a>.</p>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p17664719122">The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).</p>
|
||||
<div class="note" id="dcs-ug-0312013__en-us_topic_0148195355_note9329144914114"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-ug-0312013__en-us_topic_0148195355_p6329134912411">If you use the StackExchange client to connect to a Proxy Cluster instance, the multi-DB function cannot be used.</p>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p6132159103917">To access a Redis 7.0 instance, use a hiredis <a href="https://github.com/StackExchange/StackExchange.Redis/releases/tag/2.6.111" target="_blank" rel="noopener noreferrer">2.6.111</a> or later client. <a href="https://github.com/StackExchange/StackExchange.Redis/blob/2.8.16/docs/ReleaseNotes.md#2710" target="_blank" rel="noopener noreferrer">2.7.0</a> and later versions are recommended.</p>
|
||||
</div></div>
|
||||
<div class="section" id="dcs-ug-0312013__en-us_topic_0148195355_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312013__en-us_topic_0148195355_ul46828691102415"><li id="dcs-ug-0312013__en-us_topic_0148195355_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312013__en-us_topic_0148195355_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li152161914112">If the ECS runs the Linux OS, ensure that the GCC compilation environment has been installed on the ECS.</li></ul>
|
||||
<div class="section" id="dcs-ug-0312013__en-us_topic_0148195355_section101825351786"><h4 class="sectiontitle">Notes and Constraints</h4><p id="dcs-ug-0312013__en-us_topic_0148195355_p736364515810">If you use the StackExchange client to connect to a Proxy Cluster instance, the multi-DB function cannot be used.</p>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p6363174515811">To access a Redis 7.0 instance, use a hiredis <a href="https://github.com/StackExchange/StackExchange.Redis/releases/tag/2.6.111" target="_blank" rel="noopener noreferrer">2.6.111</a> or later client. <a href="https://github.com/StackExchange/StackExchange.Redis/blob/2.8.16/docs/ReleaseNotes.md#2710" target="_blank" rel="noopener noreferrer">2.7.0</a> and later versions are recommended.</p>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312013__en-us_topic_0148195355_section994505645015"><h4 class="sectiontitle">Connecting to Redis on StackExchange.Redis</h4><ol id="dcs-ug-0312013__en-us_topic_0148195355_ol15566181810515"><li id="dcs-ug-0312013__en-us_topic_0148195355_li457118182512"><a name="dcs-ug-0312013__en-us_topic_0148195355_li457118182512"></a><a name="en-us_topic_0148195355_li457118182512"></a><span>View the IP address/domain name and port number of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312013__en-us_topic_0148195355_p25826184516">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
<div class="section" id="dcs-ug-0312013__en-us_topic_0148195355_section1502270695932"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-ug-0312013__en-us_topic_0148195355_ul46828691102415"><li id="dcs-ug-0312013__en-us_topic_0148195355_li7215915117">A Redis instance is created, and is in the <strong id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195299_b046893535412">Running</strong> state. </li><li id="dcs-ug-0312013__en-us_topic_0148195355_li132154114111">An ECS has been created. For details about how to create an ECS, see <em id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195287_i1433165413015"><a href="https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0163572588.html" target="_blank" rel="noopener noreferrer">Elastic Cloud Server User Guide</a></em></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li152161914112">The Linux ECS must have GNU Compiler Collection (GCC) installed. To query the GCC version, run the <strong id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195299_b1992028142616">gcc --version</strong> command.<p id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195299_p134011850550">Run the following command to install GCC on the ECS if needed, CentOS is used as an example:</p>
|
||||
<pre class="screen" id="dcs-ug-0312013__en-us_topic_0148195355_en-us_topic_0148195299_screen55587413567">yum install -y make
|
||||
yum install -y pcre-devel
|
||||
yum install -y zlib-devel
|
||||
yum install -y libevent-devel
|
||||
yum install -y openssl-devel
|
||||
yum install -y gcc-c++</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="dcs-ug-0312013__en-us_topic_0148195355_section994505645015"><h4 class="sectiontitle">Connecting to Redis on StackExchange.Redis</h4><ol id="dcs-ug-0312013__en-us_topic_0148195355_ol15566181810515"><li id="dcs-ug-0312013__en-us_topic_0148195355_li457118182512"><a name="dcs-ug-0312013__en-us_topic_0148195355_li457118182512"></a><a name="en-us_topic_0148195355_li457118182512"></a><span>View the IP address/domain name and port of the DCS Redis instance to be accessed.</span><p><p id="dcs-ug-0312013__en-us_topic_0148195355_p25826184516">For details, see <a href="dcs-ug-0312016.html">Viewing and Modifying DCS Instance Information</a>.</p>
|
||||
</p></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li1587318195113"><span>Log in to the ECS.</span><p><p id="dcs-ug-0312013__en-us_topic_0148195355_p290245545513">A Windows ECS is used as an example.</p>
|
||||
</p></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li3838131182413"><span>Install Visual Studio Community 2017 on the ECS.</span></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li185741939192413"><span>Start Visual Studio 2017 and create a project.</span><p><p id="dcs-ug-0312013__en-us_topic_0148195355_p834993310248">Set the project name to <strong id="dcs-ug-0312013__en-us_topic_0148195355_b16317192805316">redisdemo</strong>.</p>
|
||||
</p></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li661511181513"><span>Install StackExchange.Redis by using the NuGet package manager of Visual Studio.</span><p><p id="dcs-ug-0312013__en-us_topic_0148195355_p4947161117210">Access the NuGet package manager console according to <a href="#dcs-ug-0312013__en-us_topic_0148195355_fig394516508313">Figure 1</a>, and enter <strong id="dcs-ug-0312013__en-us_topic_0148195355_b1371316118285">Install-Package StackExchange.Redis -<em id="dcs-ug-0312013__en-us_topic_0148195355_i97128132820">Version 2.2.79</em></strong>. (The version number is optional).</p>
|
||||
@ -54,7 +61,7 @@ namespace redisdemo
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p194285503418"><em id="dcs-ug-0312013__en-us_topic_0148195355_i825144384814">{instance_ip_address}</em> and <em id="dcs-ug-0312013__en-us_topic_0148195355_i1556025814489">{port}</em> are the IP address/domain name and port number of the DCS Redis instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312013__en-us_topic_0148195355_li457118182512">1</a>. Change them as required. <em id="dcs-ug-0312013__en-us_topic_0148195355_i796615013">********</em> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation.</p>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p194285503418"><em id="dcs-ug-0312013__en-us_topic_0148195355_i825144384814">{instance_ip_address}</em> and <em id="dcs-ug-0312013__en-us_topic_0148195355_i1556025814489">{port}</em> are the IP address/domain name and port of the DCS Redis instance. For details about how to obtain the IP address/domain name and port, see <a href="#dcs-ug-0312013__en-us_topic_0148195355_li457118182512">1</a>. Change them as required. <em id="dcs-ug-0312013__en-us_topic_0148195355_i796615013">********</em> indicates the password used for logging in to the chosen DCS Redis instance. This password is defined during DCS Redis instance creation. Omit the password setting in the command for a password-free instance.</p>
|
||||
</p></li><li id="dcs-ug-0312013__en-us_topic_0148195355_li117658171892"><span>Run the code. You have successfully accessed the instance if the following command output is displayed:</span><p><pre class="screen" id="dcs-ug-0312013__en-us_topic_0148195355_screen1365752211108">Hello, DCS for Redis!</pre>
|
||||
<p id="dcs-ug-0312013__en-us_topic_0148195355_p1888616153105">For more information about other commands of StackExchange.Redis, visit <a href="https://stackexchange.github.io/StackExchange.Redis/" target="_blank" rel="noopener noreferrer">StackExchange.Redis</a>.</p>
|
||||
</p></li></ol>
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs-ug-1009002.html">Command Renaming</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="dcs_03_0016.html">Upgrading the Minor or Proxy Version of a DCS Instance</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</tr>
|
||||
<tr id="dcs-ug-0312016__row12879195144415"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.1 "><p id="dcs-ug-0312016__p5880155113445">Status</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.2 "><p id="dcs-ug-0312016__p1388015119440">State of the chosen instance.</p>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.2 "><p id="dcs-ug-0312016__p1388015119440">State of the chosen instance. For example, running, creating, and faulty.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-ug-0312016__row588095124412"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.1 "><p id="dcs-ug-0312016__p1888095111445">ID</p>
|
||||
@ -82,7 +82,7 @@
|
||||
</tr>
|
||||
<tr id="dcs-ug-0312016__row1447352421112"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.1 "><p id="dcs-ug-0312016__p466130191118">Maintenance</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.2 "><p id="dcs-ug-0312016__p106653018116">Time when maintenance takes place. To modify the time window, click the <span><img id="dcs-ug-0312016__image1265791212186" src="en-us_image_0000001572243777.png"></span> icon.</p>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.2.1.2.4.1.2 "><p id="dcs-ug-0312016__p106653018116">Time when maintenance takes place. To modify the time window, click the <span><img id="dcs-ug-0312016__image181473715393" src="en-us_image_0000001572243777.png"></span> icon.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="dcs-ug-0312016__row75414413312"><td class="cellrowborder" rowspan="3" valign="top" width="15.663366336633663%" headers="mcps1.3.2.2.5.2.1.2.4.1.1 "><p id="dcs-ug-0312016__p1853010211831">Connection</p>
|
||||
@ -130,7 +130,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p id="dcs-ug-0312016__p131281812353"></p>
|
||||
</p></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user