Files
doc-exports/docs/mrs/umn/admin_guide_000359.html
Yang, Tong 2195db241c MRS UMN 20231220 version update
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Rechenburg, Matthias <matthias.rechenburg@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-05-16 09:40:21 +00:00

31 lines
12 KiB
HTML

<a name="admin_guide_000359"></a><a name="admin_guide_000359"></a>
<h1 class="topictitle1">Restoring ClickHouse Service Data</h1>
<div id="body0000001197448271"><div class="section" id="admin_guide_000359__s94c084b9af5f4af4bc43be409b101b1a"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000359__en-us_topic_0046736775_p60353288">ClickHouse data needs to be restored in the following scenarios: Data is modified or deleted unexpectedly and needs to be restored. After a user performs major operations (such as upgrade and migration) on ClickHouse, an exception occurs or the expected result is not achieved. All modules are faulty and become unavailable. Data is migrated to a new cluster.</p>
<p id="admin_guide_000359__en-us_topic_0046736775_p6308685">Users can create a ClickHouse restoration task on <span id="admin_guide_000359__text67509419010">MRS</span> Manager to restore data. Only manual restoration tasks are supported.</p>
<p id="admin_guide_000359__en-us_topic_0046736775_p56778172">The ClickHouse backup and restoration functions cannot identify the service and structure relationships of objects such as ClickHouse tables, indexes, and views. When executing backup and restoration tasks, you need to manage unified restoration points based on service scenarios to ensure proper service running.</p>
<div class="notice" id="admin_guide_000359__en-us_topic_0046736775_note35629183"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="admin_guide_000359__en-us_topic_0046736775_ul52227199"><li id="admin_guide_000359__li15772143813296">This function is supported only by MRS 3.1.0 or later.</li><li id="admin_guide_000359__li1477269716310">Data restoration can be performed only when the system version is consistent with that during data backup.</li><li id="admin_guide_000359__en-us_topic_0046736775_li282748">To restore the data when services are normal, manually back up the latest management data first and then restore the data. Otherwise, the ClickHouse data that is generated after the data backup and before the data restoration will be lost.</li><li id="admin_guide_000359__li3423115342812">ClickHouse metadata restoration and service data restoration cannot be performed at the same time. Otherwise, service data restoration fails. You are advised to restore service data after metadata restoration is complete.</li></ul>
</div></div>
</div>
<div class="section" id="admin_guide_000359__s618fe949ea1640cdb33e6226d3911c36"><h4 class="sectiontitle">Impact on the System</h4><ul id="admin_guide_000359__en-us_topic_0046736775_ul43172670"><li id="admin_guide_000359__en-us_topic_0046736775_li53009716">During data restoration, user authentication stops and users cannot create new connections.</li><li id="admin_guide_000359__en-us_topic_0046736775_li7325396">After the data is restored, the data generated after the data backup and before the data restoration is lost.</li><li id="admin_guide_000359__en-us_topic_0046736775_li65928569">After the data is restored, the ClickHouse upper-layer applications need to be started.</li></ul>
</div>
<div class="section" id="admin_guide_000359__s76ce034334fb42f485c3c9c645d9aad9"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000359__ul1222213533213"><li id="admin_guide_000359__l6b2ccbf0a54a4d7994c8b888340d4fc3">If you need to restore data from a remote HDFS, prepare a standby cluster. If the active cluster is deployed in security mode and the active and standby clusters are not managed by the same <span id="admin_guide_000359__text113927129178">MRS</span> Manager, mutual trust must be configured. For details, see <a href="admin_guide_000177.html">Configuring Cross-Manager Mutual Trust Between Clusters</a>. If the active cluster is deployed in normal mode, no mutual trust is required.</li></ul>
<ul id="admin_guide_000359__en-us_topic_0046736775_ul38613850"><li id="admin_guide_000359__en-us_topic_0046736775_li18517169">Time is consistent between the active and standby clusters and the NTP services on the active and standby clusters use the same time source.</li><li id="admin_guide_000359__en-us_topic_0046736775_li32436794">The database for storing restored data tables, the HDFS save path of data tables, and the list of users who can access restored data are planned.</li><li id="admin_guide_000359__en-us_topic_0046736775_li23495697">The ClickHouse backup file save path is correct.</li><li id="admin_guide_000359__en-us_topic_0046736775_li10134686">The ClickHouse upper-layer applications are stopped.</li><li id="admin_guide_000359__en-us_topic_0046736775_li24103314">You have logged in to <span id="admin_guide_000359__text1097901341710">MRS</span> Manager. For details, see <a href="admin_guide_000004.html">Logging In to MRS Manager</a>.</li></ul>
</div>
<div class="section" id="admin_guide_000359__section10398311599"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000359__ol1323744816521"><li id="admin_guide_000359__li2113658016521"><span>On <span id="admin_guide_000359__text1336921591712">MRS</span> Manager, choose <strong id="admin_guide_000359__b94259598233345">O&amp;M</strong> &gt; <strong id="admin_guide_000359__b117274930133345">Backup and Restoration</strong> &gt; <strong id="admin_guide_000359__b85034903233345">Backup Management</strong>.</span></li><li id="admin_guide_000359__li6526329016521"><span>In the row where the specified backup task is located, choose <strong id="admin_guide_000359__b78944681872749">More</strong> &gt; <strong id="admin_guide_000359__b199441400172749">View History</strong> in the <strong id="admin_guide_000359__b131691340272749">Operation</strong> column to display the historical execution records of the backup task.</span><p><p class="litext" id="admin_guide_000359__p3434142316521">In the window that is displayed, select a success record and click <strong id="admin_guide_000359__b42753262093">View</strong> in the <strong id="admin_guide_000359__b1328262618914">Backup Path</strong> column to view its backup path information and find the following information:</p>
<ul class="subitemlist" id="admin_guide_000359__ul2962109816521"><li id="admin_guide_000359__li4063735216521"><strong id="admin_guide_000359__b109432411154041">Backup Object</strong>: indicates the backup data source.</li><li id="admin_guide_000359__li329123316521"><strong id="admin_guide_000359__b64455961954041">Backup Path</strong>: indicates the full path where backup files are stored.<p id="admin_guide_000359__p3019185416521">Select the correct path, and manually copy the full path of backup files in <strong id="admin_guide_000359__b205498794872749">Backup Path</strong>.</p>
</li></ul>
</p></li><li id="admin_guide_000359__li5049869816521"><span>On <span id="admin_guide_000359__text3723316131717">MRS</span> Manager, choose <strong id="admin_guide_000359__b99040068433345">O&amp;M</strong> &gt; <strong id="admin_guide_000359__b135594996333345">Backup and Restoration</strong> &gt; <strong id="admin_guide_000359__b149380039233345">Restoration Management</strong>.</span></li><li id="admin_guide_000359__li5183509916521"><span>Click <strong id="admin_guide_000359__b18134078554041">Create</strong>.</span></li><li id="admin_guide_000359__li6386271016521"><span>Set <strong id="admin_guide_000359__b72902683154041">Task Name</strong> to the name of the restoration task.</span></li><li id="admin_guide_000359__li1696835325016"><span>Select the cluster to be operated from <strong id="admin_guide_000359__b164530188554041">Recovery Object</strong>.</span></li><li id="admin_guide_000359__li3789348516521"><span>In <strong id="admin_guide_000359__b1683714130447">Restoration Configuration</strong>, select <strong id="admin_guide_000359__b38371713144415">ClickHouse</strong> under <strong id="admin_guide_000359__b1083781354414">Service data</strong>.</span></li><li id="admin_guide_000359__li4457996415256"><a name="admin_guide_000359__li4457996415256"></a><a name="li4457996415256"></a><span>Set <strong id="admin_guide_000359__b118998212572749">Path Type</strong> of <strong id="admin_guide_000359__b162436773272749">ClickHouse</strong> to a backup directory type.</span><p><p class="litext" id="admin_guide_000359__p1596050715256">Currently, the backup directory supports only the <strong id="admin_guide_000359__b72704713472749">RemoteHDFS</strong> type.</p>
<ul class="subitemlist" id="admin_guide_000359__u695c04bfc9fd4e808744a464ebe243f6"><li id="admin_guide_000359__li91196523481"><strong id="admin_guide_000359__b1203850970">RemoteHDFS</strong>: indicates that the backup files are stored in the HDFS directory of the standby cluster. If you select this value option, you also need to configure the following parameters:<ul id="admin_guide_000359__ul55417479485"><li id="admin_guide_000359__li105419474485"><strong id="admin_guide_000359__b1104921285">Source NameService Name</strong>: <span id="admin_guide_000359__text1697774345">indicates the NameService name of the backup data cluster, for example, <strong id="admin_guide_000359__b1198309395">hacluster</strong>.</span> You can obtain it from the <strong id="admin_guide_000359__b777108841">NameService Management</strong> page of HDFS of the standby cluster.</li><li id="admin_guide_000359__li1254947134815"><strong id="admin_guide_000359__b383708174">IP Mode</strong>: indicates the mode of the target IP address. The system automatically selects the IP address mode based on the cluster network type, for example, <strong id="admin_guide_000359__b2103129019">IPv4</strong> or <strong id="admin_guide_000359__b557851521">IPv6</strong>.</li><li id="admin_guide_000359__li954154754810"><strong id="admin_guide_000359__b103441536143216">Source NameNode IP Address</strong>: indicates the IP address of the NameNode service plane in the standby cluster. It can be of an active or standby node.</li><li id="admin_guide_000359__li354047104819">Source Path: indicates the full path of HDFS directory for storing backup data of the standby cluster. For details, see the <strong id="admin_guide_000359__b1379163818141">Backup Path</strong> obtained in step 2, for example, <em id="admin_guide_000359__i1540517949">Backup path/Backup task name_Data source_Task creation time</em>.</li><li id="admin_guide_000359__li1034142914513"><strong id="admin_guide_000359__b968824153219">Maximum Number of Maps</strong>: indicates the maximum number of maps in a MapReduce task. The default value is <strong id="admin_guide_000359__b106908415323">20</strong>.</li><li id="admin_guide_000359__li1846173712519"><strong id="admin_guide_000359__b108091345203216">Maximum Bandwidth of a Map (MB/s)</strong>: indicates the maximum bandwidth of a map. The default value is <strong id="admin_guide_000359__b148111645203220">100</strong>.</li></ul>
</li></ul>
</p></li><li id="admin_guide_000359__li2745011616521"><span>Click <strong id="admin_guide_000359__b63753313954041">OK</strong>.</span></li><li id="admin_guide_000359__li147082716521"><span>In the restoration task list, locate the row where the created task is located, and click <strong id="admin_guide_000359__b49815261239">Start</strong> in the <strong id="admin_guide_000359__b16981126192317">Operation</strong> column.</span><p><ul id="admin_guide_000359__ul5981574816521"><li id="admin_guide_000359__li886695516521">After the restoration is successful, the progress bar is in green.</li><li id="admin_guide_000359__li1269373116521">After the restoration is successful, the restoration task cannot be executed again.</li><li id="admin_guide_000359__li2155927516521">If the restoration task fails during the first execution, rectify the fault and click <strong id="admin_guide_000359__b174923175654041">Retry</strong> to execute the task again.</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="admin_guide_000215.html">Recovering Data</a></div>
</div>
</div>