doc-exports/docs/mrs/umn/admin_guide_000218.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

48 lines
19 KiB
HTML

<a name="admin_guide_000218"></a><a name="admin_guide_000218"></a>
<h1 class="topictitle1">Restoring HBase Metadata</h1>
<div id="body1530063348691"><div class="section" id="admin_guide_000218__section60718452105032"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000218__en-us_topic_0046736764_p50247175">To ensure HBase metadata security (including tableinfo files and HFiles) or before a major operation on HBase system tables (such as upgrade or migration), you need to back up HBase metadata to prevent HBase service unavailability caused by HBase system table directory or file damages. 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_000218__p56116923105032">System administrators can create a recovery task in <span id="admin_guide_000218__text67509419010">MRS</span> Manager to recover HBase metadata. Only manual restoration tasks are supported.</p>
<div class="notice" id="admin_guide_000218__note580295105032"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="admin_guide_000218__ul35398010105032"><li id="admin_guide_000218__li35651622155541">Data restoration can be performed only when the system version is consistent with that during data backup.</li><li id="admin_guide_000218__en-us_topic_0046736773_li35796480">To recover data when the service is running properly, you are advised to manually back up the latest management data before recovering data. Otherwise, the HBase data that is generated after the data backup and before the data recovery will be lost.</li><li id="admin_guide_000218__li6191124425417">It is recommended that a data restoration task restore the metadata of only one component to prevent the data restoration of other components from being affected by stopping a service or instance. If data of multiple components is restored at the same time, data restoration may fail.<p id="admin_guide_000218__p091684435413"><a name="admin_guide_000218__li6191124425417"></a><a name="li6191124425417"></a>HBase metadata cannot be restored at the same time as NameNode metadata. As a result, data restoration fails.</p>
</li></ul>
</div></div>
</div>
<div class="section" id="admin_guide_000218__section16795761105032"><h4 class="sectiontitle">Impact on the System</h4><ul id="admin_guide_000218__ul18676623105032"><li id="admin_guide_000218__en-us_topic_0046736773_li18497900">Before restoring the metadata, you need to stop the HBase service, during which the HBase upper-layer applications are unavailable.</li><li id="admin_guide_000218__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_000218__en-us_topic_0046736773_li63196939">After the metadata is restored, the upper-layer applications of HBase need to be started.</li></ul>
</div>
<div class="section" id="admin_guide_000218__section38869976105032"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000218__ul1222213533213"><li id="admin_guide_000218__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_000218__text1613931161713">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_000218__en-us_topic_0046736773_ul18678419"><li id="admin_guide_000218__en-us_topic_0046736773_li60577072">Cross-cluster replication has been configured for the active and standby clusters. For details, see <a href="admin_guide_000200.html">Enabling Cross-Cluster Replication</a>.</li><li id="admin_guide_000218__en-us_topic_0046736773_li27480077">You have checked the path for storing HBase metadata backup files.</li><li id="admin_guide_000218__en-us_topic_0046736773_li45994103">The HBase service has been stopped before its metadata is restored.</li><li id="admin_guide_000218__en-us_topic_0046736773_li11293750">You have logged in to <span id="admin_guide_000218__text14298123341714">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_000218__section93383459252"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000218__ol31006046105032"><li id="admin_guide_000218__li12320634105032"><span>On <span id="admin_guide_000218__text1278133418177">MRS</span> Manager, choose <strong id="admin_guide_000218__b45711318141817">O&amp;M</strong> &gt; <strong id="admin_guide_000218__b185721818131814">Backup and Restoration</strong> &gt; <strong id="admin_guide_000218__b165721918171817">Backup Management</strong>.</span></li><li id="admin_guide_000218__li13361230105032"><span>In the <strong id="admin_guide_000218__b687311218186">Operation</strong> column of a specified task in the task list, choose <span class="menucascade" id="admin_guide_000218__menucascade148791321121817"><b><span class="uicontrol" id="admin_guide_000218__uicontrol1879192171815">More</span></b> &gt; <b><span class="uicontrol" id="admin_guide_000218__uicontrol8879132117189">View History</span></b></span> to view the historical backup task execution records.</span><p><p class="litext" id="admin_guide_000218__a1eed586b104947faab576bb3bc7900f7">In the displayed window, locate a specified success record and click <strong id="admin_guide_000218__b51081627171811">View</strong> in the <strong id="admin_guide_000218__b810932761813">Backup Path</strong> column to view the backup path information of the task and find the following information:</p>
<ul class="subitemlist" id="admin_guide_000218__u1dc509486adb4ae8940b219d931db832"><li id="admin_guide_000218__l0b6056a0d39c4757becb4640f3c903ec"><strong id="admin_guide_000218__b13533930181810">Backup Object</strong> specifies the data source of the backup data.</li><li id="admin_guide_000218__le6e5460ee82c437294e59a24c6e760dc"><strong id="admin_guide_000218__b79363541811">Backup Path</strong> specifies the full path where the backup files are saved.<p id="admin_guide_000218__afb3a9a49a9104a038791837dcde40ac2">Select the correct item, and manually copy the full path of backup files in <strong id="admin_guide_000218__b369443821818">Backup Path</strong>.</p>
</li></ul>
</p></li><li id="admin_guide_000218__li62627246105032"><span>On <span id="admin_guide_000218__text1931153601714">MRS</span> Manager, choose <strong id="admin_guide_000218__b128917410186">O&amp;M</strong> &gt; <strong id="admin_guide_000218__b1289184112184">Backup and Restoration</strong> &gt; <strong id="admin_guide_000218__b12891104151816">Restoration Management</strong>.</span></li><li id="admin_guide_000218__li62165674105032"><span>Click <strong id="admin_guide_000218__b1919761780113935">Create</strong>.</span></li><li id="admin_guide_000218__li34009756105032"><span>Set <strong id="admin_guide_000218__b035574816187">Task Name</strong> to the name of the restoration task.</span></li><li id="admin_guide_000218__li1696835325016"><span>Select the cluster to be operated from <strong id="admin_guide_000218__b473135051815">Recovery Object</strong>.</span></li><li id="admin_guide_000218__li61329238105032"><span>In <strong id="admin_guide_000218__b1708442905113935">Restoration Configuration</strong>, select <strong id="admin_guide_000218__b438535984113935">HBase</strong> under <strong id="admin_guide_000218__b1094534101113935">Metadata and other data</strong>.</span><p><div class="note" id="admin_guide_000218__note2984032138"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="admin_guide_000218__p898583215311">If multiple HBase services are installed, select the HBase services to be restored.</p>
</div></div>
</p></li><li id="admin_guide_000218__li50096053105032"><span>Set <strong id="admin_guide_000218__b108831233121910">Path Type</strong> of <strong id="admin_guide_000218__b788963371910">HBase</strong> to a backup directory type.</span><p><p class="litext" id="admin_guide_000218__p35960371105032">The settings vary according to backup directory types:</p>
<ul class="subitemlist" id="admin_guide_000218__ul46098990105032"><li class="subitemlist" id="admin_guide_000218__li15253548132015"><strong id="admin_guide_000218__b13361347121914">LocalDir</strong>: indicates that the backup files are stored on the local disk of the active management node.<p class="subitemlist" id="admin_guide_000218__p174744942012">If you select <strong id="admin_guide_000218__b15345185017194">LocalDir</strong>, you also need to set <strong id="admin_guide_000218__b13345185014194">Source Path</strong> to select the backup file to be restored, for example, <em id="admin_guide_000218__i622313586191">Version_Data source_Task execution time</em><strong id="admin_guide_000218__b222418581192">.tar.gz</strong>.</p>
</li><li class="subitemlist" id="admin_guide_000218__li8516195117200"><strong id="admin_guide_000218__b1983825919190">RemoteHDFS</strong>: indicates that the backup files are stored in the HDFS directory of the standby cluster.<div class="subitemlist" id="admin_guide_000218__p117721551112012">If you select <strong id="admin_guide_000218__b196271029209">RemoteHDFS</strong>, set the following parameters:<ul id="admin_guide_000218__ud179b032526243a1b0db8724345c7606"><li id="admin_guide_000218__li9681194592517"><strong id="admin_guide_000218__b4423136182010">Source NameService Name</strong>: <span id="admin_guide_000218__text042316614200">indicates the NameService name of the backup data cluster. </span>You can enter the built-in NameService name of the remote cluster, for example, <strong id="admin_guide_000218__b442415617207">haclusterX</strong>, <strong id="admin_guide_000218__b194241466208">haclusterX1</strong>, <strong id="admin_guide_000218__b12424126112011">haclusterX2</strong>, <strong id="admin_guide_000218__b204243610207">haclusterX3</strong>, or <strong id="admin_guide_000218__b154248612205">haclusterX4</strong>. You can also enter a configured NameService name of the remote cluster.</li><li id="admin_guide_000218__li117921739133214"><strong id="admin_guide_000218__b1147669132014">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_000218__b1716413111200">IPv4</strong> or <strong id="admin_guide_000218__b81649119204">IPv6</strong>.</li><li id="admin_guide_000218__li52041623171841"><strong id="admin_guide_000218__b123771813142016">Source NameNode IP Address</strong>: indicates the NameNode service plane IP address of the standby cluster, supporting the active node or standby node.</li><li id="admin_guide_000218__l120bbe4f128d42a3b46591aef92040ad"><strong id="admin_guide_000218__b143471517182015">Source Path</strong>: indicates the full path of HDFS directory for storing backup data of the standby cluster, for example, <em id="admin_guide_000218__i1282714193204">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000218__b1682721916202">.tar.gz</strong>.</li><li id="admin_guide_000218__lb104d32a45684b3c878028aca6d120d6"><strong id="admin_guide_000218__b8961821162016">Queue Name</strong>: indicates the name of the Yarn queue used for backup task execution. The name must be the same as the name of the queue that is running properly in the cluster.</li></ul>
</div>
</li><li class="subitemlist" id="admin_guide_000218__li093965372018"><strong id="admin_guide_000218__b16307172616209">NFS</strong>: indicates that backup files are stored in the NAS using the NFS protocol.<div class="subitemlist" id="admin_guide_000218__p0219125418205">If you select <strong id="admin_guide_000218__b1730582832017">NFS</strong>, set the following parameters:<ul id="admin_guide_000218__ul127408275"><li id="admin_guide_000218__li040871275519"><strong id="admin_guide_000218__b20586133817201">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_000218__b128244142015">IPv4</strong> or <strong id="admin_guide_000218__b4282741192012">IPv6</strong>.</li></ul>
<ul id="admin_guide_000218__ul51213360578"><li id="admin_guide_000218__li31219365573"><strong id="admin_guide_000218__b4908042102012">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000218__li17967636151014"><strong id="admin_guide_000218__b762824410209">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000218__i720974782017">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000218__b1209147192015">.tar.gz</strong>.</li></ul>
</div>
</li><li class="subitemlist" id="admin_guide_000218__li1171505619208"><strong id="admin_guide_000218__b16155750192010">CIFS</strong>: indicates that backup files are stored in NAS using the CIFS protocol.<div class="subitemlist" id="admin_guide_000218__p1696445672011">If you select <strong id="admin_guide_000218__b20333553172015">CIFS</strong>, set the following parameters:<ul id="admin_guide_000218__ul4653174411311"><li id="admin_guide_000218__li865316442313"><strong id="admin_guide_000218__b15949503210">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_000218__b479116292112">IPv4</strong> or <strong id="admin_guide_000218__b6791132182117">IPv6</strong>.</li></ul>
<ul id="admin_guide_000218__ul312712363577"><li id="admin_guide_000218__li91281236125716"><strong id="admin_guide_000218__b745310432115">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000218__li16129123695711"><strong id="admin_guide_000218__b191771569219">Port</strong>: indicates the port number used to connect to the NAS server over the CIFS protocol. The default value is <strong id="admin_guide_000218__b1117714622119">445</strong>.</li><li id="admin_guide_000218__li1412953610578"><strong id="admin_guide_000218__b8819812219">Username</strong>: indicates the username set when the CIFS protocol is configured.</li><li id="admin_guide_000218__li15130153635719"><strong id="admin_guide_000218__b1053914919212">Password</strong>: indicates the password set when the CIFS protocol is configured.</li><li id="admin_guide_000218__li963620452139"><strong id="admin_guide_000218__b817661192113">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000218__i194211413122116">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000218__b04211113142119">.tar.gz</strong>.</li></ul>
</div>
</li><li class="subitemlist" id="admin_guide_000218__li441312313569"><strong id="admin_guide_000218__b201521815112116">SFTP</strong>: indicates that backup files are stored in the server using the SFTP protocol.<div class="subitemlist" id="admin_guide_000218__p841418318563">If you select <strong id="admin_guide_000218__b153927183217">SFTP</strong>, set the following parameters:<ul id="admin_guide_000218__ul460550163116"><li id="admin_guide_000218__li1160115019316"><strong id="admin_guide_000218__b2672142132110">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_000218__b18169122317216">IPv4</strong> or <strong id="admin_guide_000218__b5169123132111">IPv6</strong>.</li></ul>
<ul id="admin_guide_000218__ul241493118561"><li id="admin_guide_000218__li13115115615224"><strong id="admin_guide_000218__b43922511216">Server IP Address</strong>: indicates the IP address of the server where the backup data is stored.</li><li id="admin_guide_000218__li3115165620229"><strong id="admin_guide_000218__b8845726182112">Port</strong>: indicates the port number used to connect to the backup server over the SFTP protocol. The default value is <strong id="admin_guide_000218__b484520268214">22</strong>.</li><li id="admin_guide_000218__li1111585602211"><strong id="admin_guide_000218__b14349528122117">Username</strong>: indicates the username for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000218__li11151156102219"><strong id="admin_guide_000218__b896412912113">Password</strong>: indicates the password for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000218__li524741513333"><strong id="admin_guide_000218__b14386322212">Source Path</strong>: indicates the full path of the backup file on the backup server, for example, <em id="admin_guide_000218__i11887103317212">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000218__b1988783311218">.tar.gz</strong>.</li></ul>
</div>
</li><li id="admin_guide_000218__li12829195701319"><strong id="admin_guide_000218__b768703520212">OBS</strong>: indicates that backup files are stored in OBS. <p id="admin_guide_000218__p11265172672713">If you select <strong id="admin_guide_000218__b1552611379215">OBS</strong>, set the following parameters:</p>
<ul id="admin_guide_000218__ul7270352115419"><li id="admin_guide_000218__li8270115275419"><strong id="admin_guide_000218__b1657494316219">Source Path</strong>: indicates the full OBS path of a backup file, for example, <em id="admin_guide_000218__i181375457218">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000218__b2138104515214">.tar.gz</strong>.<div class="note" id="admin_guide_000218__note112236183519"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="admin_guide_000218__p18741958332">Only MRS 3.1.0 or later supports saving backup files in OBS.</p>
</div></div>
</li></ul>
</li></ul>
</p></li><li id="admin_guide_000218__li60000102105032"><span>Click <strong id="admin_guide_000218__b1659621075113935">OK</strong>.</span></li><li id="admin_guide_000218__li36127580105032"><span>In the restoration task list, locate a created task and click <strong id="admin_guide_000218__b17741852122113">Start</strong> in the <strong id="admin_guide_000218__b11742205262112">Operation</strong> column to execute the restoration task.</span><p><ul id="admin_guide_000218__ul11671751105032"><li id="admin_guide_000218__li40888218105032">After the restoration is successful, the progress bar is in green.</li><li id="admin_guide_000218__li11153371105032">After the restoration is successful, the restoration task cannot be executed again.</li><li id="admin_guide_000218__li9266991105032">If the restoration task fails during the first execution, rectify the fault and click <strong id="admin_guide_000218__b145631257182117">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>