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>
34 lines
11 KiB
HTML
34 lines
11 KiB
HTML
<a name="admin_guide_000348"></a><a name="admin_guide_000348"></a>
|
|
|
|
<h1 class="topictitle1">Backing Up ClickHouse Metadata</h1>
|
|
<div id="body0000001151141620"><div class="section" id="admin_guide_000348__sbf7de999ef6f4ec7ada122bb4f6bbc39"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000348__p632723322610">To ensure ClickHouse metadata security or before a major operation on ZooKeeper (such as upgrade or migration), you need to back up ClickHouse metadata. The backup data can be used to recover the system if an exception occurs or the operation has not achieved the expected result, minimizing the adverse impacts on services.</p>
|
|
<p id="admin_guide_000348__p232733320268">You can create a backup task on <span id="admin_guide_000348__text67509419010">MRS</span> Manager to back up ClickHouse metadata. Both automatic and manual backup tasks are supported.</p>
|
|
<div class="notice" id="admin_guide_000348__note14379183294412"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="admin_guide_000348__p13281173718276">This function is supported only by MRS 3.1.0 or later.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="admin_guide_000348__s1b2b090a07e447b58ba4e60370d64404"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000348__ul6787112462318"><li id="admin_guide_000348__lf3c3f51380734b469b9ab66e4015777c">If data needs to be backed up to the remote HDFS, you have prepared a standby cluster for data backup. The authentication mode of the standby cluster is the same as that of the active cluster. For other backup modes, you do not need to prepare the standby cluster.</li></ul>
|
|
<ul id="admin_guide_000348__ube9a3e31e3214e57ade6488b9708e3c5"><li id="admin_guide_000348__le9ac0667a43d455fa6c4b811935ad455">The backup type, period, policy, and other specifications have been planned based on the service requirements and you have checked whether <em id="admin_guide_000348__i165151748142317">Data storage path</em><strong id="admin_guide_000348__b145221248192315">/LocalBackup/</strong> has sufficient space on the active and standby management nodes.</li><li id="admin_guide_000348__l6b2ccbf0a54a4d7994c8b888340d4fc3">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_000348__text1922536141419">MRS</span> Manager, mutual trust has been 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_000348__ul9711186244"><li id="admin_guide_000348__lb80a243195ff415bb79d73f765e4982c">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></ul>
|
|
</div>
|
|
<div class="section" id="admin_guide_000348__section964524115213"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000348__ol885566615256"><li id="admin_guide_000348__li514247915256"><span>On <span id="admin_guide_000348__text746420384144">MRS</span> Manager, choose <strong id="admin_guide_000348__b1378787122419">O&M</strong> > <strong id="admin_guide_000348__b17949772410">Backup and Restoration</strong> > <strong id="admin_guide_000348__b20795371242">Backup Management</strong>.</span></li><li id="admin_guide_000348__li1388766715256"><span>Click <strong id="admin_guide_000348__b198994220442620">Create</strong>.</span></li><li id="admin_guide_000348__li5788013915256"><span>Set <strong id="admin_guide_000348__b0498201572411">Name</strong> to the name of the backup task.</span></li><li id="admin_guide_000348__li2832102653918"><span>Select the cluster to be operated from <strong id="admin_guide_000348__b0265172017243">Backup Object</strong>.</span></li><li id="admin_guide_000348__li1759563715256"><span>Set <strong id="admin_guide_000348__b109387624615625">Mode</strong> to the type of the backup task. <strong id="admin_guide_000348__b44124572015625">Periodic</strong> indicates that the backup task is periodically executed. <strong id="admin_guide_000348__b26423326115625">Manual</strong> indicates that the backup task is manually executed.</span><p><div class="litext" id="admin_guide_000348__a72d0f2cd5f094c519068fd0b5fb6e4d6">To create a periodic backup task, set the following parameters:<ul class="subitemlist" id="admin_guide_000348__uced6db9dbce644ab9b7c791f6bded3e0"><li id="admin_guide_000348__le520225e1f0743b79b26f319eaa0df04"><strong id="admin_guide_000348__b6319641115625">Started</strong>: indicates the time when the task is started for the first time.</li><li id="admin_guide_000348__ldb04217ae5c746abb8cdd6674c93796e"><strong id="admin_guide_000348__b37194789915625">Period</strong>: indicates the task execution interval. The options include <strong id="admin_guide_000348__b158007865415625">Hours</strong> and <strong id="admin_guide_000348__b22588039215625">Days</strong>.</li><li id="admin_guide_000348__ld8031457d38244d58fbe9196b3b08d50"><strong id="admin_guide_000348__b65715484251">Backup Policy</strong>: Only <strong id="admin_guide_000348__b7651548142511">Full backup every time</strong> is supported.</li></ul>
|
|
</div>
|
|
</p></li><li id="admin_guide_000348__li2414301115256"><span>In <strong id="admin_guide_000348__b16265122115318">Configuration</strong>, select <strong id="admin_guide_000348__b2265112110535">ClickHouse</strong> under <strong id="admin_guide_000348__b102651921185319">Metadata and other data</strong>.</span></li><li id="admin_guide_000348__li4457996415256"><span>Set <strong id="admin_guide_000348__b172060008415625">Path Type</strong> of <strong id="admin_guide_000348__b55354279615625">ClickHouse</strong> to a backup directory type.</span><p><div class="p" id="admin_guide_000348__p12793173111194">The following backup directory types are supported:<ul class="subitemlist" id="admin_guide_000348__ul1716191362514"><li class="subitemlist" id="admin_guide_000348__l3ce629635732428da211d06ecedfce6f"><strong id="admin_guide_000348__b12437162892617">LocalDir</strong>: indicates that the backup files are stored on the local disk of the active management node and the standby management node automatically synchronizes the backup files.<p class="subitemlist" id="admin_guide_000348__en-us_topic_0165590410_p12759612174613">The default storage directory is <em id="admin_guide_000348__i540523132615">Data storage path</em><strong id="admin_guide_000348__b1640633120262">/LocalBackup/</strong>, for example, <strong id="admin_guide_000348__b10407163116262">/srv/BigData/LocalBackup</strong>.</p>
|
|
<p class="subitemlist" id="admin_guide_000348__en-us_topic_0165590410_p1746662018581">If you select this option, you need to set the maximum number of replicas to specify the number of backup file sets that can be retained in the backup directory.</p>
|
|
</li></ul>
|
|
<ul class="subitemlist" id="admin_guide_000348__ul136929265255"><li class="subitemlist" id="admin_guide_000348__lff9acdbe32b44f9ab63e29d337acb6b8"><strong id="admin_guide_000348__b081913702718">RemoteHDFS</strong>: indicates that the backup files are stored in the HDFS directory of the standby cluster.<p id="admin_guide_000348__p14469132153012">This value option is available only after you configure the environment by referring to <a href="admin_guide_000357.html">How Do I Configure the Environment When I Create a ClickHouse Backup Task on MRS Manager and Set the Path Type to RemoteHDFS?</a>.</p>
|
|
<div class="subitemlist" id="admin_guide_000348__p1284918123514">You also need to configure the following parameters:<ul id="admin_guide_000348__ul15929142203519"><li id="admin_guide_000348__li169295213517"><strong id="admin_guide_000348__b1798885041">Destination NameService Name</strong>: indicates the NameService name of the standby cluster, for example, <strong id="admin_guide_000348__b2010543418">hacluster</strong>. You can obtain it from the <strong id="admin_guide_000348__b953236756">NameService Management</strong> page of HDFS of the standby cluster.</li></ul>
|
|
<ul id="admin_guide_000348__ul092918243512"><li id="admin_guide_000348__li7929132173514"><strong id="admin_guide_000348__b288471751">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_000348__b1357134869">IPv4</strong> or <strong id="admin_guide_000348__b448524342">IPv6</strong>.</li><li id="admin_guide_000348__li1929822359"><strong id="admin_guide_000348__b498142718212">Target 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_000348__li89301127351"><strong id="admin_guide_000348__b1008011024">Target Path</strong>: indicates the HDFS directory for storing standby cluster backup data. The storage path cannot be an HDFS hidden directory, such as a snapshot or recycle bin directory, or a default system directory, such as <strong id="admin_guide_000348__b1945640761">/hbase</strong> or <strong id="admin_guide_000348__b1228345979">/user/hbase/backup</strong>.</li><li id="admin_guide_000348__li1493012183512"><strong id="admin_guide_000348__b165435301214">Maximum Number of Backup Copies</strong>: indicates the number of backup file sets that can be retained in the backup directory.</li></ul>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
</p></li><li id="admin_guide_000348__li6567536315256"><span>Click <strong id="admin_guide_000348__b105691671915625">OK</strong>.</span></li><li id="admin_guide_000348__li3081012415256"><span>In the <strong id="admin_guide_000348__b1537124117292">Operation</strong> column of the created task in the backup task list, click <strong id="admin_guide_000348__b1637964112298">More</strong> and select <strong id="admin_guide_000348__b1638119412294">Back Up Now</strong> to execute the backup task.</span><p><p id="admin_guide_000348__ab1ce28c122084e08bf166362836a4c3d">After the backup task is executed, the system automatically creates a subdirectory for each backup task in the backup directory. The format of the subdirectory name is <em id="admin_guide_000348__i13511845102920">Backup task name</em><strong id="admin_guide_000348__b9353114522911">_</strong><em id="admin_guide_000348__i635413454292">Task creation time</em>, and the subdirectory is used to save data source backup files. The format of the backup file name is <em id="admin_guide_000348__i1865810501291">Data source</em><strong id="admin_guide_000348__b106651950162912">_</strong><em id="admin_guide_000348__i1366725014292">Task execution time</em><strong id="admin_guide_000348__b366915015291">.tar.gz</strong>.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="admin_guide_000201.html">Backing Up Data</a></div>
|
|
</div>
|
|
</div>
|
|
|