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>
44 lines
22 KiB
HTML
44 lines
22 KiB
HTML
<a name="admin_guide_000222"></a><a name="admin_guide_000222"></a>
|
|
|
|
<h1 class="topictitle1">Restoring NameNode Data</h1>
|
|
<div id="body1530063351578"><div class="section" id="admin_guide_000222__s771e1306d6e5457ea74a77ad63b5d26b"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000222__en-us_topic_0046736776_p21945748">NameNode data needs to be recovered in the following scenarios: data is modified or deleted unexpectedly and needs to be restored. After an administrator performs critical data adjustment in NameNode, an exception occurs or the operation has not achieved the expected result. All modules are faulty and become unavailable. Data is migrated to a new cluster.</p>
|
|
<p id="admin_guide_000222__en-us_topic_0046736776_p63294012">System administrators can create a recovery task in <span id="admin_guide_000222__text67509419010">MRS</span> Manager to recover NameNode data. Only manual restoration tasks are supported.</p>
|
|
<div class="notice" id="admin_guide_000222__en-us_topic_0046736776_note26541367"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="admin_guide_000222__en-us_topic_0046736776_ul37545716"><li id="admin_guide_000222__li4340847216545">Data restoration can be performed only when the system version is consistent with that during data backup.</li><li id="admin_guide_000222__en-us_topic_0046736776_li2367131">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 NameNode data that is generated after the data backup and before the data recovery will be lost.</li><li id="admin_guide_000222__li14805114313180">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_000222__p2030944411816"><a name="admin_guide_000222__li14805114313180"></a><a name="li14805114313180"></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_000222__s3d87a834c70a4833bd9f75d1f5ec3937"><h4 class="sectiontitle">Impact on the System</h4><ul id="admin_guide_000222__en-us_topic_0046736776_ul28599227"><li id="admin_guide_000222__en-us_topic_0046736776_li56066454">After the data is restored, the data generated after the data backup and before the data restoration is lost.</li><li id="admin_guide_000222__en-us_topic_0046736776_li34836040">After the data is recovered, the NameNode needs to be restarted and is unavailable during the restart.</li><li id="admin_guide_000222__en-us_topic_0046736776_li45088906">After data is restored, metadata and service data may not be matched, the HDFS enters the security mode, and the HDFS service fails to be started. .</li></ul>
|
|
</div>
|
|
<div class="section" id="admin_guide_000222__sb52fec7351f043f98e59e033bbef9ed5"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000222__ul1222213533213"><li id="admin_guide_000222__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_000222__text13955105916179">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_000222__en-us_topic_0046736776_ul53578275"><li id="admin_guide_000222__en-us_topic_0046736776_li1204049">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_000222__en-us_topic_0046736776_li30419176">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_000222__en-us_topic_0046736776_li5337128">You have logged in to <span id="admin_guide_000222__text1660761101815">MRS</span> Manager. For details, see <a href="admin_guide_000004.html">Logging In to MRS Manager</a>.</li><li id="admin_guide_000222__en-us_topic_0046736776_li29654208">On <span id="admin_guide_000222__text914213313186">MRS</span> Manager, all the NameNode role instances whose data is to be recovered are stopped. Other HDFS role instances must keep running. After data is recovered, the NameNode role instances need to be restarted. The NameNode role instances cannot be accessed during the restart.</li><li id="admin_guide_000222__en-us_topic_0046736776_li65561281">The NameNode backup files are stored <strong id="admin_guide_000222__b20257618115318"><em id="admin_guide_000222__i1367672115536">Data path</em>/LocalBackup/</strong> on the active management node.</li></ul>
|
|
</div>
|
|
<div class="section" id="admin_guide_000222__s5be22bad11f74955ad3bfe3d3dc05064"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000222__ol3543613716730"><li id="admin_guide_000222__li778436616730"><span>On <span id="admin_guide_000222__text1360412491815">MRS</span> Manager, click <strong id="admin_guide_000222__b16850111335418">Cluster</strong>, click the name of the desired cluster, and choose <strong id="admin_guide_000222__b161951720111715">Services</strong> > <strong id="admin_guide_000222__b48028226178">HDFS</strong>. On the displayed page, click <strong id="admin_guide_000222__b1810153771519">Instance</strong> and click <strong id="admin_guide_000222__b3898185310159">NameNode</strong> to check whether the NameNode instances of the data to be restored are stopped. If the NameNode instances are not stopped, stop them.</span></li><li id="admin_guide_000222__li295043616730"><span>On <span id="admin_guide_000222__text129310620189">MRS</span> Manager, choose <strong id="admin_guide_000222__b1028563805112932">O&M</strong> > <strong id="admin_guide_000222__b71747920112932">Backup and Restoration</strong> > <strong id="admin_guide_000222__b1918402020112932">Backup Management</strong>.</span></li><li id="admin_guide_000222__li6145613816730"><span>In the <strong id="admin_guide_000222__b1143652615207">Operation</strong> column of a specified task in the task list, choose <strong id="admin_guide_000222__b6436202616208">More</strong> > <strong id="admin_guide_000222__b9436326112011">View History</strong> to view historical backup task execution records.</span><p><p class="litext" id="admin_guide_000222__p3765878616730">In the displayed window, locate a specified success record and click <strong id="admin_guide_000222__b584815282202">View</strong> in the <strong id="admin_guide_000222__b1784872815204">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_000222__ul5156770216730"><li id="admin_guide_000222__li338475516730"><strong id="admin_guide_000222__b5673173232013">Backup Object</strong> specifies the data source of the backup data.</li><li id="admin_guide_000222__li572974416730"><strong id="admin_guide_000222__b8731534202010">Backup Path</strong> specifies the full path where the backup files are saved.<p id="admin_guide_000222__p3046280016730">Select the correct item, and manually copy the full path of backup files in <strong id="admin_guide_000222__b262410101219">Backup Path</strong>.</p>
|
|
</li></ul>
|
|
</p></li><li id="admin_guide_000222__li1623433316730"><span>On <span id="admin_guide_000222__text25721977181">MRS</span> Manager, choose <strong id="admin_guide_000222__b1485811157215">O&M</strong> > <strong id="admin_guide_000222__b4858141592119">Backup and Restoration</strong> > <strong id="admin_guide_000222__b2858181542116">Restoration Management</strong>.</span></li><li id="admin_guide_000222__li1189127216730"><span>Click <strong id="admin_guide_000222__b1328044667112932">Create</strong>.</span></li><li id="admin_guide_000222__li2366897916730"><span>Set <strong id="admin_guide_000222__b16373192032116">Task Name</strong> to the name of the restoration task.</span></li><li id="admin_guide_000222__li1696835325016"><span>Select the cluster to be operated from <strong id="admin_guide_000222__b3246523142119">Recovery Object</strong>.</span></li><li id="admin_guide_000222__li3813912216730"><span>In the <strong id="admin_guide_000222__b548613276214">Restoration Configuration</strong> area, select <strong id="admin_guide_000222__b549311273217">NameNode</strong>.</span></li><li id="admin_guide_000222__li3944167116730"><span>Set <strong id="admin_guide_000222__b6668163552115">Path Type</strong> of <strong id="admin_guide_000222__b866823518214">NameNode</strong> to a backup directory type.</span><p><p class="litext" id="admin_guide_000222__p770778116730">The settings vary according to backup directory types:</p>
|
|
<ul class="subitemlist" id="admin_guide_000222__ul4912165016730"><li class="subitemlist" id="admin_guide_000222__li9765132865811"><strong id="admin_guide_000222__b139811449142113">LocalDir</strong>: indicates that the backup files are stored on the local disk of the active management node.<div class="subitemlist" id="admin_guide_000222__p1238992985818">If you select <strong id="admin_guide_000222__b17394253102120">LocalDir</strong>, set the following parameters:<ul id="admin_guide_000222__ul12558173244117"><li class="subitemlist" id="admin_guide_000222__li19640102611223"><strong id="admin_guide_000222__b163561819132">Source Path</strong>: indicates the full path of the backup file on the local disk, for example, <em id="admin_guide_000222__i7346151916143">Backup path/Backup task name_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b235441915141">.tar.gz</strong>.</li><li id="admin_guide_000222__li6397123713413"><strong id="admin_guide_000222__b1389102181414">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b143988295112932">hacluster</strong>.</li></ul>
|
|
</div>
|
|
</li><li class="subitemlist" id="admin_guide_000222__li18213544185819"><strong id="admin_guide_000222__b029213343143">RemoteHDFS</strong>: indicates that the backup files are stored in the HDFS directory of the standby cluster.<div class="subitemlist" id="admin_guide_000222__p5486124445810">If you select <strong id="admin_guide_000222__b1862511041515">RemoteHDFS</strong>, set the following parameters:<ul id="admin_guide_000222__ul48299535164119"><li id="admin_guide_000222__li9681194592517"><strong id="admin_guide_000222__b14873154691612">Source NameService Name</strong>: <span id="admin_guide_000222__text18881114641620">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_000222__b788119461168">haclusterX</strong>, <strong id="admin_guide_000222__b1888284691615">haclusterX1</strong>, <strong id="admin_guide_000222__b1588274614163">haclusterX2</strong>, <strong id="admin_guide_000222__b19882114618165">haclusterX3</strong>, or <strong id="admin_guide_000222__b2883346151615">haclusterX4</strong>. You can also enter a configured NameService name of the remote cluster.</li><li id="admin_guide_000222__li040871275519"><strong id="admin_guide_000222__b480994871615">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_000222__b11493165031619">IPv4</strong> or <strong id="admin_guide_000222__b1349313504161">IPv6</strong>.</li><li id="admin_guide_000222__li52041623171841"><strong id="admin_guide_000222__b968295215168">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_000222__li6191577216730"><strong id="admin_guide_000222__b7442112791716">Source Path</strong>: indicates the full path of HDFS directory for storing backup data of the standby cluster, for example, <em id="admin_guide_000222__i11136153041717">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b7136730151717">.tar.gz</strong>.</li><li id="admin_guide_000222__li2037104216730"><strong id="admin_guide_000222__b01737346177">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><li id="admin_guide_000222__li128389918426"><strong id="admin_guide_000222__b66124216195">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b7523245171917">hacluster</strong>.</li></ul>
|
|
</div>
|
|
</li><li id="admin_guide_000222__li1612033610574"><strong id="admin_guide_000222__b15713247141911">NFS</strong>: indicates that backup files are stored in the NAS using the NFS protocol. If you select <strong id="admin_guide_000222__b575312515194">NFS</strong>, set the following parameters:<ul id="admin_guide_000222__ul51213360578"><li id="admin_guide_000222__li163041741203417"><strong id="admin_guide_000222__b82285072018">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_000222__b166672162017">IPv4</strong> or <strong id="admin_guide_000222__b566792122020">IPv6</strong>.</li><li id="admin_guide_000222__li31219365573"><strong id="admin_guide_000222__b168611964203">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000222__li963620452139"><strong id="admin_guide_000222__b147601053202219">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000222__i33841062318">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b84411101239">.tar.gz</strong>.</li><li id="admin_guide_000222__li13639194521312"><strong id="admin_guide_000222__b18152181313233">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b1347641163012">hacluster</strong>.</li></ul>
|
|
</li><li id="admin_guide_000222__li81261936125719"><strong id="admin_guide_000222__b17698141620303">CIFS</strong>: indicates that backup files are stored in the NAS using the CIFS protocol. If you select <strong id="admin_guide_000222__b16174133163012">CIFS</strong>, set the following parameters:<ul id="admin_guide_000222__ul312712363577"><li id="admin_guide_000222__li42736467341"><strong id="admin_guide_000222__b1065511421300">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_000222__b1184174817307">IPv4</strong> or <strong id="admin_guide_000222__b141851848193015">IPv6</strong>.</li><li id="admin_guide_000222__li91281236125716"><strong id="admin_guide_000222__b855445053013">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000222__li16129123695711"><strong id="admin_guide_000222__b5666544306">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_000222__b107385473017">445</strong>.</li><li id="admin_guide_000222__li1412953610578"><strong id="admin_guide_000222__b1538856103013">Username</strong>: indicates the username set when the CIFS protocol is configured.</li><li id="admin_guide_000222__li15130153635719"><strong id="admin_guide_000222__b17136145853011">Password</strong>: indicates the password set when the CIFS protocol is configured.</li><li id="admin_guide_000222__li880105715429"><strong id="admin_guide_000222__b1193145914305">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000222__i6537175103111">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b16543553319">.tar.gz</strong>.</li><li id="admin_guide_000222__li1865577420"><strong id="admin_guide_000222__b18835712317">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b1250106315">hacluster</strong>.</li></ul>
|
|
</li><li class="subitemlist" id="admin_guide_000222__li441312313569"><strong id="admin_guide_000222__b2048616135315">SFTP</strong>: indicates that backup files are stored in the server using the SFTP protocol.<div class="subitemlist" id="admin_guide_000222__p841418318563">If you select <strong id="admin_guide_000222__b086991617317">SFTP</strong>, set the following parameters:<ul id="admin_guide_000222__ul96991812193314"><li id="admin_guide_000222__li11670135133419"><strong id="admin_guide_000222__b18374419163112">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_000222__b6828122010316">IPv4</strong> or <strong id="admin_guide_000222__b1382912205317">IPv6</strong>.</li></ul>
|
|
<ul id="admin_guide_000222__ul241493118561"><li id="admin_guide_000222__li6262143122314"><strong id="admin_guide_000222__b123047223311">Server IP Address</strong>: indicates the IP address of the server where the backup data is stored.</li><li id="admin_guide_000222__li52631431172311"><strong id="admin_guide_000222__b214419245319">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_000222__b141441024133110">22</strong>.</li><li id="admin_guide_000222__li20263163118236"><strong id="admin_guide_000222__b169162673113">Username</strong>: indicates the username for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000222__li3263131122316"><strong id="admin_guide_000222__b17813327123111">Password</strong>: indicates the password for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000222__li13289122113114"><strong id="admin_guide_000222__b129141029153112">Source Path</strong>: indicates the full path of the backup file on the backup server, for example, <em id="admin_guide_000222__i11345183223117">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b19345163214316">.tar.gz</strong>.</li><li id="admin_guide_000222__li146113914714"><strong id="admin_guide_000222__b7407113420313">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b18965113693110">hacluster</strong>.</li></ul>
|
|
</div>
|
|
</li><li id="admin_guide_000222__li12829195701319"><strong id="admin_guide_000222__b1072773943118">OBS</strong>: indicates that backup files are stored in OBS. <p id="admin_guide_000222__p14401173892710">If you select <strong id="admin_guide_000222__b1793844153118">OBS</strong>, set the following parameters:</p>
|
|
<ul id="admin_guide_000222__ul1455972611153"><li id="admin_guide_000222__li107421936181611"><strong id="admin_guide_000222__b6916195219317">Source Path</strong>: indicates the full OBS path of a backup file, for example, <em id="admin_guide_000222__i814765523119">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000222__b8148145553113">.tar.gz</strong>.</li><li id="admin_guide_000222__li2105224292"><strong id="admin_guide_000222__b6826205612314">NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000222__b16771588318">hacluster</strong>.<div class="note" id="admin_guide_000222__note112236183519"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="admin_guide_000222__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_000222__li502529516730"><span>Click <strong id="admin_guide_000222__b1436397239112932">OK</strong>.</span></li><li id="admin_guide_000222__li5252056016730"><span>In the restoration task list, locate a created task and click <strong id="admin_guide_000222__b152479319324">Start</strong> in the <strong id="admin_guide_000222__b825419313326">Operation</strong> column to execute the restoration task.</span><p><ul class="subitemlist" id="admin_guide_000222__ul5057486016730"><li id="admin_guide_000222__li439571316730">After the restoration is successful, the progress bar is in green.</li><li id="admin_guide_000222__li3956142316730">After the restoration is successful, the restoration task cannot be executed again.</li><li id="admin_guide_000222__li5035867116730">If the restoration task fails during the first execution, rectify the fault and click <strong id="admin_guide_000222__b148591353193219">Retry</strong> to execute the task again.</li></ul>
|
|
</p></li><li id="admin_guide_000222__li2630696916730"><span>On <span id="admin_guide_000222__text61817916185">MRS</span> Manager, click <strong id="admin_guide_000222__b118004894112932">Cluster</strong>, click the name of the desired cluster, and choose <strong id="admin_guide_000222__b575173520112932">Services</strong> > <strong id="admin_guide_000222__b924275721112932">HDFS</strong>. On the displayed page, click <strong id="admin_guide_000222__b1958265369112932">Configurations</strong> and click <strong id="admin_guide_000222__b1039185201112932">All Configurations</strong>.</span><p><p id="admin_guide_000222__p292299616730">On the displayed page, enter the password of the administrator who has logged in for authentication and click <strong id="admin_guide_000222__b869622719349">OK</strong>. After the system displays "Operation succeeded", click <strong id="admin_guide_000222__b1997195410112932">Finish</strong>. The service is started successfully.</p>
|
|
</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>
|
|
|