forked from docs/doc-exports
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>
32 lines
11 KiB
HTML
32 lines
11 KiB
HTML
<a name="admin_guide_000358"></a><a name="admin_guide_000358"></a>
|
|
|
|
<h1 class="topictitle1">Restoring ClickHouse Metadata</h1>
|
|
<div id="body0000001151408710"><div class="section" id="admin_guide_000358__section60718452105032"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000358__p19444133358">ClickHouse metadata 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 ZooKeeper, an exception occurs or the expected result is not achieved. The ClickHouse component is faulty and becomes unavailable. Data is migrated to a new cluster.</p>
|
|
<p id="admin_guide_000358__p14705182843010">Users can create a ClickHouse restoration task on <span id="admin_guide_000358__text67509419010">MRS</span> Manager. Only manual restoration tasks are supported.</p>
|
|
<div class="notice" id="admin_guide_000358__note580295105032"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="admin_guide_000358__ul35398010105032"><li id="admin_guide_000358__li15772143813296">This function is supported only by MRS 3.1.0 or later.</li><li id="admin_guide_000358__li35651622155541">Data restoration can be performed only when the system version is consistent with that during data backup.</li><li id="admin_guide_000358__en-us_topic_0046736773_li35796480">To restore ClickHouse metadata when the service is running properly, you are advised to manually back up the latest ClickHouse metadata before restoration. Otherwise, the ClickHouse metadata that is generated after the data backup and before the data restoration will be lost.</li><li id="admin_guide_000358__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_000358__section16795761105032"><h4 class="sectiontitle">Impact on the System</h4><ul id="admin_guide_000358__ul18676623105032"><li id="admin_guide_000358__li716761410533">After the metadata is restored, the data generated after the data backup and before the data restoration is lost.</li><li id="admin_guide_000358__en-us_topic_0046736773_li63196939">After the metadata is restored, the ClickHouse upper-layer applications need to be started.</li></ul>
|
|
</div>
|
|
<div class="section" id="admin_guide_000358__section38869976105032"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000358__en-us_topic_0046736773_ul18678419"><li id="admin_guide_000358__en-us_topic_0046736773_li27480077">You have checked the path for storing ClickHouse metadata backup files.</li><li id="admin_guide_000358__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_000358__text75931665173">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>
|
|
</div>
|
|
<div class="section" id="admin_guide_000358__section32403411525"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000358__ol31006046105032"><li id="admin_guide_000358__li12320634105032"><span>On <span id="admin_guide_000358__text5858778171">MRS</span> Manager, choose <strong id="admin_guide_000358__b155632651454041">O&M</strong> > <strong id="admin_guide_000358__b15000728654041">Backup and Restoration</strong> > <strong id="admin_guide_000358__b211985791054041">Backup Management</strong>.</span></li><li id="admin_guide_000358__li13361230105032"><span>In the <strong id="admin_guide_000358__b6211881411">Operation</strong> column of the specified task in the task list, choose <strong id="admin_guide_000358__b527188171416">More</strong> > <strong id="admin_guide_000358__b8270812145">View History</strong>.</span><p><p class="litext" id="admin_guide_000358__a1eed586b104947faab576bb3bc7900f7">In the window that is displayed, select a success record and click <strong id="admin_guide_000358__b136349161914">View</strong> in the <strong id="admin_guide_000358__b186358161495">Backup Path</strong> column to view its backup path information and find the following information:</p>
|
|
<ul class="subitemlist" id="admin_guide_000358__u1dc509486adb4ae8940b219d931db832"><li id="admin_guide_000358__l0b6056a0d39c4757becb4640f3c903ec"><strong id="admin_guide_000358__b109432411154041">Backup Object</strong>: indicates the backup data source.</li><li id="admin_guide_000358__le6e5460ee82c437294e59a24c6e760dc"><strong id="admin_guide_000358__b64455961954041">Backup Path</strong>: indicates the full path where backup files are stored.<p id="admin_guide_000358__afb3a9a49a9104a038791837dcde40ac2">Select the correct path, and manually copy the full path of backup files in <strong id="admin_guide_000358__b9615415153">Backup Path</strong>.</p>
|
|
</li></ul>
|
|
</p></li><li id="admin_guide_000358__li62627246105032"><span>On <span id="admin_guide_000358__text924611910174">MRS</span> Manager, choose <strong id="admin_guide_000358__b1405180217621">O&M</strong> > <strong id="admin_guide_000358__b4768552137621">Backup and Restoration</strong> > <strong id="admin_guide_000358__b6541738367621">Restoration Management</strong>.</span></li><li id="admin_guide_000358__li62165674105032"><span>Click <strong id="admin_guide_000358__b18134078554041">Create</strong>.</span></li><li id="admin_guide_000358__li34009756105032"><span>Set <strong id="admin_guide_000358__b72902683154041">Task Name</strong> to the name of the restoration task.</span></li><li id="admin_guide_000358__li1696835325016"><span>Select the cluster to be operated from <strong id="admin_guide_000358__b164530188554041">Recovery Object</strong>.</span></li><li id="admin_guide_000358__li61329238105032"><span>In <strong id="admin_guide_000358__b585185127621">Restoration Configuration</strong>, select <strong id="admin_guide_000358__b3289943367621">ClickHouse</strong> under <strong id="admin_guide_000358__b20235604487621">Metadata and other data</strong>.</span></li><li id="admin_guide_000358__li50096053105032"><span>Set <strong id="admin_guide_000358__b8517123471510">Path Type</strong> of <strong id="admin_guide_000358__b4523193411157">ClickHouse</strong> to a restoration directory type.</span><p><p class="litext" id="admin_guide_000358__p35960371105032">The configurations vary based on backup directory types:</p>
|
|
<ul class="subitemlist" id="admin_guide_000358__ul46098990105032"><li class="subitemlist" id="admin_guide_000358__li1180814331562"><strong id="admin_guide_000358__b9817083697621">LocalDir</strong>: indicates that data is restored from the local disk of the active management node.<p class="subitemlist" id="admin_guide_000358__p1896619205201">If you select this value, you also need to configure the following parameters:</p>
|
|
<ul id="admin_guide_000358__ul65313462016"><li class="subitemlist" id="admin_guide_000358__li20161163112201"><strong id="admin_guide_000358__b11781157164917">Source Path</strong>: backup file to be restored, for example, <em id="admin_guide_000358__i12697165685013">Backup task name</em><strong id="admin_guide_000358__b85919055114">_</strong><em id="admin_guide_000358__i12200375114">Data source</em><strong id="admin_guide_000358__b1523287145112">_</strong><em id="admin_guide_000358__i7745612115118">Task execution time</em><strong id="admin_guide_000358__b18549171818515">.tar.gz</strong>.</li><li id="admin_guide_000358__li128753619205"><strong id="admin_guide_000358__b1511452515113">Logical Cluster</strong>: <span id="admin_guide_000358__text1647020145223">Enter the ClickHouse logical cluster whose data has been backed up</span>.</li></ul>
|
|
</li><li class="subitemlist" id="admin_guide_000358__li4956173515619"><strong id="admin_guide_000358__b14330174767621">RemoteHDFS</strong>: indicates that data is restored from the HDFS directory of the standby cluster.<div class="subitemlist" id="admin_guide_000358__p1638616152462">If you select this value option, you also need to configure the following parameters:<ul id="admin_guide_000358__ul48664874618"><li id="admin_guide_000358__li2086618813467"><strong id="admin_guide_000358__b911277757">Source NameService Name</strong>: <span id="admin_guide_000358__text312218793">indicates the NameService name of the backup data cluster, for example, <strong id="admin_guide_000358__b204867777">hacluster</strong>.</span> You can obtain it from the <strong id="admin_guide_000358__b908207994">NameService Management</strong> page of HDFS of the standby cluster.</li><li id="admin_guide_000358__li886778174615"><strong id="admin_guide_000358__b1089351560">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_000358__b506422691">IPv4</strong> or <strong id="admin_guide_000358__b1475726912">IPv6</strong>.</li><li id="admin_guide_000358__li178671489467"><strong id="admin_guide_000358__b87194914243">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_000358__li1786818144613"><strong id="admin_guide_000358__b1048069061">Source Path</strong>: indicates the full path of HDFS directory for storing backup data of the standby cluster, for example, <em id="admin_guide_000358__i1131683616">Backup path/Backup task name_Data source_Task creation time/Data source_Task execution time</em><strong id="admin_guide_000358__b316034283">.tar.gz</strong>.</li></ul>
|
|
</div>
|
|
</li></ul>
|
|
</p></li><li id="admin_guide_000358__li60000102105032"><span>Click <strong id="admin_guide_000358__b63753313954041">OK</strong>.</span></li><li id="admin_guide_000358__li36127580105032"><span>In the restoration task list, locate the row where the created task is located, and click <strong id="admin_guide_000358__b19246465192">Start</strong> in the <strong id="admin_guide_000358__b1024174619198">Operation</strong> column. In the displayed dialog box, click <strong id="admin_guide_000358__b1331124831811">OK</strong> to start the restoration task.</span><p><ul id="admin_guide_000358__ul11671751105032"><li id="admin_guide_000358__li40888218105032">After the restoration is successful, the progress bar is in green.</li><li id="admin_guide_000358__li11153371105032">After the restoration is successful, the restoration task cannot be executed again.</li><li id="admin_guide_000358__li9266991105032">If the restoration task fails during the first execution, rectify the fault and click <strong id="admin_guide_000358__b174923175654041">Retry</strong> to execute the task again.</li></ul>
|
|
</p></li><li id="admin_guide_000358__li161631228111615"><span>Choose <strong id="admin_guide_000358__b7851197117621">Cluster</strong> > <strong id="admin_guide_000358__b12477061617621">Services</strong> and start the ClickHouse service.</span></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>
|
|
|