forked from docs/doc-exports
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>
21 lines
3.8 KiB
HTML
21 lines
3.8 KiB
HTML
<a name="dcs-migration-0312019"></a><a name="dcs-migration-0312019"></a>
|
|
|
|
<h1 class="topictitle1">What Are the Constraints and Precautions for Migrating Redis Data to a Cluster Instance?</h1>
|
|
<div id="body8662426"><ul id="dcs-migration-0312019__dcs-migration-0312019_0_ul15481351123612"><li id="dcs-migration-0312019__dcs-migration-0312019_0_li1948155118360">Proxy Cluster instances<p id="dcs-migration-0312019__dcs-migration-0312019_0_p122980019458"><a name="dcs-migration-0312019__dcs-migration-0312019_0_li1948155118360"></a><a name="dcs-migration-0312019_0_li1948155118360"></a>Proxy Cluster instances are used in the same way that you use single-node or master/standby instances. However, only one DB is configured for a Proxy Cluster instance by default, and the <strong id="dcs-migration-0312019__dcs-migration-0312019_0_b12467931171013">SELECT</strong> command is not supported. When data files are imported in batches, an error message will be displayed and ignored if the <strong id="dcs-migration-0312019__dcs-migration-0312019_0_b1857014531937">SELECT</strong> command exists. Then, the remaining data will continue to be imported.</p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p167821210184115">Example:</p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p4452101315411">DB 0 and DB 2 in the source Redis instance contain data, and the generated AOF or RDB file contains these two DBs.</p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p1601134185213">When the source Redis data is imported into a Proxy Cluster DCS instance, the <strong id="dcs-migration-0312019__dcs-migration-0312019_0_b127261542141018">SELECT 2</strong> command will be ignored, and then data in DB 2 in the source Redis instance will be imported.</p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p9601149175816">Note that:</p>
|
|
<ul id="dcs-migration-0312019__dcs-migration-0312019_0_ul03521563718"><li id="dcs-migration-0312019__dcs-migration-0312019_0_li10411423180">If different DBs in the source Redis instance contain the same keys, values of keys in the DB with the largest ID will overwrite those in the other DBs.</li><li id="dcs-migration-0312019__dcs-migration-0312019_0_li163527563717">If the source Redis instance contains multiple DBs, data is stored in the same DB after being migrated to a cluster DCS instance, and the <strong id="dcs-migration-0312019__dcs-migration-0312019_0_b997762792213">SELECT</strong> command is not supported. In this case, modify the configurations for your services.</li></ul>
|
|
</li><li id="dcs-migration-0312019__dcs-migration-0312019_0_li8481155114365">Redis Cluster instances<p id="dcs-migration-0312019__dcs-migration-0312019_0_p156281544153816"><a name="dcs-migration-0312019__dcs-migration-0312019_0_li8481155114365"></a><a name="dcs-migration-0312019_0_li8481155114365"></a>Only one DB is configured for a Redis Cluster instance. Data is migrated to a Redis Cluster instance in a different way from other types of instances. Nodes in the shards of a Redis Cluster must be connected separately through clients. Data is imported to the nodes separately. Run the following command to query the IP addresses of the cluster nodes:</p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p1654462342611"><strong id="dcs-migration-0312019__dcs-migration-0312019_0_b19264216193218">redis-cli -h <em id="dcs-migration-0312019__dcs-migration-0312019_0_i7893733141512">{Redis Cluster IP}</em> -p 6379 -a <em id="dcs-migration-0312019__dcs-migration-0312019_0_i1994617429153">{password}</em> cluster nodes</strong></p>
|
|
<p id="dcs-migration-0312019__dcs-migration-0312019_0_p1446191953213">In the returned list of IP addresses, record the ones marked by "master".</p>
|
|
</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>
|
|
|