DCS UMN 20230811 version

Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
This commit is contained in:
Chen, Junjie 2024-01-24 14:13:13 +00:00 committed by zuul
parent c992ff71da
commit 748ac2c008
146 changed files with 8483 additions and 2003 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<a name="CacheCluster"></a><a name="CacheCluster"></a>
<h1 class="topictitle1">Proxy Cluster Redis</h1>
<div id="body1600250975360"><p id="CacheCluster__p1691110491160">DCS for Redis provides Proxy Cluster instances, which use Linux Virtual Server (LVS) and proxies to achieve high availability.</p>
<p id="CacheCluster__p13103105219146">Proxy Cluster DCS Redis instances are compatible with Redis 3.0.</p>
<div id="body1600250975360"><p id="CacheCluster__p1691110491160">DCS for Redis provides Proxy Cluster instances, which use Linux Virtual Server (LVS) and proxies to achieve high availability. Proxy Cluster instances have the following features:</p>
<ul id="CacheCluster__ul1265853801012"><li id="CacheCluster__li365893819101">The client is decoupled from the cloud service.</li><li id="CacheCluster__li565815388101">They support millions of concurrent requests, equivalent to Redis Cluster instances.</li><li id="CacheCluster__li465893811014">A wide range of memory specifications adapt to different scenarios.</li></ul>
<div class="note" id="CacheCluster__note134811721192210"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="CacheCluster__ul1758133822318"><li id="CacheCluster__li758133852319">A Proxy Cluster instance can be connected in the same way that a single-node or master/standby instance is connected, without any special settings on the client. You can use the IP address of the instance, and do not need to know or use the proxy or shard addresses.</li></ul>
</div></div>
<div class="section" id="CacheCluster__section861823615325"><h4 class="sectiontitle">Proxy Cluster DCS Redis 3.0 Instances</h4><p id="CacheCluster__p10878151913448">Proxy Cluster DCS Redis 3.0 instances are compatible with <a href="https://github.com/CodisLabs/codis" target="_blank" rel="noopener noreferrer">codis</a>. The specifications range from 64 GB to 1024 GB, meeting requirements for <strong id="CacheCluster__b13211893475612">millions of concurrent connections</strong> and <strong id="CacheCluster__b45541541375612">massive data cache</strong>. Distributed data storage and access is implemented by DCS, without requiring development or maintenance.</p>
@ -53,7 +53,7 @@
<div class="note" id="CacheCluster__note04501339113"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheCluster__p124516392019">For intra-VPC access, the client and the instance must be in the same VPC with specified security group rule configurations.</p>
<p id="CacheCluster__p14803202620398">For details, see <a href="en-us_topic_0090662012.html">Security Group Configurations</a>.</p>
</div></div>
</li><li id="CacheCluster__li017927194718"><strong id="CacheCluster__b151362176475612">Application</strong><p id="CacheCluster__p36064574817">The client used to access the instance.</p>
</li><li id="CacheCluster__li017927194718"><strong id="CacheCluster__b208691611164716">Application</strong><p id="CacheCluster__p36064574817">The client used to access the instance.</p>
<p id="CacheCluster__p19314439510">DCS Redis instances 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="CacheCluster__li2171327154716"><strong id="CacheCluster__b1643674835519">LB-M/LB-S</strong><p id="CacheCluster__p170153810483">The load balancers, which are deployed in master/standby HA mode. The connection addresses (<strong id="CacheCluster__b28415079775612">IP address:Port</strong>) of the cluster DCS Redis instance are the addresses of the load balancers.</p>
</li><li id="CacheCluster__li81722784711"><strong id="CacheCluster__b7800450165513">Proxy</strong><p id="CacheCluster__p828195918488">The proxy server used to achieve high availability and process high-concurrency client requests.</p>

View File

@ -7,7 +7,8 @@
<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>
<ol id="CacheMasterSlave__ol12655131412"><li id="CacheMasterSlave__li191795312365"><strong id="CacheMasterSlave__b8393084757579">Data persistence and high reliability</strong><p id="CacheMasterSlave__p143153293617">By default, data persistence is enabled by both the master and the standby node of a master/standby instance.</p>
<p id="CacheMasterSlave__p992216915351">The standby node of a DCS Redis instance is invisible to you. Only the master node provides data read/write operations.</p>
<p id="CacheMasterSlave__p992216915351">The standby node of a DCS Redis 3.0 instance is invisible to you. Only the master node provides data read/write operations.</p>
<p id="CacheMasterSlave__p12791953131916">The standby node of a Redis 4.0/5.0/6.0 instance is visible to you. You can read data from the standby node by connecting to it using the instance read-only address.</p>
</li><li id="CacheMasterSlave__li10688192120301"><strong id="CacheMasterSlave__b6852014317">Data synchronization</strong><p id="CacheMasterSlave__p2581425163010">Data in the master and standby nodes is kept consistent through incremental synchronization.</p>
<div class="note" id="CacheMasterSlave__note1745795093018"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p6458135018301">After recovering from a network exception or node fault, master/standby instances perform a full synchronization to ensure data consistency.</p>
</div></div>
@ -29,11 +30,15 @@
<p id="CacheMasterSlave__p828195918488">DCS Redis 3.0 instances are accessed through port 6379 by default. Port customization is not supported.</p>
</li></ul>
</div>
<div class="section" id="CacheMasterSlave__section5805185095215"><h4 class="sectiontitle">Architecture of Master/Standby DCS Redis 4.0/5.0/6.0 Instances </h4><p id="CacheMasterSlave__p9460152115104">The following figure shows the architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance.</p>
<div class="fignone" id="CacheMasterSlave__fig16986121191016"><span class="figcap"><b>Figure 2 </b>Architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance</span><br><span><img class="eddx" id="CacheMasterSlave__image1598717119108" src="en-us_image_0000001478356482.png"></span></div>
<div class="section" id="CacheMasterSlave__section5805185095215"><a name="CacheMasterSlave__section5805185095215"></a><a name="section5805185095215"></a><h4 class="sectiontitle">Architecture of Master/Standby DCS Redis 4.0/5.0/6.0 Instances</h4><p id="CacheMasterSlave__p9460152115104">The following figure shows the architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance.</p>
<div class="fignone" id="CacheMasterSlave__fig174945301094"><span class="figcap"><b>Figure 2 </b>Architecture of a master/standby DCS Redis 4.0/5.0/6.0 instance</span><br><span><img class="eddx" id="CacheMasterSlave__image1040685511346" src="en-us_image_0000001528638365.png"></span></div>
<p id="CacheMasterSlave__p08712785615">Architecture description:</p>
<ol id="CacheMasterSlave__ol1898612288020"><li id="CacheMasterSlave__li121237313010">Master/standby DCS Redis 4.0/5.0/6.0 instances support Sentinels. Sentinels monitor the running status of the master and standby nodes. If the master node becomes faulty, a failover will be performed.<p id="CacheMasterSlave__p137811591512"><a name="CacheMasterSlave__li121237313010"></a><a name="li121237313010"></a>Sentinels are invisible to you and is used only in the service. </p>
<ol id="CacheMasterSlave__ol1898612288020"><li id="CacheMasterSlave__li693387115">Each master/standby DCS Redis 4.0/5.0/6.0 instance has two connection addresses. When connecting to such an instance, you can use the read/write domain name address to connect to the master node or use the read-only domain name address to connect to the standby node.<p id="CacheMasterSlave__p153591895112"><a name="CacheMasterSlave__li693387115"></a><a name="li693387115"></a>The connection addresses can be obtained on the instance details page on the DCS console.</p>
</li><li id="CacheMasterSlave__li121237313010">Master/standby DCS Redis 4.0/5.0/6.0 instances support Sentinels. Sentinels monitor the running status of the master and standby nodes. If the master node becomes faulty, a failover will be performed.<p id="CacheMasterSlave__p137811591512"><a name="CacheMasterSlave__li121237313010"></a><a name="li121237313010"></a>Sentinels are invisible to you and is used only in the service. </p>
</li><li id="CacheMasterSlave__li18916171615119">A standby node has the same specifications as a master node. A master/standby instance consists of a pair of master and standby nodes by default.</li><li id="CacheMasterSlave__li1236204215435">To access a DCS Redis 4.0/5.0/6.0 instance, you can customize the port. If no port is specified, the default port 6379 will be used. In the architecture diagram, port 6379 is used. If you have customized a port, replace <strong id="CacheMasterSlave__b116713868943641">6379</strong> with the actual port.</li></ol>
<div class="note" id="CacheMasterSlave__note1291809114711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CacheMasterSlave__p5974816314">To implement read/write splitting using a master/standby instance, 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>
<p id="CacheMasterSlave__p691817934713"><strong id="CacheMasterSlave__b86651730122714">Requests to the read-only domain name address may fail if the standby node of a master/standby DCS Redis 4.0/5.0</strong><strong id="CacheMasterSlave__b176668302272">/6.0</strong><strong id="CacheMasterSlave__b36667302276"> instance is faulty. For higher reliability and lower latency, do not use the read-only address.</strong></p>
</div></div>
</div>
</div>
<div>

View File

@ -1,11 +1,11 @@
<a name="CacheProxy"></a><a name="CacheProxy"></a>
<h1 class="topictitle1">Redis Cluster</h1>
<div id="body1600250976541"><p id="CacheProxy__p4126104312716">Redis Cluster DCS instances use the native distributed implementation of Redis.</p>
<p id="CacheProxy__p7253192101916">Redis Cluster DCS instances are compatible with Redis 4.0 and 5.0.</p>
<div id="body1600250976541"><p id="CacheProxy__p4126104312716">Redis Cluster DCS instances use the native distributed implementation of Redis. Redis Cluster instances have the following features:</p>
<ul id="CacheProxy__ul1964019348598"><li id="CacheProxy__li14640193411596">They are compatible with native Redis clusters.</li><li id="CacheProxy__li1364018348592">They inherit the smart client design from Redis.</li><li id="CacheProxy__li864073411598">They deliver many times higher performance than master/standby instances.</li></ul>
<div class="section" id="CacheProxy__section880163191618"><h4 class="sectiontitle">Redis Cluster</h4><p id="CacheProxy__p1977021012338">The Redis Cluster instance type provided by DCS is compatible with the <a href="https://redis.io/topics/cluster-spec" target="_blank" rel="noopener noreferrer">native Redis Cluster</a>, which uses smart clients and a distributed architecture to perform sharding.</p>
<p id="CacheProxy__p164954315218"><a href="#CacheProxy__table3552324111">Table 1</a> lists the shard specification for different instance specifications.</p>
<p id="CacheProxy__p17223016111"><strong id="CacheProxy__b846424631919">Size of a shard = Instance specification/Number of shards</strong>. For example, if a 48 GB instance has 6 shards, the size of each shard is 48 GB/6 = 8 GB.</p>
<p id="CacheProxy__p17223016111"><strong id="CacheProxy__b1157017616611">Size of a shard = Instance specification/Number of shards</strong>. For example, if a 48 GB instance has 6 shards, the size of each shard is 48 GB/6 = 8 GB.</p>
<div class="tablenoborder"><a name="CacheProxy__table3552324111"></a><a name="table3552324111"></a><table cellpadding="4" cellspacing="0" summary="" id="CacheProxy__table3552324111" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Specifications of Redis Cluster DCS instances</caption><thead align="left"><tr id="CacheProxy__row65521623113"><th align="left" class="cellrowborder" valign="top" width="44.12%" id="mcps1.3.3.5.2.3.1.1"><p id="CacheProxy__p1955210211118">Total Memory</p>
</th>

View File

@ -16,10 +16,9 @@
<div class="fignone" id="GlobalDRPolicy__en-us_topic_0161126124_fig2046754742112"><span class="figcap"><b>Figure 5 </b>Cross-AZ deployment of a master/standby DCS instance</span><br><span><img class="vsd" id="GlobalDRPolicy__en-us_topic_0161126124_image1079294613241" src="en-us_image_0266235441.png"></span></div>
<div class="note" id="GlobalDRPolicy__en-us_topic_0161126124_note41824212218"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="GlobalDRPolicy__en-us_topic_0161126124_p17181423225">This mechanism applies in a similar way to a cluster DCS instance. Each shard (process) is deployed across AZs.</p>
</div></div>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p1333015655118">When creating a master/standby or cluster DCS instance, select a standby AZ that is different from the primary AZ. See the following figure.</p>
<p id="GlobalDRPolicy__en-us_topic_0161126124_p1333015655118">When creating a master/standby or cluster DCS instance, select a standby AZ that is different from the primary AZ.</p>
<div class="fignone" id="GlobalDRPolicy__fig595045613515"><span class="figcap"><b>Figure 6 </b>Selecting different AZs</span><br><span><img id="GlobalDRPolicy__image149501556173516" src="en-us_image_0000001536314713.png"></span></div>
<p id="GlobalDRPolicy__p1110819147496">Backup, configuration modification, and password change functions cannot be used during the fault.</p>
<div class="note" id="GlobalDRPolicy__note58555412312"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="GlobalDRPolicy__p28555410310">You can deploy your application across AZs to ensure both data reliability and service availability in the event of power supply or network disruptions.</p>
<div class="note" id="GlobalDRPolicy__note58555412312"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="GlobalDRPolicy__ul103873167571"><li id="GlobalDRPolicy__li15388141615577">You can deploy your application across AZs to ensure both data reliability and service availability in the event of power supply or network disruptions.</li><li id="GlobalDRPolicy__li9388316115715">Cross-AZ instances do not support password changes, command renaming, and specification modification when an AZ is faulty.</li></ul>
</div></div>
</div>
</div>

View File

@ -47,7 +47,7 @@
</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_p16165906166">100,000 QPS per node</p>
</td>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__en-us_topic_0147231413_p95377435599">150,000 QPS per node</p>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__en-us_topic_0147231413_p95377435599">100,000 QPS per node</p>
</td>
</tr>
<tr id="RedisDifference__row4984193016516"><td class="cellrowborder" valign="top" width="9.919008099190082%" headers="mcps1.3.2.1.3.2.5.1.1 "><p id="RedisDifference__p1698415301518">Visualized data management</p>
@ -65,16 +65,7 @@
</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 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 and master/standby</p>
</td>
</tr>
<tr id="RedisDifference__en-us_topic_0147231413_row14584340310"><td class="cellrowborder" valign="top" width="9.919008099190082%" headers="mcps1.3.2.1.3.2.5.1.1 "><p id="RedisDifference__en-us_topic_0147231413_p258511410316">Instance total memory</p>
</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_p1058513418319">Ranges from 2 GB, 4 GB, 8 GB, to 1024 GB.</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_p1859119191714">Regular specifications range from 2 GB, 4 GB, 8 GB, to 1024 GB. Small specifications, such as 128 MB, 256 MB, 512 MB, and 1 GB, are also available for single-node and master/standby instances. </p>
</td>
<td class="cellrowborder" valign="top" width="27.577242275772424%" headers="mcps1.3.2.1.3.2.5.1.4 "><p id="RedisDifference__p8540131135314">2 GB, 4 GB, 8 GB, 16 GB, 32 GB, and 64 GB. Small specifications (128 MB, 256 MB, 512 MB, and 1 GB) are also supported.</p>
<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, Redis Cluster</p>
</td>
</tr>
<tr id="RedisDifference__en-us_topic_0147231413_row10764145318"><td class="cellrowborder" valign="top" width="9.919008099190082%" headers="mcps1.3.2.1.3.2.5.1.1 "><p id="RedisDifference__en-us_topic_0147231413_p1764134139">Scale-up or scale-down</p>

View File

@ -0,0 +1,42 @@
<a name="TagManagement"></a><a name="TagManagement"></a>
<h1 class="topictitle1">Managing Tags</h1>
<div id="body0000001131894511"><p id="TagManagement__p16892119416">Tags facilitate DCS instance identification and management.</p>
<p id="TagManagement__p164691516615">You can add tags to an instance when creating it or add, modify, or delete tags on the details page of a created instance. Each instance can have a maximum of 20 tags.</p>
<p id="TagManagement__p8060118">A tag consists of a tag key and a tag value. <a href="#TagManagement__table193611920984">Table 1</a> lists the tag key and value requirements.</p>
<div class="tablenoborder"><a name="TagManagement__table193611920984"></a><a name="table193611920984"></a><table cellpadding="4" cellspacing="0" summary="" id="TagManagement__table193611920984" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Tag key and value requirements</caption><thead align="left"><tr id="TagManagement__row143632201486"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.3.1.1"><p id="TagManagement__p536311201182">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.3.1.2"><p id="TagManagement__p63637201685">Requirement</p>
</th>
</tr>
</thead>
<tbody><tr id="TagManagement__row43636201815"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.3.1.1 "><p id="TagManagement__p336313201814">Tag key</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.3.1.2 "><ul id="TagManagement__ul133310231694"><li id="TagManagement__li833315236915">Cannot be left blank.</li><li id="TagManagement__li1733312319916">Must be unique for the same instance.</li><li id="TagManagement__li1933311235916">Cannot start or end with a space.</li><li id="TagManagement__li1224411393140">Consists of a maximum of 128 characters.</li><li id="TagManagement__li311385515110">Can contain letters of any language, digits, spaces, and special characters _.:=+-@</li><li id="TagManagement__li171771953164817">Cannot start with <strong id="TagManagement__b11385455314365">_sys_</strong>.</li></ul>
</td>
</tr>
<tr id="TagManagement__row193632201781"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.3.1.1 "><p id="TagManagement__p736315201282">Tag value</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.3.1.2 "><ul id="TagManagement__ul1216717306916"><li id="TagManagement__li16456151718178">Consists of a maximum of 255 characters.</li><li id="TagManagement__li72179264177">Can contain letters of any language, digits, spaces, and special characters _.:/=+-@</li><li id="TagManagement__li111671630290">Cannot start or end with a space.</li></ul>
</td>
</tr>
</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__image144339315587" src="en-us_image_0000001148443454.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__b1745220350597">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> &gt; <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>.<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>
<p id="TagManagement__p0455299528">You can also create new tags by entering <strong id="TagManagement__b45633910492">Tag key</strong> and <strong id="TagManagement__b1956916918495">Tag value</strong>.</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>
</li><li id="TagManagement__li5768114518406">Delete a tag<p id="TagManagement__p38252410120"><a name="TagManagement__li5768114518406"></a><a name="li5768114518406"></a>In the row containing the tag to be deleted, click <strong id="TagManagement__b10627355164911">Delete</strong> in the <strong id="TagManagement__b9633165511495">Operation</strong> column. Then click <strong id="TagManagement__b156339556495">Yes</strong>.</p>
</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-ug-0312022.html">Managing DCS Instances</a></div>
</div>
</div>

View File

@ -4,7 +4,7 @@
<div id="body8662426"><p id="cache-instance-password__en-us_topic_0157078204_p985222322411">Passwords can be configured to control access to your DCS instances, ensuring the security of your data.</p>
<div class="note" id="cache-instance-password__note5179111618488"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="cache-instance-password__p5419067515298">After 5 consecutive incorrect password attempts, the account for accessing the chosen DCS instance will be locked for 5 minutes. Passwords cannot be changed during the lockout period.</p>
<p id="cache-instance-password__p1537135716305">The password must meet the following requirements:</p>
<ul id="cache-instance-password__ul1537117578305"><li id="cache-instance-password__li8371195793011">Cannot be left blank.</li><li id="cache-instance-password__li57052386429">Cannot be the same as the old password.</li><li id="cache-instance-password__li18371185712308">Can contain 8 to 32 characters.</li><li id="cache-instance-password__li13371115743020">Must contain at least three of the following character types:<ul id="cache-instance-password__ul10371357103018"><li id="cache-instance-password__li437195713308">Lowercase letters</li><li id="cache-instance-password__li16371125703015">Uppercase letters</li><li id="cache-instance-password__li1737111574305">Digits</li><li id="cache-instance-password__li113711573309">special characters (`~!@#$^&amp;*()-_=+\|{}:,&lt;.&gt;/?)</li></ul>
<ul id="cache-instance-password__ul1537117578305"><li id="cache-instance-password__li8371195793011">Cannot be left blank.</li><li id="cache-instance-password__li57052386429">Cannot be the same as the old password.</li><li id="cache-instance-password__li18371185712308">Can contain 8 to 32 characters.</li><li id="cache-instance-password__li13371115743020">Must contain at least three of the following character types:<ul id="cache-instance-password__ul10371357103018"><li id="cache-instance-password__li437195713308">Lowercase letters</li><li id="cache-instance-password__li16371125703015">Uppercase letters</li><li id="cache-instance-password__li1737111574305">Digits</li><li id="cache-instance-password__li113711573309">Special characters (`~!@#$^&amp;*()-_=+\|{},&lt;.&gt;/?)</li></ul>
</li></ul>
</div></div>
<div class="section" id="cache-instance-password__en-us_topic_0157078204_section4863101016391"><h4 class="sectiontitle">Using Passwords Securely</h4><ol id="cache-instance-password__en-us_topic_0157078204_ol2887434144012"><li id="cache-instance-password__en-us_topic_0157078204_li38871534174016">Hide the password when using redis-cli.<p id="cache-instance-password__en-us_topic_0157078204_p188144904012"><a name="cache-instance-password__en-us_topic_0157078204_li38871534174016"></a><a name="en-us_topic_0157078204_li38871534174016"></a>If the <strong id="cache-instance-password__en-us_topic_0157078204_b188123233553">-a &lt;password&gt;</strong> option is used in redis-cli in Linux, the password is prone to leakage because it is logged and kept in the history. You are advised not to use <strong id="cache-instance-password__b266115341594">-a &lt;password&gt;</strong> when running commands in redis-cli. After connecting to Redis, run the <strong id="cache-instance-password__b136618340913">auth</strong> command to complete authentication as shown in the following example:</p>

View File

@ -0,0 +1,18 @@
<a name="dcs-faq-022025"></a><a name="dcs-faq-022025"></a>
<h1 class="topictitle1">Should I Use a Domain Name or an IP Address to Connect to a DCS Redis Instance?</h1>
<div id="body8662426"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul89122251302"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013">Single-node and Proxy Cluster:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p6197182914019"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li1791232514013"></a><a name="en-us_topic_0000001384917470_li1791232514013"></a>Each instance has only one IP address and one domain name address. The addresses remain unchanged before and after master/standby switchover. You can use either address to connect to the instance.</p>
</li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li1591315257017">Master/standby:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p146226296134"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li1591315257017"></a><a name="en-us_topic_0000001384917470_li1591315257017"></a>Each instance has one IP address and two domain name addresses. One of the domain name addresses is used only for processing read requests. The addresses remain unchanged after master/standby switchover. You can use any address to connect to the instance.</p>
<p id="dcs-faq-022025__en-us_topic_0000001384917470_p962218293137">When you use a domain name address, distinguish between read and write requests. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b10918133171317">Connection Address</strong> or <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b13759750111320">IP Address</strong>, functions are not affected. If you use <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b32901621131411">Read-only Address</strong>, only read requests are processed.</p>
</li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li19131252011">Redis Cluster:<p id="dcs-faq-022025__en-us_topic_0000001384917470_p36421369014"><a name="dcs-faq-022025__en-us_topic_0000001384917470_li19131252011"></a><a name="en-us_topic_0000001384917470_li19131252011"></a>A Redis Cluster instance has multiple pairs of master and replica IP addresses and one domain name address. You can use any address to connect to the instance.</p>
<p id="dcs-faq-022025__en-us_topic_0000001384917470_p1351193812014">The connected node sends requests to the correct node. All nodes in the cluster can receive requests. <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b11191691310">Configure multiple or all IP addresses</strong> to prevent single points of failure.</p>
</li></ul>
<div class="note" id="dcs-faq-022025__en-us_topic_0000001384917470_note73804252286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-faq-022025__en-us_topic_0000001384917470_ul238318197019"><li id="dcs-faq-022025__en-us_topic_0000001384917470_li938310191402">Domain names cannot be resolved across regions. If the client and the DCS Redis instance are not in the same region, the instance cannot be accessed using its domain name address. You can manually map the domain name to the IP address in the <strong id="dcs-faq-022025__en-us_topic_0000001384917470_b195681294755139">hosts</strong> file or access the instance using its IP address. </li><li id="dcs-faq-022025__en-us_topic_0000001384917470_li738417192013">For details about how to connect to an instance, see <a href="dcs-ug-0916002.html">Accessing an Instance</a>.</li></ul>
</div></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326020.html">Client and Network Connection</a></div>
</div>
</div>

View File

@ -20,7 +20,7 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0326024.html">Data Backup, Export, and Migration</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></strong><br>
<li class="ulchildlink"><strong><a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-191204001.html">Master/Standby Switchover</a></strong><br>
</li>

View File

@ -32,6 +32,12 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210721003.html">What Can I Do If Error "Cannot assign requested address" Is Returned When I Access Redis Using connect?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-211230001.html">Connection Pool Selection and Recommended Jedis Parameter Settings</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-022025.html">Should I Use a Domain Name or an IP Address to Connect to a DCS Redis Instance?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-221222.html">Is the Read-only Address of a Master/Standby Instance Connected to the Master or Standby Node?</a></strong><br>
</li>
</ul>
<div class="familylinks">

View File

@ -44,6 +44,8 @@
</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-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>
</ul>

View File

@ -14,10 +14,32 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-220317.html">Can I Migrate Data to Multiple Target Instances in One Migration Task?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210721001.html">How Do I Enable the SYNC and PSYNC Commands?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210721002.html">Why Does Migration Task Creation Fail?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-11185.html">Will the Same Keys Be Overwritten During Data Migration or Backup Import?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-090626001.html">Online Migration with Rump</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312016.html">What Should I Consider When Transferring or Operating Data Between Different OSs?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312017.html">Can I Migrate Data from a Multi-DB Source Redis Instance to a Cluster DCS Redis Instance?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312018.html">How Can I Migrate Partial Data?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312019.html">What Are the Constraints and Precautions for Migrating Redis Data to a Cluster Instance?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312020.html">What Should I Consider for Online Migration?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312021.html">Can I Perform Online Migration Without Any Service Interruption?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-211125001.html">What If "Disconnecting timedout slave" and "overcoming of output buffer limits" Are Reported on the Source Instance During Online Migration?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0427076.html">Why Is Memory of a DCS Redis Instance Unchanged After Data Migration Using Rump, Even If No Error Message Is Returned?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0715005.html">Can I Migrate Data from a Lower Redis Version to a Higher One?</a></strong><br>
</li>
</ul>
<div class="familylinks">

View File

@ -8,7 +8,7 @@
</div>
</div>
<div class="section" id="dcs-faq-0427070__en-us_topic_0000001152024136_section108331358191915"><h4 class="sectiontitle">Viewing or Modifying the Maximum Connections of an Instance</h4><p id="dcs-faq-0427070__en-us_topic_0000001152024136_p468215206202">When creating an instance on the console, you can view the default maximum number of connections and the limit that can be configured.</p>
<p id="dcs-faq-0427070__en-us_topic_0000001152024136_p624072363315">After an instance is created, you can view or change the value of <strong id="dcs-faq-0427070__en-us_topic_0000001152024136_b11239923183317">maxclients</strong> (the maximum number of connections) on the <strong id="dcs-faq-0427070__b2086918457373">Parameters</strong> page of the DCS console. (This parameter cannot be modified for Proxy Cluster instances.)</p>
<p id="dcs-faq-0427070__en-us_topic_0000001152024136_p624072363315">After an instance is created, you can view or change the value of <strong id="dcs-faq-0427070__en-us_topic_0000001152024136_b11239923183317">maxclients</strong> (the maximum number of connections) on the <strong id="dcs-faq-0427070__b7872434121817">Instance Configuration</strong> &gt; <strong id="dcs-faq-0427070__b2086918457373">Parameters</strong> page of the DCS console. (This parameter cannot be modified for Proxy Cluster instances.)</p>
</div>
</div>
<div>

View File

@ -0,0 +1,13 @@
<a name="dcs-faq-0427076"></a><a name="dcs-faq-0427076"></a>
<h1 class="topictitle1">Why Is Memory of a DCS Redis Instance Unchanged After Data Migration Using Rump, Even If No Error Message Is Returned?</h1>
<div id="body8662426"><p id="dcs-faq-0427076__dcs-faq-0427076_0_en-us_topic_0000001152183930_p1527712221195">For details on how to use Rump, see the <a href="dcs-migration-230313.html">Data Migration Guide</a>.</p>
<p id="dcs-faq-0427076__dcs-faq-0427076_0_en-us_topic_0000001152183930_p16747133617163">Possible causes:</p>
<ul id="dcs-faq-0427076__dcs-faq-0427076_0_en-us_topic_0000001152183930_ul1653616118188"><li id="dcs-faq-0427076__dcs-faq-0427076_0_en-us_topic_0000001152183930_li7536181112184">Rump does not support migration to cluster DCS instances.</li><li id="dcs-faq-0427076__dcs-faq-0427076_0_en-us_topic_0000001152183930_li35361511121815">Commands are incorrectly run in Rump.</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326024.html">Data Backup, Export, and Migration</a></div>
</div>
</div>

View File

@ -26,8 +26,8 @@
<td class="cellrowborder" valign="top" width="13.16131613161316%" headers="mcps1.3.2.1.7.1.4 "><p id="dcs-faq-0513001__en-us_topic_0000001152183968_p911211362367">0200%</p>
</td>
<td class="cellrowborder" valign="top" width="21.782178217821784%" headers="mcps1.3.2.1.7.1.5 "><p id="dcs-faq-0513001__en-us_topic_0000001152183968_p32179217504">Monitored object:</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p1721716225014">Master/standby DCS Redis 4.0 or 5.0 instances</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p112176213507">Redis Server of Redis Cluster DCS Redis 4.0 or 5.0 instance</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p1721716225014">Redis 4.0 and later</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p112176213507">Redis Server of a master/standby or cluster instance</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p1321782175018">Dimension:</p>
<p id="dcs-faq-0513001__en-us_topic_0000001152183968_p1521772185016">dcs_cluster_node</p>
</td>

View File

@ -11,7 +11,7 @@
<tbody><tr id="dcs-faq-0521003__en-us_topic_0000001233623890_row9535101618175"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.1.1.3.1.1 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p115352016141716">Big key</p>
</td>
<td class="cellrowborder" valign="top" width="79.51%" headers="mcps1.3.1.1.3.1.2 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p1346816261178">There are two types of big keys:</p>
<ul id="dcs-faq-0521003__en-us_topic_0000001233623890_ul11469122611716"><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li64692264172">Keys that have a large value, for example, a 10 MB String key, or a 100 MB Hash, List, or Set key (all elements combined). If the size of a single String key exceeds 10 KB, or if the size of all elements of a key combined exceeds 50 MB, the key is defined as a big key.</li><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li846917264173">Keys that have a large number of elements, for example, a Hash key that has 10,000 elements. If the number of elements in a key exceeds 5000, the key is defined as a big key.</li></ul>
<ul id="dcs-faq-0521003__en-us_topic_0000001233623890_ul11469122611716"><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li64692264172">Keys that have a large value. If the size of a single String key exceeds 10 KB, or if the size of all elements of a key combined exceeds 50 MB, the key is defined as a big key.</li><li id="dcs-faq-0521003__en-us_topic_0000001233623890_li846917264173">Keys that have a large number of elements. If the number of elements in a key exceeds 5000, the key is defined as a big key.</li></ul>
</td>
</tr>
<tr id="dcs-faq-0521003__en-us_topic_0000001233623890_row19535181616171"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.1.1.3.1.1 "><p id="dcs-faq-0521003__en-us_topic_0000001233623890_p4535016181713">Hot key</p>
@ -26,7 +26,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -54,7 +54,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -38,7 +38,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -11,7 +11,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -29,7 +29,7 @@
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis</a></div>
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">Can I Obtain the Addresses of the Nodes in a Cluster DCS Redis Instance?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730017__en-us_topic_0152099097_p1483584313321">Cluster DCS Redis 3.0 instances (Proxy Cluster type) are used in the same way that you use single-node or master/standby instances. You do not need to know the backend node addresses.</p>
<p id="dcs-faq-0730017__en-us_topic_0152099097_p1835134343213">For a cluster DCS Redis 4.0/5.0/ instance (Redis Cluster type), run the <strong id="dcs-faq-0730017__b16188355307">CLUSTER NODES</strong> command to obtain node addresses:</p>
<p id="dcs-faq-0730017__en-us_topic_0152099097_p1835134343213">For a cluster DCS Redis 4.0 or later instance (Redis Cluster type), run the <strong id="dcs-faq-0730017__b13346194916372">CLUSTER NODES</strong> command to obtain node addresses:</p>
<p id="dcs-faq-0730017__en-us_topic_0152099097_p64034338434"><strong id="dcs-faq-0730017__en-us_topic_0152099097_b1740393319431">redis-cli -h <em id="dcs-faq-0730017__en-us_topic_0152099097_i174031933184315">{redis_address}</em> -p <em id="dcs-faq-0730017__en-us_topic_0152099097_i44036333433">{redis_port}</em> -a <em id="dcs-faq-0730017__en-us_topic_0152099097_i184031833204314">{redis_password}</em> cluster nodes</strong></p>
<p id="dcs-faq-0730017__en-us_topic_0152099097_p12403163316433">In the output similar to the following, obtain the IP addresses and port numbers of all the master nodes.</p>
<p id="dcs-faq-0730017__en-us_topic_0152099097_p9149163917382"><span><img id="dcs-faq-0730017__en-us_topic_0152099097_image19820346211" src="en-us_image_0266316213.png"></span></p>

View File

@ -1,8 +1,8 @@
<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 0255).</p>
<p id="dcs-faq-0730019__en-us_topic_0152099097_p4242154222010">Cluster DCS instances do not support data read/write in multiple databases.</p>
<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 0255). 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">

View File

@ -1,13 +1,16 @@
<a name="dcs-faq-0730022"></a><a name="dcs-faq-0730022"></a>
<h1 class="topictitle1">What Is the Default Data Eviction Policy?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730022__en-us_topic_0152099097_p891453012313">Data is evicted from cache based on a user-defined space limit in order to make space for new data.</p>
<p id="dcs-faq-0730022__p28092072506">You can change the eviction policy by configuring the <strong id="dcs-faq-0730022__b1461933614396">maxmemory-policy</strong> parameter.</p>
<p id="dcs-faq-0730022__en-us_topic_0152099097_p24119933153714">When <strong id="dcs-faq-0730022__b9411301292">maxmemory</strong> is reached, you can select one of the following eight eviction policies:</p>
<div id="body1596093268950"><p id="dcs-faq-0730022__en-us_topic_0152099097_p891453012313">Data is evicted from cache based on a user-defined space limit in order to make space for new data. For details, see the <a href="https://redis.io/topics/lru-cache?spm=a2c4g.11186623.2.2.7a465a76HeE7QM" target="_blank" rel="noopener noreferrer">Redis official website</a>. You can <a href="#dcs-faq-0730022__section2022722111124">view or change the eviction policy</a> by configuring an instance parameter on the DCS console.</p>
<div class="section" id="dcs-faq-0730022__section16380812182515"><h4 class="sectiontitle">Eviction Policies Supported by DCS Redis Instances</h4><p id="dcs-faq-0730022__en-us_topic_0152099097_p24119933153714">When <strong id="dcs-faq-0730022__b9411301292">maxmemory</strong> is reached, you can select one of the following eight eviction policies:</p>
<ul id="dcs-faq-0730022__ul63511053153341"><li id="dcs-faq-0730022__li46713159155023"><strong id="dcs-faq-0730022__b148525218919">noeviction</strong>: When the memory limit is reached, DCS instances return errors to clients and no longer process write requests and other requests that could result in more memory to be used. However, <strong id="dcs-faq-0730022__b23887235114">DEL</strong> and a few more exception requests can continue to be processed.</li><li id="dcs-faq-0730022__li33146435153341"><strong id="dcs-faq-0730022__b12386224217">allkeys-lru</strong>: DCS instances try to evict the least recently used keys first, in order to make space for new data.</li><li id="dcs-faq-0730022__li62982494153346"><strong id="dcs-faq-0730022__b1523412252113">volatile-lru</strong>: DCS instances try to evict the least recently used keys with an expire set first, in order to make space for new data.</li><li id="dcs-faq-0730022__li61473187153348"><strong id="dcs-faq-0730022__b9967425718">allkeys-random</strong>: DCS instances recycle random keys so that new data can be stored.</li><li id="dcs-faq-0730022__li9870151153350"><strong id="dcs-faq-0730022__b15787152616119">volatile-random</strong>: DCS instances evict random keys with an expire set, in order to make space for new data.</li><li id="dcs-faq-0730022__li3073190415343"><strong id="dcs-faq-0730022__b989313618914">volatile-ttl</strong>: DCS instances evict keys with an expire set, and try to evict keys with a shorter time to live (TTL) first, in order to make space for new data.</li><li id="dcs-faq-0730022__li1918134611344"><strong id="dcs-faq-0730022__b188119815917">allkeys-lfu</strong>: DCS instances evict the least frequently used keys from all keys.</li><li id="dcs-faq-0730022__li188701956123617"><strong id="dcs-faq-0730022__b12439131113918">volatile-lfu</strong>: DCS instances evict the least frequently used keys with an <strong id="dcs-faq-0730022__b1944015111698">expire</strong> field from all keys.</li></ul>
<div class="note" id="dcs-faq-0730022__en-us_topic_0152099097_note33192730155638"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-0730022__en-us_topic_0152099097_p30299119155638">If no key can be recycled, <strong id="dcs-faq-0730022__b122631228518">volatile-lru</strong>, <strong id="dcs-faq-0730022__b626410282110">volatile-random</strong>, and <strong id="dcs-faq-0730022__b62641528915">volatile-ttl</strong> are the same as <strong id="dcs-faq-0730022__b1526417284111">noeviction</strong>. For details, see the description of <strong id="dcs-faq-0730022__b42649283119">noeviction</strong>.</p>
</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>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>

View File

@ -1,7 +1,7 @@
<a name="dcs-faq-0730026"></a><a name="dcs-faq-0730026"></a>
<h1 class="topictitle1">Can I Customize or Change the Port for Accessing a DCS Instance?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730026__p15703171835620">You cannot customize or change the port for accessing a DCS Redis 3.0 instance. You can customize (during instance creation) but cannot change the port for accessing a DCS Redis 4.0 or later instance.</p>
<div id="body1596093268950"><p id="dcs-faq-0730026__p15703171835620">You cannot customize or change the port for accessing a DCS Redis 3.0 instance. You can customize (during instance creation) and change the port (on the instance details page) for accessing a DCS Redis 4.0 or later instance.</p>
<ul id="dcs-faq-0730026__en-us_topic_0152099097_ul2099115517587"><li id="dcs-faq-0730026__en-us_topic_0152099097_li399125535811">Redis 3.0<p id="dcs-faq-0730026__en-us_topic_0152099097_p851518115910"><a name="dcs-faq-0730026__en-us_topic_0152099097_li399125535811"></a><a name="en-us_topic_0152099097_li399125535811"></a>Intra-VPC access: port 6379.</p>
</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>

View File

@ -5,9 +5,9 @@
<ul id="dcs-faq-0730036__ul5345182618333"><li id="dcs-faq-0730036__li1345132623311">Redis 3.0<p id="dcs-faq-0730036__p10964478357"><a name="dcs-faq-0730036__li1345132623311"></a><a name="li1345132623311"></a>Data of a DCS Redis 3.0 instance cannot be cleared on the console, and can only be cleared by the <strong id="dcs-faq-0730036__b689814018266">FLUSHDB</strong> or <strong id="dcs-faq-0730036__b3166163914269">FLUSHALL</strong> command in redis-cli.</p>
<p id="dcs-faq-0730036__p8472203333612">Run the <strong id="dcs-faq-0730036__b13145640878138">FLUSHALL</strong> command to clear all the data in the instance.</p>
<p id="dcs-faq-0730036__p647293333619">Run the <strong id="dcs-faq-0730036__b12348169898138">FLUSHDB</strong> command to clear the data in the currently selected DB.</p>
</li><li id="dcs-faq-0730036__li18813103819364">Redis 4.0/5.0/6.0<p id="dcs-faq-0730036__p1515135633616"><a name="dcs-faq-0730036__li18813103819364"></a><a name="li18813103819364"></a>To clear data of a DCS Redis 4.0/5.0/6.0 instance, you can run the <strong id="dcs-faq-0730036__b3485143010548">FLUSHDB</strong> or <strong id="dcs-faq-0730036__b124911430165419">FLUSHALL</strong> command in redis-cli, use the data clearing function on the DCS console, or run the <strong id="dcs-faq-0730036__b1676102514715">FLUSHDB</strong> command on Web CLI.</p>
</li><li id="dcs-faq-0730036__li18813103819364">Redis 4.0 and later<p id="dcs-faq-0730036__p1515135633616"><a name="dcs-faq-0730036__li18813103819364"></a><a name="li18813103819364"></a>To clear data of a DCS Redis 4.0 and later instance, you can run the <strong id="dcs-faq-0730036__b3485143010548">FLUSHDB</strong> or <strong id="dcs-faq-0730036__b124911430165419">FLUSHALL</strong> command in redis-cli, use the data clearing function on the DCS console, or run the <strong id="dcs-faq-0730036__b1676102514715">FLUSHDB</strong> command on Web CLI.</p>
<p id="dcs-faq-0730036__p963916114382">To clear data of a Redis Cluster instance, run the <strong id="dcs-faq-0730036__b9521924153015">FLUSHDB</strong> or <strong id="dcs-faq-0730036__b431212296307">FLUSHALL</strong> command on every shard of the instance. Otherwise, data may not be completely cleared.</p>
<div class="note" id="dcs-faq-0730036__note168212515318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-faq-0730036__ul191791322143115"><li id="dcs-faq-0730036__li111791022143119">Currently, only DCS Redis 4.0 and later instances support data clearing by using the DCS console and by running the <strong id="dcs-faq-0730036__b263057135217">FLUSHDB</strong> command on Web CLI.</li><li id="dcs-faq-0730036__li13479118163312">When you run the <strong id="dcs-faq-0730036__b17668192510264">FLUSHDB</strong> command on Web CLI, only one shard is cleared at a time. If there are multiple shards, connect to and run the <strong id="dcs-faq-0730036__b16265133815350">FLUSHDB</strong> command on each master node.</li><li id="dcs-faq-0730036__li1079819242316">Redis Cluster data cannot be cleared by using Web CLI.</li></ul>
<div class="note" id="dcs-faq-0730036__note168212515318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dcs-faq-0730036__ul191791322143115"><li id="dcs-faq-0730036__li111791022143119">Currently, only DCS Redis 4.0 and later instances support data clearing by using the DCS console and by running the <strong id="dcs-faq-0730036__b263057135217">FLUSHDB</strong> command on Web CLI.</li><li id="dcs-faq-0730036__li13479118163312">When you run the <strong id="dcs-faq-0730036__b1741316535415">FLUSHDB</strong> command on Web CLI, only one shard is cleared at a time. If there are multiple shards, connect to the master node of each shard and run the <strong id="dcs-faq-0730036__b174141653154116">FLUSHDB</strong> command separately.</li><li id="dcs-faq-0730036__li1079819242316">Redis Cluster data cannot be cleared by using Web CLI.</li></ul>
</div></div>
</li></ul>
</div>

View File

@ -6,7 +6,7 @@
</li><li id="dcs-faq-0730047__dcs-ug-0326011_li132021415183315">Cluster<ul id="dcs-faq-0730047__dcs-ug-0326011_ul1898119586379"><li id="dcs-faq-0730047__dcs-ug-0326011_li1417512631512">If the shard quantity is not decreased, the instance can always be connected, but the CPU usage will increase, compromising performance by up to 20%, and the latency will increase during data migration.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li126231345133715">During scaling up, new Redis Server nodes are added, and data is automatically balanced to the new nodes.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li77729516162">Nodes will be deleted if the shard quantity decreases. To prevent disconnection, ensure that the deleted nodes are not directly referenced in your application.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li6114126161817">Ensure that the used memory of each node is less than 70% of the maximum memory per node of the new flavor. Otherwise, you cannot perform the scale-in.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li64187064519">If the memory becomes full during scaling due to a large amount of data being written, scaling will fail. Modify specifications during off-peak hours.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li1963862124517">Scaling involves data migration. The latency for accessing the key being migrated increases. For a Redis Cluster instance, ensure that the client can properly process the <strong id="dcs-faq-0730047__dcs-ug-0326011_b151867513115">MOVED</strong> and <strong id="dcs-faq-0730047__dcs-ug-0326011_b6644135219116">ASK</strong> commands. Otherwise, requests will fail.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li75521747164618">Before scaling, perform cache analysis to ensure that no big keys (≥ 512 MB) exist in the instance. Otherwise, scaling may fail.</li><li id="dcs-faq-0730047__dcs-ug-0326011_li766133173811">Backup records created before scaling cannot be restored.</li></ul>
</li></ul>
</li></ul>
<ul id="dcs-faq-0730047__ul2889344155714"><li id="dcs-faq-0730047__li1332219598417"><strong id="dcs-faq-0730047__dcs-ug-0326011_b6842205425117">Notes on changing the number of replicas of a DCS Redis 4.0 or 5.0 instance:</strong><p id="dcs-faq-0730047__dcs-ug-0326011_p63371629113112">Deleting replicas interrupts connections. If your application cannot reconnect to Redis or handle exceptions, you need to restart the application after scaling.</p>
<ul id="dcs-faq-0730047__ul2889344155714"><li id="dcs-faq-0730047__li1332219598417"><strong id="dcs-faq-0730047__dcs-ug-0326011_b6842205425117">Notes on changing the number of replicas of a DCS Redis instance:</strong><p id="dcs-faq-0730047__dcs-ug-0326011_p63371629113112">Deleting replicas interrupts connections. If your application cannot reconnect to Redis or handle exceptions, you need to restart the application after scaling.</p>
</li></ul>
</div>
<div>

View File

@ -1,8 +1,9 @@
<a name="dcs-faq-0730048"></a><a name="dcs-faq-0730048"></a>
<h1 class="topictitle1">Why Can't I Modify Specifications for a DCS Redis Instance?</h1>
<div id="body1596093494759"><p id="dcs-faq-0730048__en-us_topic_0152504023_p6571154112169">Specifications of a DCS instance cannot be modified if another task of the instance is still running. For example, you cannot delete or scale up an instance while it is being restarted. Likewise, you cannot delete an instance while it is being scaled up.</p>
<p id="dcs-faq-0730048__en-us_topic_0152504023_p101951774193">If the specification modification fails, try again later. If it fails again, contact technical support.</p>
<div id="body1596093494759"><ul id="dcs-faq-0730048__ul1134554105015"><li id="dcs-faq-0730048__li587013122410">Check whether other tasks are running.<p id="dcs-faq-0730048__p19144629646"><a name="dcs-faq-0730048__li587013122410"></a><a name="li587013122410"></a>Specifications of a DCS instance cannot be modified if another task of the instance is still running. For example, you cannot delete or scale up an instance while it is being restarted. Likewise, you cannot delete an instance while it is being scaled up.</p>
<p id="dcs-faq-0730048__p88908143583">If the specification modification fails, try again later. If it fails again, contact technical support.</p>
</li><li id="dcs-faq-0730048__li93277192581">Modify instance specifications during off-peak hours. If the modification failed in peak hours (for example, when memory or CPU usage is over 90% or write traffic surges), try again during off-peak hours.</li></ul>
</div>
<div>
<div class="familylinks">

View File

@ -3,7 +3,7 @@
<h1 class="topictitle1">Can I Export Backup Data of DCS Redis Instances to RDB Files Using the Console?</h1>
<div id="body1596093777162"><ul id="dcs-faq-0730054__ul529275204312"><li id="dcs-faq-0730054__li8293125224314">Redis 3.0<p id="dcs-faq-0730054__p16229175411211"><a name="dcs-faq-0730054__li8293125224314"></a><a name="li8293125224314"></a>No. On the console, backup data of a DCS Redis 3.0 instance can be exported only to AOF files. To export data to RDB files, run the following command in redis-cli:</p>
<p id="dcs-faq-0730054__p104694614429"><strong id="dcs-faq-0730054__b8468467424">redis-cli -h <em id="dcs-faq-0730054__i1551113114572">{redis_address}</em> -p 6379 [-a <em id="dcs-faq-0730054__i1744435711585">password</em>] --rdb {output.rdb}</strong></p>
</li><li id="dcs-faq-0730054__li711514111449">Redis 4.0/5.0/6.0<p id="dcs-faq-0730054__p1138991224411"><a name="dcs-faq-0730054__li711514111449"></a><a name="li711514111449"></a>Yes. DCS Redis 4.0/5.0/6.0 instances support AOF and RDB persistence. You can back up data to RDB and AOF files on the console and download the files.</p>
</li><li id="dcs-faq-0730054__li711514111449">Redis 4.0 and later<p id="dcs-faq-0730054__p1138991224411"><a name="dcs-faq-0730054__li711514111449"></a><a name="li711514111449"></a>Yes. DCS Redis 4.0 and later instances support AOF and RDB persistence. You can back up data to RDB and AOF files on the console and download the files.</p>
</li></ul>
</div>
<div>

View File

@ -3,7 +3,8 @@
<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></ul>
</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 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>
</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>
</div>
<div>

View File

@ -1,6 +1,6 @@
<a name="dcs-faq-0805001"></a><a name="dcs-faq-0805001"></a>
<h1 class="topictitle1">Big/Hot Key Analysis</h1>
<h1 class="topictitle1">Big/Hot Key Analysis and Expired Key Scan</h1>
<div id="body0000001430346089"></div>
<div>
<ul class="ullinks">
@ -14,6 +14,10 @@
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-0606002.html">How Do I Detect Big Keys and Hot Keys in Advance?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210531002.html">How Does DCS Delete Expired Keys?</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-faq-210812001.html">How Long Are Keys Stored? How Do I Set Key Expiration?</a></strong><br>
</li>
</ul>
<div class="familylinks">

View File

@ -0,0 +1,18 @@
<a name="dcs-faq-210531002"></a><a name="dcs-faq-210531002"></a>
<h1 class="topictitle1">How Does DCS Delete Expired Keys?</h1>
<div id="body8662426"><div class="section" id="dcs-faq-210531002__en-us_topic_0000001152183926_section18377173215616"><h4 class="sectiontitle">Question</h4><p id="dcs-faq-210531002__en-us_topic_0000001152183926_p539219381619">What are the rules for scheduled deletion of expired keys on a daily basis? Can I customize the rules?</p>
</div>
<div class="section" id="dcs-faq-210531002__en-us_topic_0000001152183926_section18589187786"><h4 class="sectiontitle">Mechanisms for Deleting Expired Keys</h4><ul id="dcs-faq-210531002__en-us_topic_0000001152183926_ul676111019109"><li id="dcs-faq-210531002__en-us_topic_0000001152183926_li6761510131013">Lazy free deletion: The deletion strategy is controlled in the main I/O event loop. Before a read/write command is executed, a function is called to check whether the key to be accessed has expired. If it has expired, it will be deleted and a response will be returned indicating that the key does not exist. If the key has not expired, the command execution resumes.</li><li id="dcs-faq-210531002__en-us_topic_0000001152183926_li96351711151010">Scheduled deletion: A time event function is executed at certain intervals. Each time the function is executed, a random collection of keys are checked, and expired keys are deleted.<div class="note" id="dcs-faq-210531002__en-us_topic_0000001152183926_note184694333100"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-210531002__en-us_topic_0000001152183926_p346953315107">To avoid prolonged blocks on the Redis main thread, not all keys are checked in each time event. Instead, a random collection of keys are checked each time. As a result, the memory used by expired keys cannot be released quickly.</p>
</div></div>
</li></ul>
</div>
<div class="section" id="dcs-faq-210531002__en-us_topic_0000001152183926_section454735651113"><h4 class="sectiontitle">Solutions</h4><ul id="dcs-faq-210531002__en-us_topic_0000001152183926_ul9145171671310"><li id="dcs-faq-210531002__en-us_topic_0000001152183926_li1948913317134">Configure scheduled hot key analysis tasks by referring to <a href="dcs-ug-190808001.html#dcs-ug-190808001__section47852016145218">Hot Key Analysis</a>, or use the <strong id="dcs-faq-210531002__en-us_topic_0000001152183926_b1067355655613">SCAN</strong> command to traverse all keys on a scheduled basis and remove expired keys from the memory.</li><li id="dcs-faq-210531002__en-us_topic_0000001152183926_li19583910191613">Configure a scheduled task to scan all master nodes of the instance. All keys will be scanned, and Redis will determine whether the keys have expired. Expired keys will be released. For details, see <a href="dcs-ug-210330002.html">Scanning Expired Keys</a>.</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -0,0 +1,13 @@
<a name="dcs-faq-210721001"></a><a name="dcs-faq-210721001"></a>
<h1 class="topictitle1">How Do I Enable the SYNC and PSYNC Commands?</h1>
<div id="body8662426"><ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1666918584815"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li1466916586812">Migration within DCS:<ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul1472135412128"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li69200418467">By default, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b127652727655526">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b19178583755526">PSYNC</strong> commands can be used when self-hosted Redis is migrated to DCS.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li14623145012123">During online migration between DCS Redis instances in the same region under the same account, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b167198299220">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b772013299226">PSYNC</strong> commands are automatically enabled.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li20191657171219">During online migration between DCS Redis instances in different regions or under different accounts within a region, the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b165486245055526">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b90855318855526">PSYNC</strong> commands are not automatically enabled, and online migration cannot be used. You can migrate data using backup files.</li></ul>
</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li103531442997">Migration from other cloud vendors to DCS:<ul id="dcs-faq-210721001__en-us_topic_0000001152024126_ul54348203145"><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li14143216171411">Generally, cloud vendors disable the <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b10319177112310">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b532057162317">PSYNC</strong> commands. If you want to use the online migration function on the DCS console, contact the O&amp;M personnel of the source cloud vendor to enable the commands. For offline migration, you can import backup files.</li><li id="dcs-faq-210721001__en-us_topic_0000001152024126_li2506152321415">If incremental migration is not required, you can perform full migration by referring to <a href="dcs-migrate-0220411.html">Online Full Migration of Redis from Another Cloud with redis-shake</a>. This method does not depend on <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b16910144613214">SYNC</strong> and <strong id="dcs-faq-210721001__en-us_topic_0000001152024126_b4911346132114">PSYNC</strong>.</li></ul>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326024.html">Data Backup, Export, and Migration</a></div>
</div>
</div>

View File

@ -0,0 +1,12 @@
<a name="dcs-faq-210721002"></a><a name="dcs-faq-210721002"></a>
<h1 class="topictitle1">Why Does Migration Task Creation Fail?</h1>
<div id="body8662426"><p id="dcs-faq-210721002__en-us_topic_0000001198023687_en-us_topic_0000001133077796_p7789185510414">Possible causes:</p>
<ol id="dcs-faq-210721002__en-us_topic_0000001198023687_en-us_topic_0000001133077796_ol28091255164112"><li id="dcs-faq-210721002__en-us_topic_0000001198023687_en-us_topic_0000001133077796_li780995518416">The underlying resources are insufficient.</li><li id="dcs-faq-210721002__en-us_topic_0000001198023687_en-us_topic_0000001133077796_li980945524114">The specifications of the ECS used for the migration are insufficient.</li><li id="dcs-faq-210721002__en-us_topic_0000001198023687_en-us_topic_0000001133077796_li1580985574119">The memory of the target Redis created before the migration is less than that of the source Redis.</li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326024.html">Data Backup, Export, and Migration</a></div>
</div>
</div>

View File

@ -0,0 +1,15 @@
<a name="dcs-faq-210812001"></a><a name="dcs-faq-210812001"></a>
<h1 class="topictitle1">How Long Are Keys Stored? How Do I Set Key Expiration?</h1>
<div id="body8662426"><ul id="dcs-faq-210812001__en-us_topic_0000001152024100_ul1115621454313"><li id="dcs-faq-210812001__en-us_topic_0000001152024100_li734520412814">Key storage duration<ul id="dcs-faq-210812001__en-us_topic_0000001152024100_ul826971745517"><li id="dcs-faq-210812001__en-us_topic_0000001152024100_li20497181219558">Keys that do not have an expiration are stored permanently.</li><li id="dcs-faq-210812001__en-us_topic_0000001152024100_li549841218552">Keys that have an expiration are deleted after they expire. For details, see <a href="dcs-ug-210330002.html">Scanning Expired Keys</a>.</li><li id="dcs-faq-210812001__en-us_topic_0000001152024100_li949901215555">To remove the expiration set for a key, run the <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b2301104616540">PERSIST</strong> command.</li></ul>
</li></ul>
<ul id="dcs-faq-210812001__en-us_topic_0000001152024100_ul1994124992711"><li id="dcs-faq-210812001__en-us_topic_0000001152024100_li694104914277">Setting key expiration<p id="dcs-faq-210812001__en-us_topic_0000001152024100_p3491173172817"><a name="dcs-faq-210812001__en-us_topic_0000001152024100_li694104914277"></a><a name="en-us_topic_0000001152024100_li694104914277"></a>You can run the <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b17491933281">EXPIRE</strong> or <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b24915342820">PEXPIRE</strong> command to set the key expiration time. For example, if you run <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b449115319284">expire key1 100</strong>, key1 will expire in 100 seconds. If you run <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b53371510122815">pexpire key2 1800</strong>, key2 will expire in 1800 milliseconds.</p>
<p id="dcs-faq-210812001__en-us_topic_0000001152024100_p0422155233710"><strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b191902269289">EXPIRE</strong> sets key expiration in seconds, and <strong id="dcs-faq-210812001__en-us_topic_0000001152024100_b654213118281">PEXPIRE</strong> sets key expiration in milliseconds.</p>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0805001.html">Big/Hot Key Analysis and Expired Key Scan</a></div>
</div>
</div>

View File

@ -0,0 +1,23 @@
<a name="dcs-faq-211228001"></a><a name="dcs-faq-211228001"></a>
<h1 class="topictitle1">Explaining and Using Hash Tags</h1>
<div id="body8662426"><div class="section" id="dcs-faq-211228001__en-us_topic_0000001238992171_section142536426102"><h4 class="sectiontitle">Hash Tag Design</h4><p id="dcs-faq-211228001__en-us_topic_0000001238992171_p101211531616">Multi-key operations, such as those using the <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b132401958103810">MSET</strong> command or Lua scripts, are atomic. All specified keys are executed at the same time. However, in a cluster, each key is hashed to a given shard, and multi-key operations are no longer atomic. The keys may be allocated to different slots. As a result, some keys are updated, while others are not. If there is a hash tag, the cluster determines which slot to allocate a key based on the hash tag. Keys with the same hash tag are allocated to the same slot.</p>
</div>
<div class="section" id="dcs-faq-211228001__en-us_topic_0000001238992171_section417119201132"><h4 class="sectiontitle">Using Hash Tags</h4><p id="dcs-faq-211228001__en-us_topic_0000001238992171_p68771010148">Only the content between the first left brace ({) and the following first right brace (}) is hashed.</p>
<p id="dcs-faq-211228001__en-us_topic_0000001238992171_p19877111151417">For example:</p>
<ul id="dcs-faq-211228001__en-us_topic_0000001238992171_ul278214203180"><li id="dcs-faq-211228001__en-us_topic_0000001238992171_li2078292018188">In keys <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b937210504531">{user1000}.following</strong> and <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b529710105410">{user1000}.followers</strong>, there is only one pair of braces. <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b62513017544">user1000</strong> will be hashed.</li><li id="dcs-faq-211228001__en-us_topic_0000001238992171_li1799214227180">In key <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b1599123595510">foo{}{bar}</strong>, there is no content between the first { and the first }. The whole key <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b1246155514567">foo{}{bar}</strong> will be hashed as usual.</li><li id="dcs-faq-211228001__en-us_topic_0000001238992171_li119541125151810">In key <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b11207321145710">foo{{bar}}zap</strong>, <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b10380217125811">{bar</strong> (the content between the first { and the first }) is hashed.</li><li id="dcs-faq-211228001__en-us_topic_0000001238992171_li1059993071818">In key <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b14736834702">foo{bar}{zap}</strong>, <strong id="dcs-faq-211228001__en-us_topic_0000001238992171_b2019984616020">bar</strong> is hashed because it is between the first pair of { and }.</li></ul>
</div>
<div class="section" id="dcs-faq-211228001__en-us_topic_0000001238992171_section7924121216157"><h4 class="sectiontitle">Hash Tag Example</h4><p id="dcs-faq-211228001__en-us_topic_0000001238992171_p21381224101520">When the following operation is performed:</p>
<pre class="screen" id="dcs-faq-211228001__en-us_topic_0000001238992171_screen15530143461512">EVAL "redis.call('set',KEYS[1],ARGV[1]) redis.call('set',KEYS[2],ARGV[2])" 2 key1 key2 value1 value2</pre>
<p id="dcs-faq-211228001__en-us_topic_0000001238992171_p8511946171619">The following error is displayed:</p>
<p id="dcs-faq-211228001__en-us_topic_0000001238992171_p186161316163">ERR 'key1' and 'key2' not in the same slot</p>
<p id="dcs-faq-211228001__en-us_topic_0000001238992171_p17351071714">You can use a hash tag to solve this issue:</p>
<pre class="screen" id="dcs-faq-211228001__en-us_topic_0000001238992171_screen290315041610">EVAL "redis.call('set',KEYS[1],ARGV[1]) redis.call('set',KEYS[2],ARGV[2])" 2 {user}key1 {user}key2 value1 value2</pre>
</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>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<a name="dcs-faq-221222"></a><a name="dcs-faq-221222"></a>
<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/5.0/6.0 instance has a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b8927124911157">Connection Address</strong> and a <strong id="dcs-faq-221222__en-us_topic_0000001431664584_b1927124921519">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 4.0/5.0/6.0 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"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326020.html">Client and Network Connection</a></div>
</div>
</div>

View File

@ -0,0 +1,85 @@
<a name="dcs-migrate-0220411"></a><a name="dcs-migrate-0220411"></a>
<h1 class="topictitle1">Online Full Migration of Redis from Another Cloud with redis-shake</h1>
<div id="body0000001252915134"><p id="dcs-migrate-0220411__p5787143145417">redis-shake is an open-source Redis migration tool. Its <strong id="dcs-migrate-0220411__b723122553519">rump</strong> mode allows you to obtain the full data of a source Redis using the <strong id="dcs-migrate-0220411__b1721910153613">SCAN</strong> command and write the data to a target Redis. This migration solution does not involve the <strong id="dcs-migrate-0220411__b7902752123611">SYNC</strong> or <strong id="dcs-migrate-0220411__b11730115443612">PSYNC</strong> command and can be widely used for migration between self-built Redis and cloud Redis.</p>
<p id="dcs-migrate-0220411__p1197516426595">This section describes how to use the <strong id="dcs-migrate-0220411__b14142161645314">rump</strong> mode of redis-shake to migrate the full Redis data of another cloud service vendor at a time online to DCS.</p>
<div class="fignone" id="dcs-migrate-0220411__fig413301355"><span class="figcap"><b>Figure 1 </b>Data flow in this solution</span><br><span><img class="eddx" id="dcs-migrate-0220411__image141318018356" src="en-us_image_0000001252755478.png"></span></div>
<div class="section" id="dcs-migrate-0220411__section175461313181014"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migrate-0220411__ul173951945161011"><li id="dcs-migrate-0220411__li670798205113">A <a href="dcs-ug-0312003.html">DCS Redis instance</a> has been created on the target cloud.</li><li id="dcs-migrate-0220411__li1707885513">An ECS has been created on the target cloud for running redis-shake.</li><li id="dcs-migrate-0220411__li853633720249">The ECS is in the same VPC as the DCS Redis instance and bound with an EIP.</li><li id="dcs-migrate-0220411__li7896125614717">The <strong id="dcs-migrate-0220411__b1797812714015">rump</strong> mode does not support incremental data migration. To keep data consistency, stop writing data to the source Redis before migration.</li><li id="dcs-migrate-0220411__li33921654778">This solution applies only to same-database mapping and does not apply to inter-database mapping.</li><li id="dcs-migrate-0220411__li1840043412101">If the source Redis has multiple databases (there are databases other than DB0), and your DCS instance is a cluster, this solution cannot be used. (Cluster DCS instances support only DB0.)</li></ul>
</div>
<div class="section" id="dcs-migrate-0220411__section4705105323111"><h4 class="sectiontitle">Procedure</h4><ol id="dcs-migrate-0220411__ol205640192327"><li id="dcs-migrate-0220411__li13849164817164"><span>Install Nginx on the ECS and the source forwarding server. The following describes how to install Nginx on an ECS running CentOS 7.x. The commands vary depending on the OS.</span><p><ol type="a" id="dcs-migrate-0220411__ol119934157811"><li id="dcs-migrate-0220411__li1157785919418">Add Nginx to the Yum repository.<pre class="screen" id="dcs-migrate-0220411__screen1772818581207">sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm</pre>
</li><li id="dcs-migrate-0220411__li144619714412">Check whether Nginx has been added successfully.<pre class="screen" id="dcs-migrate-0220411__screen057611169213">yum search nginx</pre>
</li><li id="dcs-migrate-0220411__li74060102434">Install Nginx.<pre class="screen" id="dcs-migrate-0220411__screen1718112712219">sudo yum install -y nginx</pre>
</li><li id="dcs-migrate-0220411__li680091916116">Install the stream module.<pre class="screen" id="dcs-migrate-0220411__screen1261114335212">yum install nginx-mod-stream --skip-broken</pre>
</li><li id="dcs-migrate-0220411__li19861625451">Start Nginx and set it to run automatically upon system startup.<pre class="screen" id="dcs-migrate-0220411__screen125701739142116">sudo systemctl start nginx.service
sudo systemctl enable nginx.service</pre>
</li><li id="dcs-migrate-0220411__li1120155614616">In the address box of a browser, enter the server address (the EIP of the ECS) to check whether Nginx is installed successfully.<p id="dcs-migrate-0220411__p9122195434716"><a name="dcs-migrate-0220411__li1120155614616"></a><a name="li1120155614616"></a>If the following page is displayed, Nginx has been installed successfully.</p>
<p id="dcs-migrate-0220411__p1990011394818"><span><img id="dcs-migrate-0220411__image14626143715215" src="en-us_image_0000001253074986.png"></span></p>
</li></ol>
</p></li><li id="dcs-migrate-0220411__li76111381445"><span>Add the source forwarding server to the whitelist of the source Redis.</span></li><li id="dcs-migrate-0220411__li14428144951818"><span>Configure a security group for the source forwarding server.</span><p><ol type="a" id="dcs-migrate-0220411__ol928413126193"><li id="dcs-migrate-0220411__li14669191812192">Obtain the EIP of the ECS.</li><li id="dcs-migrate-0220411__li18771752151914">In the inbound rule of the security group of the source forwarding server, add the EIP of the ECS, and open the port that ECS's requests come through. The following takes port 6379 as an example.</li></ol>
</p></li><li id="dcs-migrate-0220411__li19975143613450"><span>Configure Nginx forwarding for the source forwarding server.</span><p><ol type="a" id="dcs-migrate-0220411__ol1924094324811"><li id="dcs-migrate-0220411__li19609174934817">Log in to the Linux source forwarding server and run the following commands to open and modify the configuration file:<pre class="screen" id="dcs-migrate-0220411__screen13202858165910">cd /etc/nginx
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 <em id="dcs-migrate-0220411__i12180154014492">6379</em>;
proxy_pass <em id="dcs-migrate-0220411__i820217582526">{source_instance_address}</em>:<em id="dcs-migrate-0220411__i430001812532">{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>
</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 <em id="dcs-migrate-0220411__i14356146171516">6379</em></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>
</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:<p id="dcs-migrate-0220411__p10914155310204"><a name="dcs-migrate-0220411__li10516172263616"></a><a name="li10516172263616"></a><strong id="dcs-migrate-0220411__b1635831183610">cd /etc/nginx</strong></p>
<p id="dcs-migrate-0220411__p951915610209"><strong id="dcs-migrate-0220411__b156351631173618">vi nginx.conf</strong></p>
</li><li id="dcs-migrate-0220411__li28611116103716">Configuration example:<pre class="screen" id="dcs-migrate-0220411__screen1418219241098">stream {
server {
listen <em id="dcs-migrate-0220411__i026722419197">6666</em>;
proxy_pass <em id="dcs-migrate-0220411__i12154114378">{source_ecs_address}</em>:<em id="dcs-migrate-0220411__i64199430315">6379</em>;
}
}</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>
</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 <em id="dcs-migrate-0220411__i2012245400">6</em><em id="dcs-migrate-0220411__i1921724194014">666</em></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>
</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__screen1993319292420">redis-cli -h <em id="dcs-migrate-0220411__i66898101201">{target_ecs_address} </em>-p <em id="dcs-migrate-0220411__i718313304597">6666</em> -a <em id="dcs-migrate-0220411__i158914352597">{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. 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>
</li><li id="dcs-migrate-0220411__li8781918103217">Decompress the redis-shake file.<pre class="screen" id="dcs-migrate-0220411__screen65481045101912">tar -xvf redis-shake-v2.0.3.tar.gz</pre>
</li></ol>
</p></li><li id="dcs-migrate-0220411__li188959963517"><span>Configure the redis-shake configuration file.</span><p><ol type="a" id="dcs-migrate-0220411__ol1210514325499"><li id="dcs-migrate-0220411__li1311918125196">Go to the directory generated after the decompression.<pre class="screen" id="dcs-migrate-0220411__screen383515448361">cd redis-shake-v2.0.3</pre>
</li><li id="dcs-migrate-0220411__li427914206484">Modify the <strong id="dcs-migrate-0220411__b1795442212231">redis-shake.conf</strong> configuration file.<pre class="screen" id="dcs-migrate-0220411__screen162871920114818">vim redis-shake.conf</pre>
<p id="dcs-migrate-0220411__p323331816587">Modify the source Redis configuration.</p>
<ul id="dcs-migrate-0220411__ul065172810338"><li id="dcs-migrate-0220411__li19540124495317">source.type<p id="dcs-migrate-0220411__p3885446115316"><a name="dcs-migrate-0220411__li19540124495317"></a><a name="li19540124495317"></a>Type of the source Redis instance. Use <strong id="dcs-migrate-0220411__b753119187241">standalone</strong> for single-node, master/standby, and Proxy Cluster, and <strong id="dcs-migrate-0220411__b459832622413">cluster</strong> for cluster instances.</p>
</li><li id="dcs-migrate-0220411__li1444197145418">source.address<p id="dcs-migrate-0220411__p170318502520"><a name="dcs-migrate-0220411__li1444197145418"></a><a name="li1444197145418"></a>EIP of the ECS and the mapped port of the source forwarding server (ECS's listening port 6666). Separate the EIP and port number with a colon (:).</p>
</li><li id="dcs-migrate-0220411__li112489198558">source.password_raw<p id="dcs-migrate-0220411__p1794732135511"><a name="dcs-migrate-0220411__li112489198558"></a><a name="li112489198558"></a>Password of the source Redis instance. If no password is set, you do not need to set this parameter.</p>
</li></ul>
<p id="dcs-migrate-0220411__p485983313585">Modify the target DCS configuration.</p>
<ul id="dcs-migrate-0220411__ul4672232153313"><li id="dcs-migrate-0220411__li6150153985910">target.type<p id="dcs-migrate-0220411__p873994119599"><a name="dcs-migrate-0220411__li6150153985910"></a><a name="li6150153985910"></a>Type of the DCS Redis instance. Use <strong id="dcs-migrate-0220411__b20985728102516">standalone</strong> for single-node, master/standby, and Proxy Cluster, and <strong id="dcs-migrate-0220411__b139901528142518">cluster</strong> for cluster instances.</p>
</li><li id="dcs-migrate-0220411__li333157205">target.address<p id="dcs-migrate-0220411__p9796148602"><a name="dcs-migrate-0220411__li333157205"></a><a name="li333157205"></a>Colon (:) separated connection address and port of the DCS Redis instance.</p>
</li><li id="dcs-migrate-0220411__li4287910623">target.password_raw<p id="dcs-migrate-0220411__p2358717023"><a name="dcs-migrate-0220411__li4287910623"></a><a name="li4287910623"></a>Password of the DCS Redis instance. If no password is set, you do not need to set this parameter.</p>
</li></ul>
</li><li id="dcs-migrate-0220411__li72061610105414">Press <strong id="dcs-migrate-0220411__b745814296264">Esc</strong> to exit the editing mode and enter <strong id="dcs-migrate-0220411__b53296465547">:wq!</strong>. Press <strong id="dcs-migrate-0220411__b1074564817266">Enter</strong> to save the configuration and exit the editing interface.</li></ol>
</p></li><li id="dcs-migrate-0220411__li893341084316"><span>Run the following command to start redis-shake and migrate data in the <strong id="dcs-migrate-0220411__b644212156279">rump</strong> (online in full) mode:</span><p><pre class="screen" id="dcs-migrate-0220411__screen194133405218">./redis-shake.linux -conf redis-shake.conf -type rump</pre>
<div class="fignone" id="dcs-migrate-0220411__fig11121811922"><span class="figcap"><b>Figure 7 </b>Migration process</span><br><span><img id="dcs-migrate-0220411__image1755952719521" src="en-us_image_0000001252755498.png"></span></div>
<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>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
</div>
</div>

View File

@ -0,0 +1,52 @@
<a name="dcs-migrate-1117003"></a><a name="dcs-migrate-1117003"></a>
<h1 class="topictitle1">Offline Migration of Redis Cluster from Another Cloud with redis-shake</h1>
<div id="body1605698129613"><p id="dcs-migrate-1117003__p783020494275">redis-shake is an open-source tool for migrating data online or offline (by importing backup files) between Redis Clusters. If the source Redis Cluster is deployed in another cloud, and online migration is not supported, you can migrate data by importing backup files.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1814154103513">The following describes how to use redis-shake for backup migration to a DCS Redis Cluster instance.</p>
<div class="section" id="dcs-migrate-1117003__dcs-migrate-demo02_section2230197183316"><h4 class="sectiontitle">Importing Backup Files</h4><p id="dcs-migrate-1117003__dcs-migrate-demo02_p1897312853312">If the source Redis and the destitution 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-1117003__dcs-migrate-demo02_p1937501419433"></p>
<ol id="dcs-migrate-1117003__dcs-migrate-demo02_ol082075784215"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li18820145718421">Create a Redis Cluster instance on the DCS console.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p17820457194216"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li18820145718421"></a><a name="dcs-migrate-demo02_li18820145718421"></a>The memory of this instance cannot be smaller than that of the source Redis.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119">Run the following command to obtain the IP addresses and port numbers of all masters of the source Redis and target Redis:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p522517529213"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li104985015119"></a><a name="dcs-migrate-demo02_li104985015119"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b15225175214219">redis-cli -h <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1422585211213">{redis_address}</em> -p <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1722525219212">{redis_port}</em> -a <em id="dcs-migrate-1117003__dcs-migrate-demo02_i1022516521523">{redis_password}</em> cluster nodes</strong></p>
<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>
<div class="note" id="dcs-migrate-1117003__dcs-migrate-demo02_note222585210212"><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_p5225252728">After Redis is installed, it runs with redis-cli. To install Redis on CentOS, run the <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b44671243078">yum install redis</strong> command.</p>
</div></div>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li18820857174214">Prepare a cloud server and install redis-shake.<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1682145784219"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li18820857174214"></a><a name="dcs-migrate-demo02_li18820857174214"></a>redis-shake must be able to access the target Redis and bound to an EIP.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p1082175714429">You can use ECS and configure the same VPC, subnet, and security group for the ECS and the DCS instance.</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p88217579422"><a href="https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz" target="_blank" rel="noopener noreferrer">Download</a> and decompress the release version of redis-shake. (The following uses v2.1.2 as an example. You can also use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a>.)</p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p15821257194213"><span><img id="dcs-migrate-1117003__dcs-migrate-demo02_image1782145704210" src="en-us_image_0293282054.png"></span></p>
<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.<ul id="dcs-migrate-1117003__dcs-migrate-demo02_ul181391212136"><li id="dcs-migrate-1117003__dcs-migrate-demo02_li5813141221318">Edit the <strong id="dcs-migrate-1117003__b197048921212">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-1117003__dcs-migrate-demo02_screen1248155110107">source.type = cluster
# If there is no password, skip the following parameter.
source.password_raw = <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b12493515105"><em id="dcs-migrate-1117003__dcs-migrate-demo02_i1649105191015">{source_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
source.address = <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b184991236999"><em id="dcs-migrate-1117003__i194973362916">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-1117003__i1749817361897">{masterN_ip}:{masterN_port}</em></strong></pre>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li8813201217136">Run the following command to export the RDB file:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p331212346137"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li8813201217136"></a><a name="dcs-migrate-demo02_li8813201217136"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b1931273412131">./redis-shake -type dump -conf redis-shake.conf</strong></p>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p0312193411319">If the following information is displayed in the execution log, the backup file is exported successfully:</p>
<pre class="screen" id="dcs-migrate-1117003__dcs-migrate-demo02_screen5845144815132">execute runner[*run.CmdDump] finished!</pre>
</li></ul>
</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.<div class="p" id="dcs-migrate-1117003__dcs-migrate-demo02_p1825892672116"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li832782018219"></a><a name="dcs-migrate-demo02_li832782018219"></a>Edit the <strong id="dcs-migrate-1117003__b19204181619121">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-1117003__dcs-migrate-demo02_screen1882155716429">target.type = cluster
# If there is no password, skip the following parameter.
target.password_raw = <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b4822857164211"><em id="dcs-migrate-1117003__dcs-migrate-demo02_i16822145784210">{target_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
target.address = <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b143109517118"><em id="dcs-migrate-1117003__i143094551116">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-1117003__i193092518113">{masterN_ip}:{masterN_port}</em></strong>
# List the RDB files to be imported, separated by semicolons (;).
rdb.input = <strong id="dcs-migrate-1117003__dcs-migrate-demo02_b193601012192017"><em id="dcs-migrate-1117003__dcs-migrate-demo02_i3201811112014">local_dump.0</em></strong><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b2029282072015"><em id="dcs-migrate-1117003__dcs-migrate-demo02_i139757192201">;local_dump.1;local_dump.2;local_dump.3</em></strong></pre>
</div>
<p id="dcs-migrate-1117003__dcs-migrate-demo02_p2840103122112">Save and exit.</p>
</li><li id="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214">Run the following command to import the RDB file to the target instance:<p id="dcs-migrate-1117003__dcs-migrate-demo02_p592783512112"><a name="dcs-migrate-1117003__dcs-migrate-demo02_li1132710201214"></a><a name="dcs-migrate-demo02_li1132710201214"></a><strong id="dcs-migrate-1117003__dcs-migrate-demo02_b89111406213">./redis-shake -type restore -conf redis-shake.conf</strong></p>
<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 DCS Redis Cluster 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></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
</div>
</div>

View File

@ -0,0 +1,88 @@
<a name="dcs-migrate-demo02"></a><a name="dcs-migrate-demo02"></a>
<h1 class="topictitle1">Self-Hosted Redis Cluster Migration with redis-shake</h1>
<div id="body1562070011766"><p id="dcs-migrate-demo02__p8060118">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>
<p id="dcs-migrate-demo02__p1814154103513">The following describes how to use redis-shake to migrate data to a DCS Redis Cluster instance.</p>
<div class="section" id="dcs-migrate-demo02__section1127137154413"><h4 class="sectiontitle">Migrating Data Online</h4><p id="dcs-migrate-demo02__p33841304419">You can migrate data online from a self-hosted Redis Cluster to a DCS Redis Cluster instance as long as the two clusters are directly connected or connected through a transit server.</p>
<p id="dcs-migrate-demo02__p10133393441">Data in Redis Clusters of another cloud cannot be migrated online because the <strong id="dcs-migrate-demo02__b18590191983014">SYNC</strong> and <strong id="dcs-migrate-demo02__b16322112117309">PSYNC</strong> commands are disabled by some vendors.</p>
<ol id="dcs-migrate-demo02__ol19848121112139"><li id="dcs-migrate-demo02__li138131117443">Create a Redis Cluster instance on the DCS console.<p id="dcs-migrate-demo02__p16382142134417"><a name="dcs-migrate-demo02__li138131117443"></a><a name="li138131117443"></a>The memory of this instance cannot be smaller than that of the source Redis.</p>
</li><li id="dcs-migrate-demo02__li8848101114133">Prepare a cloud server and install redis-shake.<p id="dcs-migrate-demo02__p1236334153517"><a name="dcs-migrate-demo02__li8848101114133"></a><a name="li8848101114133"></a>redis-shake must be able to access both the source and target Redis. Bound an EIP to the cloud server.</p>
<p id="dcs-migrate-demo02__p7453161552818">You can use ECS and configure the same VPC, subnet, and security group for the ECS and the DCS instance. If the source Redis is deployed on cloud servers of another cloud, allow public access to the servers.</p>
<p id="dcs-migrate-demo02__dcs-migrate-demo02_p88217579422"><a href="https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz" target="_blank" rel="noopener noreferrer">Download</a> and decompress the release version of redis-shake. (The following uses v2.1.2 as an example. You can also use <a href="https://github.com/alibaba/RedisShake/releases" target="_blank" rel="noopener noreferrer">other redis-shake versions</a>.)</p>
<p id="dcs-migrate-demo02__dcs-migrate-demo02_p15821257194213"><span><img id="dcs-migrate-demo02__dcs-migrate-demo02_image1782145704210" src="en-us_image_0000001420267897.png"></span></p>
</li><li id="dcs-migrate-demo02__li284891111130">Locate the masters of the source and target Redis Clusters and obtain the IP addresses of the masters.<p id="dcs-migrate-demo02__p918255413395"><a name="dcs-migrate-demo02__li284891111130"></a><a name="li284891111130"></a>Online data migration must be performed node by node. Run the following command to query the IP addresses and port numbers of all nodes in both the source and target Redis Clusters.</p>
<p id="dcs-migrate-demo02__p64034338434"><strong id="dcs-migrate-demo02__b1740393319431">redis-cli -h <em id="dcs-migrate-demo02__i174031933184315">{redis_address}</em> -p <em id="dcs-migrate-demo02__i44036333433">{redis_port}</em> -a <em id="dcs-migrate-demo02__i184031833204314">{redis_password}</em> cluster nodes</strong></p>
<p id="dcs-migrate-demo02__p12403163316433">In the command output similar to the following, obtain the IP addresses and ports of all masters.</p>
<p id="dcs-migrate-demo02__p1612719464562"><span><img id="dcs-migrate-demo02__image19820346211" src="en-us_image_0177600650.png"></span></p>
<div class="note" id="dcs-migrate-demo02__note7693550185411"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo02__p136936501544">After Redis is installed, it runs with redis-cli. To install Redis on CentOS, run the <strong id="dcs-migrate-demo02__b44791937105511">yum install redis</strong> command.</p>
</div></div>
</li><li id="dcs-migrate-demo02__li984815114135">Edit the redis-shake configuration file.<p id="dcs-migrate-demo02__p165301315101"><a name="dcs-migrate-demo02__li984815114135"></a><a name="li984815114135"></a>Edit the <strong id="dcs-migrate-demo02__b15129291552">redis-shake.conf</strong> file by providing the following information about all the masters of both the source and the target:</p>
<pre class="screen" id="dcs-migrate-demo02__screen24734391550">source.type = cluster
# If there is no password, skip the following parameter.
source.password_raw = <strong id="dcs-migrate-demo02__b1650010390558"><em id="dcs-migrate-demo02__i3500103911558">{source_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
source.address = <strong id="dcs-migrate-demo02__b550010391559"><em id="dcs-migrate-demo02__i115001939135513">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-demo02__i18500139115514">{masterN_ip}:{masterN_port}</em></strong>
target.type = cluster
# If there is no password, skip the following parameter.
target.password_raw = <strong id="dcs-migrate-demo02__b1950010392559"><em id="dcs-migrate-demo02__i1650063919551">{target_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
target.address = <strong id="dcs-migrate-demo02__b45561343346"><em id="dcs-migrate-demo02__i75558417341">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-demo02__i1955610443419">{masterN_ip}:{masterN_port}</em></strong></pre>
<p id="dcs-migrate-demo02__p253913201019">Save and exit.</p>
</li><li id="dcs-migrate-demo02__li13477121417134">Migrate data online.<p id="dcs-migrate-demo02__p133087271005"><a name="dcs-migrate-demo02__li13477121417134"></a><a name="li13477121417134"></a>Run the following command to synchronize data between the source and the target Redis:</p>
<p id="dcs-migrate-demo02__p830810272002"><strong id="dcs-migrate-demo02__b03085277020">./redis-shake -type sync -conf redis-shake.conf</strong></p>
<p id="dcs-migrate-demo02__p53081327906">If the following information is displayed, the full synchronization has been completed and incremental synchronization begins.</p>
<pre class="screen" id="dcs-migrate-demo02__screen8323174812">sync rdb done.</pre>
<p id="dcs-migrate-demo02__p11308152711011">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__screen14186891677">sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0</pre>
<div class="fignone" id="dcs-migrate-demo02__fig1758112170323"><span class="figcap"><b>Figure 1 </b>Online migration using redis-shake</span><br><span><img id="dcs-migrate-demo02__image18502120133014" src="en-us_image_0177653842.png"></span></div>
</li><li id="dcs-migrate-demo02__li1362193441315">Verify the migration.<p id="dcs-migrate-demo02__p16921143609"><a name="dcs-migrate-demo02__li1362193441315"></a><a name="li1362193441315"></a>After data synchronization, access the DCS Redis Cluster instance using redis-cli. Run the <strong id="dcs-migrate-demo02__b4901173855318">info</strong> command to query the number of keys in the <strong id="dcs-migrate-demo02__b1424873735415">Keyspace</strong> section to confirm that data has been fully imported.</p>
<p id="dcs-migrate-demo02__p492154311014">If the data has not been fully imported, run the <strong id="dcs-migrate-demo02__b12143507542">flushall</strong> or <strong id="dcs-migrate-demo02__b221515012545">flushdb</strong> command to clear the cached data in the instance, and synchronize data again.</p>
</li><li id="dcs-migrate-demo02__li18136153116519">Clear the redis-shake configuration file.</li></ol>
</div>
<div class="section" id="dcs-migrate-demo02__section2230197183316"><h4 class="sectiontitle">Importing Backup Files</h4><p id="dcs-migrate-demo02__p1897312853312">If the source Redis and the destitution 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-demo02__p1937501419433"></p>
<ol id="dcs-migrate-demo02__ol082075784215"><li id="dcs-migrate-demo02__li18820145718421">Create a Redis Cluster instance on the DCS console.<p id="dcs-migrate-demo02__p17820457194216"><a name="dcs-migrate-demo02__li18820145718421"></a><a name="li18820145718421"></a>The memory of this instance cannot be smaller than that of the source Redis.</p>
</li><li id="dcs-migrate-demo02__li104985015119">Run the following command to obtain the IP addresses and port numbers of all masters of the source Redis and target Redis:<p id="dcs-migrate-demo02__p522517529213"><a name="dcs-migrate-demo02__li104985015119"></a><a name="li104985015119"></a><strong id="dcs-migrate-demo02__b15225175214219">redis-cli -h <em id="dcs-migrate-demo02__i1422585211213">{redis_address}</em> -p <em id="dcs-migrate-demo02__i1722525219212">{redis_port}</em> -a <em id="dcs-migrate-demo02__i1022516521523">{redis_password}</em> cluster nodes</strong></p>
<p id="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-demo02__p1222510522212"><span><img id="dcs-migrate-demo02__image122251352628" src="en-us_image_0177654980.png"></span></p>
<div class="note" id="dcs-migrate-demo02__note222585210212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-migrate-demo02__p5225252728">After Redis is installed, it runs with redis-cli. To install Redis on CentOS, run the <strong id="dcs-migrate-demo02__b44671243078">yum install redis</strong> command.</p>
</div></div>
</li><li id="dcs-migrate-demo02__li18820857174214">Prepare a cloud server and install redis-shake.<p id="dcs-migrate-demo02__p1682145784219"><a name="dcs-migrate-demo02__li18820857174214"></a><a name="li18820857174214"></a>redis-shake must be able to access the target Redis and bound to an EIP.</p>
<p id="dcs-migrate-demo02__p1082175714429">You can use ECS and configure the same VPC, subnet, and security group for the ECS and the DCS instance.</p>
<p id="dcs-migrate-demo02__p1073511343447"><a href="https://github.com/tair-opensource/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz" target="_blank" rel="noopener noreferrer">Download</a> and decompress the release version of redis-shake. (The following uses v2.1.2 as an example.)</p>
<p id="dcs-migrate-demo02__p1073517349442"><span><img id="dcs-migrate-demo02__image1735234114418" src="en-us_image_0000001420151641.png"></span></p>
<div class="note" id="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-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-demo02__li31771323165319">Export the RDB file.<ul id="dcs-migrate-demo02__ul181391212136"><li id="dcs-migrate-demo02__li5813141221318">Edit the <strong id="dcs-migrate-demo02__b165661730896">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__screen1248155110107">source.type = cluster
# If there is no password, skip the following parameter.
source.password_raw = <strong id="dcs-migrate-demo02__b12493515105"><em id="dcs-migrate-demo02__i1649105191015">{source_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the source Redis Cluster, which are separated by semicolons (;).
source.address = <strong id="dcs-migrate-demo02__b184991236999"><em id="dcs-migrate-demo02__i194973362916">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-demo02__i1749817361897">{masterN_ip}:{masterN_port}</em></strong></pre>
</li><li id="dcs-migrate-demo02__li8813201217136">Run the following command to export the RDB file:<p id="dcs-migrate-demo02__p331212346137"><a name="dcs-migrate-demo02__li8813201217136"></a><a name="li8813201217136"></a><strong id="dcs-migrate-demo02__b1931273412131">./redis-shake -type dump -conf redis-shake.conf</strong></p>
<p id="dcs-migrate-demo02__p0312193411319">If the following information is displayed in the execution log, the backup file is exported successfully:</p>
<pre class="screen" id="dcs-migrate-demo02__screen5845144815132">execute runner[*run.CmdDump] finished!</pre>
</li></ul>
</li><li id="dcs-migrate-demo02__li2088910245149">Import the RDB file.<ol type="a" id="dcs-migrate-demo02__ol2327112018216"><li id="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-demo02__li832782018219">Edit the redis-shake configuration file.<div class="p" id="dcs-migrate-demo02__p1825892672116"><a name="dcs-migrate-demo02__li832782018219"></a><a name="li832782018219"></a>Edit the <strong id="dcs-migrate-demo02__b5238125171018">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__screen1882155716429">target.type = cluster
# If there is no password, skip the following parameter.
target.password_raw = <strong id="dcs-migrate-demo02__b4822857164211"><em id="dcs-migrate-demo02__i16822145784210">{target_redis_password} </em></strong>
# IP addresses and port numbers of all masters of the target instance, which are separated by semicolons (;).
target.address = <strong id="dcs-migrate-demo02__b143109517118"><em id="dcs-migrate-demo02__i143094551116">{master1_ip}:{master1_port};{master2_ip}:{master2_port}</em>...<em id="dcs-migrate-demo02__i193092518113">{masterN_ip}:{masterN_port}</em></strong>
# List the RDB files to be imported, separated by semicolons (;).
rdb.input = <strong id="dcs-migrate-demo02__b193601012192017"><em id="dcs-migrate-demo02__i3201811112014">local_dump.0</em></strong><strong id="dcs-migrate-demo02__b2029282072015"><em id="dcs-migrate-demo02__i139757192201">;local_dump.1;local_dump.2;local_dump.3</em></strong></pre>
</div>
<p id="dcs-migrate-demo02__p2840103122112">Save and exit.</p>
</li><li id="dcs-migrate-demo02__li1132710201214">Run the following command to import the RDB file to the target instance:<p id="dcs-migrate-demo02__p592783512112"><a name="dcs-migrate-demo02__li1132710201214"></a><a name="li1132710201214"></a><strong id="dcs-migrate-demo02__b89111406213">./redis-shake -type restore -conf redis-shake.conf</strong></p>
<p id="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-demo02__screen152647172316">Enabled http stats, set status (incr), and wait forever.</pre>
</li></ol>
</li><li id="dcs-migrate-demo02__li1382275724216">Verify the migration.<p id="dcs-migrate-demo02__p1682214570429"><a name="dcs-migrate-demo02__li1382275724216"></a><a name="li1382275724216"></a>After data synchronization, access the DCS Redis Cluster instance using redis-cli. Run the <strong id="dcs-migrate-demo02__b05331233101217">info</strong> command to query the number of keys in the <strong id="dcs-migrate-demo02__b0427123710120">Keyspace</strong> section to confirm that data has been fully imported.</p>
<p id="dcs-migrate-demo02__p0822357184215">If the data has not been fully imported, run the <strong id="dcs-migrate-demo02__b1185520418128">flushall</strong> or <strong id="dcs-migrate-demo02__b1585610471215">flushdb</strong> command to clear the cached data in the instance, and synchronize data again.</p>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312002.html">Migrating Data from Self-Hosted Redis to DCS</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
<a name="dcs-migration-0312002"></a><a name="dcs-migration-0312002"></a>
<h1 class="topictitle1">Migrating Data from Self-Hosted Redis to DCS</h1>
<div id="body1521459102464"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-190703003.html">Online Migration of Self-Hosted Redis</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-190703002.html">Backup Migration of Self-Hosted Redis</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312010.html">Self-Hosted Redis Migration with redis-cli (AOF)</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312011.html">Self-Hosted Redis Migration with redis-cli (RDB)</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-230313.html">Data Migration Guide</a></div>
</div>
</div>

View File

@ -0,0 +1,72 @@
<a name="dcs-migration-0312003"></a><a name="dcs-migration-0312003"></a>
<h1 class="topictitle1">Online Migration Between DCS Redis Instances</h1>
<div id="body1605605971285"><div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section113421435300"><h4 class="sectiontitle">Application Scenarios</h4><p id="dcs-migration-0312003__dcs-migration-190703003_p1244713381103">If the source and target instances are interconnected and the <strong id="dcs-migration-0312003__dcs-migration-190703003_b18112161719418">SYNC</strong> and <strong id="dcs-migration-0312003__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.</p>
<div class="caution" id="dcs-migration-0312003__dcs-migration-190703003_note8576142111415"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><ul id="dcs-migration-0312003__dcs-migration-190703003_ul12488164523510"><li id="dcs-migration-0312003__dcs-migration-190703003_li3488545193514">If the <strong id="dcs-migration-0312003__dcs-migration-190703003_b18144137133010">SYNC</strong> and <strong id="dcs-migration-0312003__dcs-migration-190703003_b11144475309">PSYNC</strong> commands are disabled on the source Redis instance, enable them before performing online migration. Otherwise, the migration fails. If you use a DCS Redis instance for online migration, the <strong id="dcs-migration-0312003__dcs-migration-190703003_b814416793016">SYNC</strong> command is automatically enabled.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li10440349183519">You cannot use public networks for online migration.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li14846184712514">During online migration, you are advised to set <strong id="dcs-migration-0312003__dcs-migration-190703003_b9548141910176">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312003__dcs-migration-190703003_b16885030121716">client-output-buffer-limit</strong> to 20% of the maximum memory of the instance.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li665420105315">The source must be Redis 3.0 or later.</li></ul>
</div></div>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section77251317153217"><h4 class="sectiontitle">Impacts on Services</h4><p id="dcs-migration-0312003__dcs-migration-190703003_p5721132883218">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours.</p>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section15790816165711"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312003__dcs-migration-190703003_ul56215114194"><li id="dcs-migration-0312003__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-0312003__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></ul>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section760319488490"><h4 class="sectiontitle">Step 1: Obtain the Source Redis Address</h4><p id="dcs-migration-0312003__dcs-migration-190703003_p136671818181819">Obtain the IP address/domain name and port number of the source Redis instance.</p>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section1128152020384"><h4 class="sectiontitle">Step 2: Prepare the Target DCS Redis Instance</h4><ul id="dcs-migration-0312003__dcs-migration-190703003_ul727834515383"><li id="dcs-migration-0312003__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__dcs-migration-190703003_li5270324091">If you already have a DCS Redis instance, you do not need to create one again, but you need 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__dcs-migration-190703003_p49291961936">If the target instance data is not cleared before the migration and the source and target instances contain the same key, the key in the target instance will be overwritten by the key in the source instance after the migration.</p>
</li></ul>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section84284075116"><h4 class="sectiontitle">Step 3: Check the Network</h4><ol id="dcs-migration-0312003__dcs-migration-190703003_ol1260417035216"><li id="dcs-migration-0312003__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__dcs-migration-190703003_p188021330165115">If yes, go to <a href="#dcs-migration-0312003__dcs-migration-190703003_section157769524519">Step 4: Create an Online Migration Task</a>. If no, go to <a href="#dcs-migration-0312003__dcs-migration-190703003_li160420185217">2</a>.</p>
</p></li><li id="dcs-migration-0312003__dcs-migration-190703003_li160420185217"><a name="dcs-migration-0312003__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-0312003__dcs-migration-190703003_p1480253095111">If yes, go to <a href="#dcs-migration-0312003__dcs-migration-190703003_section157769524519">Step 4: Create an Online Migration Task</a>. If no, go to <a href="#dcs-migration-0312003__dcs-migration-190703003_li423483319412">3</a>.</p>
</p></li><li id="dcs-migration-0312003__dcs-migration-190703003_li423483319412"><a name="dcs-migration-0312003__dcs-migration-190703003_li423483319412"></a><a name="dcs-migration-190703003_li423483319412"></a><span>Perform the following operations to establish the network.</span><p><ul id="dcs-migration-0312003__dcs-migration-190703003_ul17325432414"><li id="dcs-migration-0312003__dcs-migration-190703003_li7271615152516">If the source and target Redis instances are <span id="dcs-migration-0312003__dcs-migration-190703003_ph749662795514">in the same DCS region</span>, create a VPC peering connection by referring to "VPC Peering Connection" in the <em id="dcs-migration-0312003__dcs-migration-190703003_i4602173825519">Virtual Private Cloud User Guide</em>.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li1073215431842">If the source and target Redis instances are on different clouds or in different regions, create a connection by referring to the <em id="dcs-migration-0312003__dcs-migration-190703003_i22974405618">Direct Connect User Guide</em>.</li></ul>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section157769524519"><a name="dcs-migration-0312003__dcs-migration-190703003_section157769524519"></a><a name="dcs-migration-190703003_section157769524519"></a><h4 class="sectiontitle">Step 4: Create an Online Migration Task</h4><ol id="dcs-migration-0312003__dcs-migration-190703003_ol81391154144716"><li id="dcs-migration-0312003__dcs-migration-190703003_li390016374490"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312003__dcs-migration-190703003_b11427641642634">Data Migration</strong>.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li67372014165120"><span>Click <strong id="dcs-migration-0312003__dcs-migration-190703003_b61157650142634">Create Online Migration Task</strong>.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li1381824764611"><span>Enter the task name and description.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><p id="dcs-migration-0312003__dcs-migration-190703003_p473111475510">The VPC, subnet, and security group facilitate the migration. Ensure that the migration resources can access the source and target Redis instances.</p>
<div class="note" id="dcs-migration-0312003__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__dcs-migration-190703003_ul12308184119132"><li id="dcs-migration-0312003__dcs-migration-190703003_li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312003__dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312003__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__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>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section14919536272"><h4 class="sectiontitle">Step 5: Configure the Online Migration Task</h4><ol id="dcs-migration-0312003__dcs-migration-190703003_ol20242048298"><li id="dcs-migration-0312003__dcs-migration-190703003_li187884091914"><span>On the <strong id="dcs-migration-0312003__dcs-migration-190703003_b8239202416317">Online Migration</strong> tab page, click <strong id="dcs-migration-0312003__dcs-migration-190703003_b983115204312">Configure</strong> in the row containing the online migration task you just created.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li18777171715209"><span>Select a migration type.</span><p><p id="dcs-migration-0312003__dcs-migration-190703003_p72342811211">Supported migration types are <strong id="dcs-migration-0312003__dcs-migration-190703003_b7961135591712">Full</strong> and <strong id="dcs-migration-0312003__dcs-migration-190703003_b1096125531711">Full + Incremental</strong>, which are described in <a href="#dcs-migration-0312003__dcs-migration-190703003_table55653322215">Table 1</a>.</p>
<div class="tablenoborder"><a name="dcs-migration-0312003__dcs-migration-190703003_table55653322215"></a><a name="dcs-migration-190703003_table55653322215"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-migration-0312003__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__dcs-migration-190703003_row5587330229"><th align="left" class="cellrowborder" valign="top" width="27.47%" id="mcps1.3.8.2.2.2.2.2.3.1.1"><p id="dcs-migration-0312003__dcs-migration-190703003_p758103372214">Migration Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72.53%" id="mcps1.3.8.2.2.2.2.2.3.1.2"><p id="dcs-migration-0312003__dcs-migration-190703003_p1058153311225">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-migration-0312003__dcs-migration-190703003_row1958203312220"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.8.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312003__dcs-migration-190703003_p458153332210">Full</p>
</td>
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.8.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312003__dcs-migration-190703003_p125833322217">Suitable for scenarios where services can be interrupted. Data is migrated at one time. <strong id="dcs-migration-0312003__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__dcs-migration-190703003_row205815338228"><td class="cellrowborder" valign="top" width="27.47%" headers="mcps1.3.8.2.2.2.2.2.3.1.1 "><p id="dcs-migration-0312003__dcs-migration-190703003_p85863316221">Full + incremental</p>
</td>
<td class="cellrowborder" valign="top" width="72.53%" headers="mcps1.3.8.2.2.2.2.2.3.1.2 "><p id="dcs-migration-0312003__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__dcs-migration-190703003_p110411470116">Once the migration starts, it remains <strong id="dcs-migration-0312003__dcs-migration-190703003_b16552211111311">Migrating</strong> until you click <strong id="dcs-migration-0312003__dcs-migration-190703003_b65201171131">Stop</strong> in the <strong id="dcs-migration-0312003__dcs-migration-190703003_b5355163610593">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>
</tbody>
</table>
</div>
<div class="fignone" id="dcs-migration-0312003__dcs-migration-190703003_fig23511729101218"><span class="figcap"><b>Figure 1 </b>Selecting the migration type</span><br><span><img id="dcs-migration-0312003__dcs-migration-190703003_image2036555461718" src="en-us_image_0291862872.png"></span></div>
</p></li><li id="dcs-migration-0312003__dcs-migration-190703003_li974533414185"><span>Configure source Redis and target Redis.</span><p><ol type="a" id="dcs-migration-0312003__dcs-migration-190703003_ol128193366190"><li id="dcs-migration-0312003__dcs-migration-190703003_li5121433171911">The Redis type can be <strong id="dcs-migration-0312003__dcs-migration-190703003_b1093945910">Redis in the cloud</strong> or <strong id="dcs-migration-0312003__dcs-migration-190703003_b431181211911">Self-hosted Redis</strong> as required.<ul id="dcs-migration-0312003__dcs-migration-190703003_ul445012114211"><li id="dcs-migration-0312003__dcs-migration-190703003_li184511719217"><strong id="dcs-migration-0312003__dcs-migration-190703003_b3442183942010">Redis in the cloud</strong>: a DCS Redis instance (source or target) that is in the same VPC as the migration task. If you select this option, specify a DCS Redis instance.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li127821877221"><strong id="dcs-migration-0312003__dcs-migration-190703003_b1967218566215">Self-hosted Redis</strong>: a DCS Redis instance, Redis in another cloud, or self-hosted Redis. If you select this option, enter Redis addresses.</li></ul>
</li><li id="dcs-migration-0312003__dcs-migration-190703003_li13145145319231">If the instance is password-protected, click <strong id="dcs-migration-0312003__dcs-migration-190703003_b164631019236">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__dcs-migration-190703003_b54195135235">Test Connection</strong> directly.</li></ol>
</p></li><li id="dcs-migration-0312003__dcs-migration-190703003_li1348442114911"><span>Click <strong id="dcs-migration-0312003__dcs-migration-190703003_b13194159102331">Next</strong>.</span></li><li id="dcs-migration-0312003__dcs-migration-190703003_li3625202214190"><span>Confirm the migration task details and click <strong id="dcs-migration-0312003__dcs-migration-190703003_b46184816117">Submit</strong>.</span><p><p id="dcs-migration-0312003__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__dcs-migration-190703003_b15447174915118">Successful</strong>.</p>
<div class="note" id="dcs-migration-0312003__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__dcs-migration-190703003_ul4321452125415"><li id="dcs-migration-0312003__dcs-migration-190703003_li3321952195412">Once incremental migration starts, it remains <strong id="dcs-migration-0312003__dcs-migration-190703003_b12386152711">Migrating</strong> until you click <strong id="dcs-migration-0312003__dcs-migration-190703003_b0238101515715">Stop</strong>.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li23211252175420">To stop a migration task, select the check box on the left of the migration task and click <strong id="dcs-migration-0312003__dcs-migration-190703003_b230619112814">Stop</strong> above the instance list.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li1912563853615">After data migration, duplicate keys will be overwritten.</li></ul>
</div></div>
<p id="dcs-migration-0312003__dcs-migration-190703003_p4880126112412">If the migration fails, click the migration task and check the log on the <strong id="dcs-migration-0312003__dcs-migration-190703003_b1024662118283">Migration Logs</strong> page.</p>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312003__dcs-migration-190703003_section3718231268"><h4 class="sectiontitle">Verifying the Migration</h4><p id="dcs-migration-0312003__dcs-migration-190703003_p1571161034711">After the migration is complete, use redis-cli to connect the source and target Redis instances to check data integrity.</p>
<ol id="dcs-migration-0312003__dcs-migration-190703003_ol11257313194715"><li id="dcs-migration-0312003__dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis.</li><li id="dcs-migration-0312003__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312003__dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-0312003__dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-0312003__dcs-migration-190703003_b20825181414299">expires</strong>.<p id="dcs-migration-0312003__dcs-migration-190703003_p203461224529"><span><img id="dcs-migration-0312003__dcs-migration-190703003_image152912031408" src="en-us_image_0293255709.png"></span></p>
</li><li id="dcs-migration-0312003__dcs-migration-190703003_li1878042516480">Calculate the differences between the values of <strong id="dcs-migration-0312003__dcs-migration-190703003_b7585046192918">keys</strong> and <strong id="dcs-migration-0312003__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-0312003__dcs-migration-190703003_p68531049182811">During full migration, source Redis data updated during the migration will not be migrated to the target instance.</p>
</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>
</div>
</div>

View File

@ -0,0 +1,39 @@
<a name="dcs-migration-0312004"></a><a name="dcs-migration-0312004"></a>
<h1 class="topictitle1">Backup Migration Between Regions or Redis Versions</h1>
<div id="body1605611630232"><div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section2033617489354"><h4 class="sectiontitle">Application Scenarios</h4><p id="dcs-migration-0312004__dcs-migration-190703002_p592264013322">Use the DCS console to migrate Redis data from Redis of another cloud or self-hosted Redis to DCS for Redis.</p>
<p id="dcs-migration-0312004__dcs-migration-190703002_p542904425717">Simply download the source Redis data and then upload the data to an OBS bucket in the same 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>
<p id="dcs-migration-0312004__dcs-migration-190703002_p19560545183013">.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.</p>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section393611177"><h4 class="sectiontitle">Prerequisites</h4><ul id="dcs-migration-0312004__dcs-migration-190703002_ul6904185261112"><li id="dcs-migration-0312004__dcs-migration-190703002_li883710301127">The OBS bucket must be in the same region as the target DCS Redis instance. </li><li id="dcs-migration-0312004__dcs-migration-190703002_li923118413317">The data files to be uploaded must be in the .aof, .rdb, .zip, or .tar.gz format.</li><li id="dcs-migration-0312004__dcs-migration-190703002_li64753803210">To migrate data from a single-node or master/standby Redis instance of another cloud, create a backup task and download the backup file.</li><li id="dcs-migration-0312004__dcs-migration-190703002_li12471738123211">To migrate data from a cluster Redis instance of another cloud, download all backup files, upload all of them to the OBS bucket, and select all of them for the migration. Each backup file contains data for a shard of the instance.</li></ul>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section1128152020384"><a name="dcs-migration-0312004__dcs-migration-190703002_section1128152020384"></a><a name="dcs-migration-190703002_section1128152020384"></a><h4 class="sectiontitle">Step 1: Prepare the Target DCS Redis Instance</h4><ul id="dcs-migration-0312004__dcs-migration-190703002_ul727834515383"><li id="dcs-migration-0312004__dcs-migration-190703002_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-0312004__dcs-migration-190703002_li5270324091">If you already have a DCS Redis instance, you do not need to create one again, but you need to clear the instance data before the migration. For details, see <a href="dcs-ug-0312018.html">Clearing DCS Instance Data</a>.</li></ul>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section119981132024"><h4 class="sectiontitle">Step 2: Create an OBS Bucket and Upload Backup Files</h4><ol id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol14268144310394"><li id="dcs-migration-0312004__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-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol1428871018424"><li id="dcs-migration-0312004__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-0312004__dcs-migration-190703002_dcs-ug-0312037_b166887291556">Create Bucket</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810">Select a region.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p6758547101115"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li67334415810"></a><a name="dcs-migration-190703002_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-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li17551201611127">Specify <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b35011159155518">Bucket Name</strong>.<p id="dcs-migration-0312004__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>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li7374556111414">Set <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b6855154112512">Storage Class</strong> to <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b4856246254">Standard</strong>, <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b15857194162510">Warm</strong> or <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b8857184172513">Cold</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1599313751414">Set <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b106244293384">Bucket Policy</strong> to <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b16228222115810">Private</strong>, <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b288452010585">Public Read</strong>, or <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b48751517175816">Public Read and Write</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8943153811198">Configure default encryption.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1095473710153">Click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_b27676134598">Create Now</strong>.</li></ol>
</p></li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li11932341124013"><span>Upload the backup data files to the OBS bucket by using OBS Browser+.</span><p><p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p5866126154517">If the backup file to be uploaded does not exceed 5 GB, upload the file using the OBS console by referring to step <a href="#dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315">3</a>.</p>
<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p78781449183">If the backup file to be uploaded is larger than 5 GB, perform the following steps to upload the file using OBS Browser+.</p>
<ol type="a" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_ol159571723610"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614">Download OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p16850164915377"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614"></a><a name="dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li1695767113614"></a>For details, see section "Downloading OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i17217435104313">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li11225208162112">Install OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p1022518842111"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li11225208162112"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li11225208162112"></a>For details, see section "Installing OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i118557531214">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li201961913103814">Log in to OBS Browser+.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p1119621313811"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li201961913103814"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li201961913103814"></a>For details, see section "Logging In to OBS Browser+" in <em id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_i104881711215">Object Storage Service (OBS) Tools Guide (OBS Browser+)</em>.</p>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li144125145718">Create a bucket.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li10948943114817">Upload backup data.</li></ol>
</p></li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li8307135965315"></a><a name="dcs-migration-190703002_dcs-ug-0312037_li8307135965315"></a><span>On the OBS console, upload the backup data files to the OBS bucket.</span><p><div class="p" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_p73071659115311">Perform the following steps if the backup file size does not exceed 5 GB:<ol type="a" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_ol17307059105315"><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li11425644112117">In the bucket list, click the name of the created bucket.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li6425134472111">In the navigation pane, choose <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b2037028687">Objects</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li8425844162114">On the <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b2088588249">Objects</strong> tab page, click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b1409091267">Upload Object</strong>.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516">Upload the objects.<p id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_p2092314104615"><a name="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516"></a><a name="dcs-migration-190703002_dcs-ug-0312037_en-us_topic_0179456697_dcs-migration-190703002_li4601227114516"></a>To upload objects, drag files or folders to the <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b1459915347">Upload Object</strong> area or click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b1648442873">add file</strong>. A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB.</p>
<div class="fignone" id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_fig184786179256"><span class="figcap"><b>Figure 1 </b>Uploading an object</span><br><span><img id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_image174788172258" src="en-us_image_0000001634759086.png"></span></div>
</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li29854713516">(Optional) Select <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b859379742">KMS encryption</strong> to encrypt the file you want to upload.</li><li id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_li103071459205315">Click <strong id="dcs-migration-0312004__dcs-migration-190703002_dcs-ug-0312037_b2373124572710">Upload</strong>.</li></ol>
</div>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312004__dcs-migration-190703002_section9876193816277"><h4 class="sectiontitle">Step 3: Create a Migration Task</h4><ol id="dcs-migration-0312004__dcs-migration-190703002_ol81391154144716"><li id="dcs-migration-0312004__dcs-migration-190703002_li390016374490"><span>Log in to the DCS console.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li16119587498"><span>In the navigation pane, choose <strong id="dcs-migration-0312004__dcs-migration-190703002_b5554182981516">Data Migration</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li67372014165120"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b826716383275">Create Backup Import Task</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li14133134613500"><span>Enter the task name and description.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li7814624195313"><span>In the <strong id="dcs-migration-0312004__dcs-migration-190703002_b1378581610478">Source Redis</strong> area, select <strong id="dcs-migration-0312004__dcs-migration-190703002_b19787171684717">OBS Bucket</strong> for <strong id="dcs-migration-0312004__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-0312004__dcs-migration-190703002_li1281412951215"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b32581745481">Add Backup</strong> and select the backup files to be migrated.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li1264738143811"><span>In the <strong id="dcs-migration-0312004__dcs-migration-190703002_b7459123818489">Target Redis</strong> area, select the <strong id="dcs-migration-0312004__dcs-migration-190703002_b81601464910">Target Redis Instance</strong> prepared in <a href="#dcs-migration-0312004__dcs-migration-190703002_section1128152020384">Step 1: Prepare the Target DCS Redis Instance</a>.</span></li><li id="dcs-migration-0312004__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-0312004__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__dcs-migration-190703002_b177974334911">Test Connection</strong> directly.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li949595110140"><span>Click <strong id="dcs-migration-0312004__dcs-migration-190703002_b423713107215">Next</strong>.</span></li><li id="dcs-migration-0312004__dcs-migration-190703002_li139913717619"><span>Confirm the migration task details and click <strong id="dcs-migration-0312004__dcs-migration-190703002_b17364942162218">Submit</strong>.</span><p><p id="dcs-migration-0312004__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__dcs-migration-190703002_b38116245234">Successful</strong>.</p>
</p></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>
</div>
</div>

View File

@ -0,0 +1,27 @@
<a name="dcs-migration-0312005"></a><a name="dcs-migration-0312005"></a>
<h1 class="topictitle1">Migrating Redis Data from Another Cloud to DCS</h1>
<div id="body1605605684737"><p id="dcs-migration-0312005__p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-0312006.html">Online Migration from Another Cloud</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-1117001.html">Backup Migration from Another Cloud</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-090626001_0.html">Online Migration with Rump</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-1117003.html">Offline Migration of Redis Cluster from Another Cloud with redis-shake</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migrate-0220411.html">Online Full Migration of Redis from Another Cloud with redis-shake</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-230313.html">Data Migration Guide</a></div>
</div>
</div>

View File

@ -0,0 +1,72 @@
<a name="dcs-migration-0312006"></a><a name="dcs-migration-0312006"></a>
<h1 class="topictitle1">Online Migration from Another Cloud</h1>
<div id="body1605611574151"><div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section113421435300"><h4 class="sectiontitle">Application Scenarios</h4><p id="dcs-migration-0312006__dcs-migration-190703003_p1244713381103">If the source and target instances are interconnected and the <strong id="dcs-migration-0312006__dcs-migration-190703003_b18112161719418">SYNC</strong> and <strong id="dcs-migration-0312006__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.</p>
<div class="caution" id="dcs-migration-0312006__dcs-migration-190703003_note8576142111415"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><ul id="dcs-migration-0312006__dcs-migration-190703003_ul12488164523510"><li id="dcs-migration-0312006__dcs-migration-190703003_li3488545193514">If the <strong id="dcs-migration-0312006__dcs-migration-190703003_b18144137133010">SYNC</strong> and <strong id="dcs-migration-0312006__dcs-migration-190703003_b11144475309">PSYNC</strong> commands are disabled on the source Redis instance, enable them before performing online migration. Otherwise, the migration fails. If you use a DCS Redis instance for online migration, the <strong id="dcs-migration-0312006__dcs-migration-190703003_b814416793016">SYNC</strong> command is automatically enabled.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li10440349183519">You cannot use public networks for online migration.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li14846184712514">During online migration, you are advised to set <strong id="dcs-migration-0312006__dcs-migration-190703003_b9548141910176">repl-timeout</strong> on the source instance to 300s and <strong id="dcs-migration-0312006__dcs-migration-190703003_b16885030121716">client-output-buffer-limit</strong> to 20% of the maximum memory of the instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li665420105315">The source must be Redis 3.0 or later.</li></ul>
</div></div>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section77251317153217"><h4 class="sectiontitle">Impacts on Services</h4><p id="dcs-migration-0312006__dcs-migration-190703003_p5721132883218">During online migration, data is essentially synchronized in full to a new replica. Therefore, perform online migration during low-demand hours.</p>
</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></ul>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section760319488490"><h4 class="sectiontitle">Step 1: Obtain the Source Redis Address</h4><p id="dcs-migration-0312006__dcs-migration-190703003_p136671818181819">Obtain the IP address/domain name and port number of the source Redis instance.</p>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section1128152020384"><h4 class="sectiontitle">Step 2: Prepare the Target DCS Redis Instance</h4><ul id="dcs-migration-0312006__dcs-migration-190703003_ul727834515383"><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, but you need 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-0312006__dcs-migration-190703003_p49291961936">If the target instance data is not cleared before the migration and the source and target instances contain the same key, the key in the target instance will be overwritten by the key in the source instance after the migration.</p>
</li></ul>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section84284075116"><h4 class="sectiontitle">Step 3: Check 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_section157769524519">Step 4: Create an 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_section157769524519">Step 4: Create an 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>Perform the following operations to establish the network.</span><p><ul id="dcs-migration-0312006__dcs-migration-190703003_ul17325432414"><li id="dcs-migration-0312006__dcs-migration-190703003_li7271615152516">If the source and target Redis instances are <span id="dcs-migration-0312006__dcs-migration-190703003_ph749662795514">in the same DCS region</span>, create a VPC peering connection by referring to "VPC Peering Connection" in the <em id="dcs-migration-0312006__dcs-migration-190703003_i4602173825519">Virtual Private Cloud User Guide</em>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1073215431842">If the source and target Redis instances are on different clouds or in different regions, create a connection by referring to the <em id="dcs-migration-0312006__dcs-migration-190703003_i22974405618">Direct Connect User Guide</em>.</li></ul>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section157769524519"><a name="dcs-migration-0312006__dcs-migration-190703003_section157769524519"></a><a name="dcs-migration-190703003_section157769524519"></a><h4 class="sectiontitle">Step 4: Create 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.</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_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></li><li id="dcs-migration-0312006__dcs-migration-190703003_li114411588467"><span>Configure the VPC, subnet, and security group for the migration task.</span><p><p id="dcs-migration-0312006__dcs-migration-190703003_p473111475510">The VPC, subnet, and security group facilitate the migration. Ensure that the migration resources can access the source and target Redis instances.</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_li13308204111130">The online migration task uses a tenant IP address (<strong id="dcs-migration-0312006__dcs-migration-190703003_b197811218123710">Migration ECS</strong> displayed on the <strong id="dcs-migration-0312006__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>
</p></li></ol>
</div>
<div class="section" id="dcs-migration-0312006__dcs-migration-190703003_section14919536272"><h4 class="sectiontitle">Step 5: Configure 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_b8239202416317">Online Migration</strong> tab page, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b983115204312">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="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.8.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.8.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.8.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.8.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.8.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.8.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_b16552211111311">Migrating</strong> until you click <strong id="dcs-migration-0312006__dcs-migration-190703003_b65201171131">Stop</strong> in the <strong id="dcs-migration-0312006__dcs-migration-190703003_b5355163610593">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>
</tbody>
</table>
</div>
<div class="fignone" id="dcs-migration-0312006__dcs-migration-190703003_fig23511729101218"><span class="figcap"><b>Figure 1 </b>Selecting the migration type</span><br><span><img id="dcs-migration-0312006__dcs-migration-190703003_image2036555461718" src="en-us_image_0291862872.png"></span></div>
</p></li><li id="dcs-migration-0312006__dcs-migration-190703003_li974533414185"><span>Configure source Redis and target Redis.</span><p><ol type="a" id="dcs-migration-0312006__dcs-migration-190703003_ol128193366190"><li id="dcs-migration-0312006__dcs-migration-190703003_li5121433171911">The Redis type can be <strong id="dcs-migration-0312006__dcs-migration-190703003_b1093945910">Redis in the cloud</strong> or <strong id="dcs-migration-0312006__dcs-migration-190703003_b431181211911">Self-hosted Redis</strong> as required.<ul id="dcs-migration-0312006__dcs-migration-190703003_ul445012114211"><li id="dcs-migration-0312006__dcs-migration-190703003_li184511719217"><strong id="dcs-migration-0312006__dcs-migration-190703003_b3442183942010">Redis in the cloud</strong>: a DCS Redis instance (source or target) that is in the same VPC as the migration task. If you select this option, specify a DCS Redis instance.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li127821877221"><strong id="dcs-migration-0312006__dcs-migration-190703003_b1967218566215">Self-hosted Redis</strong>: a DCS Redis instance, Redis in another cloud, or self-hosted Redis. If you select this option, enter Redis addresses.</li></ul>
</li><li id="dcs-migration-0312006__dcs-migration-190703003_li13145145319231">If the instance is password-protected, click <strong id="dcs-migration-0312006__dcs-migration-190703003_b164631019236">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_b54195135235">Test Connection</strong> directly.</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_b15447174915118">Successful</strong>.</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_li3321952195412">Once incremental migration starts, it remains <strong id="dcs-migration-0312006__dcs-migration-190703003_b12386152711">Migrating</strong> until you click <strong id="dcs-migration-0312006__dcs-migration-190703003_b0238101515715">Stop</strong>.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li23211252175420">To 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_b230619112814">Stop</strong> above the instance list.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li1912563853615">After data migration, duplicate keys will be overwritten.</li></ul>
</div></div>
<p id="dcs-migration-0312006__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_b1024662118283">Migration Logs</strong> page.</p>
</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_p1571161034711">After the migration is complete, use redis-cli to connect the source and target Redis instances to check data integrity.</p>
<ol id="dcs-migration-0312006__dcs-migration-190703003_ol11257313194715"><li id="dcs-migration-0312006__dcs-migration-190703003_li94593118471">Connect to the source Redis and the target Redis.</li><li id="dcs-migration-0312006__dcs-migration-190703003_li10257713154717">Run the <strong id="dcs-migration-0312006__dcs-migration-190703003_b5674145372816">info keyspace</strong> command to check the values of <strong id="dcs-migration-0312006__dcs-migration-190703003_b6780111112291">keys</strong> and <strong id="dcs-migration-0312006__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>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-0312005.html">Migrating Redis Data from Another Cloud to DCS</a></div>
</div>
</div>

View File

@ -0,0 +1,18 @@
<a name="dcs-migration-0312007"></a><a name="dcs-migration-0312007"></a>
<h1 class="topictitle1">Migrating Data from DCS to Self-Hosted Redis</h1>
<div id="body1522316340539"><div class="section" id="dcs-migration-0312007__section121241237151615"><h4 class="sectiontitle">Scenario</h4><p id="dcs-migration-0312007__p728264411616">You can use the online migration function of the DCS console to migrate DCS Redis instances to your self-hosted Redis. You can also export the DCS instance data to an RDB file and import it to local or self-hosted Redis.</p>
</div>
<div class="section" id="dcs-migration-0312007__section823282683416"><h4 class="sectiontitle">Recommended Solutions</h4><ul id="dcs-migration-0312007__ul146877230392"><li id="dcs-migration-0312007__li79463226563">Online migration on the DCS console<p id="dcs-migration-0312007__p191215426567"><a name="dcs-migration-0312007__li79463226563"></a><a name="li79463226563"></a>For details, see <a href="dcs-migration-190703003.html">Online Migration of Self-Hosted Redis</a>. Select <strong id="dcs-migration-0312007__b191027113344">Self-hosted Redis</strong> and enter the target Redis address when configuring the target Redis.</p>
</li><li id="dcs-migration-0312007__li1268742313396">Use redis-cli or the DCS console to export the DCS instance data to an RDB file, and then use redis-shake to import the file to the target.<p id="dcs-migration-0312007__p1059121862218"><a name="dcs-migration-0312007__li1268742313396"></a><a name="li1268742313396"></a>For details about how to install and use redis-shake, see <a href="dcs-migrate-demo02.html">Self-Hosted Redis Cluster Migration with redis-shake</a> and <a href="https://github.com/alibaba/RedisShake/blob/release-v2.1.1-20210903/conf/redis-shake.conf" target="_blank" rel="noopener noreferrer">redis-shake configuration instructions</a>.</p>
</li></ul>
<ul id="dcs-migration-0312007__ul1962111468814"><li id="dcs-migration-0312007__li462194615818">Rump<p id="dcs-migration-0312007__p106751953891"><a name="dcs-migration-0312007__li462194615818"></a><a name="li462194615818"></a>This tool is recommended for online migration if possible. For details, see <a href="dcs-migration-090626001_0.html">Online Migration with Rump</a>.</p>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-230313.html">Data Migration Guide</a></div>
</div>
</div>

View File

@ -0,0 +1,17 @@
<a name="dcs-migration-0312008"></a><a name="dcs-migration-0312008"></a>
<h1 class="topictitle1">Migrating Data Between DCS Instances</h1>
<div id="body1522317011304"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dcs-migration-0312003.html">Online Migration Between DCS Redis Instances</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="dcs-migration-0312004.html">Backup Migration Between Regions or Redis Versions</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-migration-230313.html">Data Migration Guide</a></div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More