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>
20 lines
3.0 KiB
HTML
20 lines
3.0 KiB
HTML
<a name="dcs-faq-0730036"></a><a name="dcs-faq-0730036"></a>
|
|
|
|
<h1 class="topictitle1">How Do I Clear Redis Data?</h1>
|
|
<div id="body1596093494759"><p id="dcs-faq-0730036__p1554181735816"><strong id="dcs-faq-0730036__b13826131015254">Exercise caution when clearing data.</strong></p>
|
|
<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 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__b19434487295">FLUSHDB</strong> or <strong id="dcs-faq-0730036__b0434787291">FLUSHALL</strong> command in redis-cli, use the data clearing function on the DCS console, or run the <strong id="dcs-faq-0730036__b1343411815297">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__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>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-190921003.html">Redis Commands</a></div>
|
|
</div>
|
|
</div>
|
|
|