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

38 lines
22 KiB
HTML

<a name="admin_guide_000223"></a><a name="admin_guide_000223"></a>
<h1 class="topictitle1">Restoring HDFS Service Data</h1>
<div id="body1530063353106"><div class="section" id="admin_guide_000223__sc085681c21974467a1c1995b0e02e647"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000223__en-us_topic_0046736774_p18289258">HDFS 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 the HDFS, 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_000223__en-us_topic_0046736774_p30385596">System administrators can create a recovery task in <span id="admin_guide_000223__text67509419010">MRS</span> Manager to recover HDFS data. Only manual restoration tasks are supported.</p>
<div class="notice" id="admin_guide_000223__en-us_topic_0046736774_note45314205"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="admin_guide_000223__en-us_topic_0046736774_ul5174661"><li id="admin_guide_000223__li18247069155941">Data restoration can be performed only when the system version is consistent with that during data backup.</li><li id="admin_guide_000223__li28352123155945">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 HDFS data that is generated after the data backup and before the data recovery will be lost.</li><li id="admin_guide_000223__en-us_topic_0046736774_li46571954">The HDFS restoration operation cannot be performed for the directories used by running Yarn tasks, for example, <strong id="admin_guide_000223__b1735533664720">/tmp/logs</strong>, <strong id="admin_guide_000223__b20221120124917">/tmp/archived</strong>, and <strong id="admin_guide_000223__b192146164920">/tmp/hadoop-yarn/staging</strong>. Otherwise, data restoration using Distcp tasks fails due to file loss.</li></ul>
</div></div>
</div>
<div class="section" id="admin_guide_000223__sd6c9a38874d14229a544d5d1053cfc7b"><h4 class="sectiontitle">Impact on the System</h4><ul id="admin_guide_000223__en-us_topic_0046736774_ul40295786"><li id="admin_guide_000223__en-us_topic_0046736774_li27117756">During data restoration, user authentication stops and users cannot create new connections.</li><li id="admin_guide_000223__en-us_topic_0046736774_li42733218">After the data is restored, the data generated after the data backup and before the data restoration is lost.</li><li id="admin_guide_000223__en-us_topic_0046736774_li49054643">After the data is recovered, the HDFS upper-layer applications need to be started.</li></ul>
</div>
<div class="section" id="admin_guide_000223__s25035e6d2682419aa5dffbb2f6477cfc"><h4 class="sectiontitle">Prerequisites</h4><ul id="admin_guide_000223__ul1222213533213"><li id="admin_guide_000223__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_000223__text10534914161817">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_000223__en-us_topic_0046736774_ul14003175"><li id="admin_guide_000223__en-us_topic_0046736774_li7767612">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_000223__en-us_topic_0046736774_li25196870">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_000223__en-us_topic_0046736774_li25445245">The HDFS backup file save path is correct.</li><li id="admin_guide_000223__en-us_topic_0046736774_li27680617">The HDFS upper-layer applications are stopped.</li><li id="admin_guide_000223__en-us_topic_0046736774_li47798963">You have logged in to <span id="admin_guide_000223__text9291716201816">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_000223__sd4b41e5fdd62438f873d949e021e7a9c"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000223__ol5501705316247"><li id="admin_guide_000223__li2679412116247"><span>On <span id="admin_guide_000223__text13556181717182">MRS</span> Manager, choose <strong id="admin_guide_000223__b1434615101807">O&amp;M</strong> &gt; <strong id="admin_guide_000223__b133478101100">Backup and Restoration</strong> &gt; <strong id="admin_guide_000223__b17347910303">Backup Management</strong>.</span></li><li id="admin_guide_000223__li427865216247"><span>In the <strong id="admin_guide_000223__b2454515600">Operation</strong> column of a specified task in the task list, choose <strong id="admin_guide_000223__b24601715104">More</strong> &gt; <strong id="admin_guide_000223__b646018151203">View History</strong> to view historical backup task execution records.</span><p><p class="litext" id="admin_guide_000223__p2284020216247">In the displayed window, locate a specified success record and click <strong id="admin_guide_000223__b197021211014">View</strong> in the <strong id="admin_guide_000223__b471082120020">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_000223__ul47540516247"><li id="admin_guide_000223__li423523016247"><strong id="admin_guide_000223__b14013271604">Backup Object</strong> specifies the data source of the backup data.</li><li id="admin_guide_000223__li750936316247"><strong id="admin_guide_000223__b17942183019011">Backup Path</strong> specifies the full path where the backup files are saved.<p id="admin_guide_000223__p3811707516247">Select the correct item, and manually copy the full path of backup files in <strong id="admin_guide_000223__b6108835809">Backup Path</strong>.</p>
</li></ul>
</p></li><li id="admin_guide_000223__li3850787216247"><span>On <span id="admin_guide_000223__text1985101951810">MRS</span> Manager, choose <strong id="admin_guide_000223__b56406381407">O&amp;M</strong> &gt; <strong id="admin_guide_000223__b186411238209">Backup and Restoration</strong> &gt; <strong id="admin_guide_000223__b10641838901">Restoration Management</strong>.</span></li><li id="admin_guide_000223__li1102653016247"><span>Click <strong id="admin_guide_000223__b1491233426114824">Create</strong>.</span></li><li id="admin_guide_000223__li3212990716247"><span>Set <strong id="admin_guide_000223__b1929174216015">Task Name</strong> to the name of the restoration task.</span></li><li id="admin_guide_000223__li1696835325016"><span>Select the cluster to be operated from <strong id="admin_guide_000223__b898114419013">Recovery Object</strong>.</span></li><li id="admin_guide_000223__li22282512154730"><span>In <strong id="admin_guide_000223__b197541952703">Restoration Configuration</strong>, select <strong id="admin_guide_000223__b075425213014">HDFS</strong> under <strong id="admin_guide_000223__b117542052105">Service Data</strong>.</span></li><li id="admin_guide_000223__li4457996415256"><span>Set <strong id="admin_guide_000223__b1766411020118">Path Type</strong> of <strong id="admin_guide_000223__b766511020119">HDFS</strong> to a backup directory type.</span><p><p class="litext" id="admin_guide_000223__p1596050715256">The following backup directory types are supported:</p>
<ul class="subitemlist" id="admin_guide_000223__u695c04bfc9fd4e808744a464ebe243f6"><li class="subitemlist" id="admin_guide_000223__li2655104795918"><strong id="admin_guide_000223__b1897585817">RemoteHDFS</strong>: indicates that the backup files are stored in the HDFS directory of the standby cluster.<div class="subitemlist" id="admin_guide_000223__p13313748195920">If you select <strong id="admin_guide_000223__b732998611">RemoteHDFS</strong>, set the following parameters:<ul id="admin_guide_000223__ucd7932b194e14ccaacbee7182305411e"><li id="admin_guide_000223__li9681194592517"><strong id="admin_guide_000223__b87044171120">Source NameService Name</strong>: <span id="admin_guide_000223__text177043171212">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_000223__b127041177117">haclusterX</strong>, <strong id="admin_guide_000223__b37049171112">haclusterX1</strong>, <strong id="admin_guide_000223__b1770513179115">haclusterX2</strong>, <strong id="admin_guide_000223__b16705101719111">haclusterX3</strong>, or <strong id="admin_guide_000223__b17054171111">haclusterX4</strong>. You can also enter a configured NameService name of the remote cluster.</li><li id="admin_guide_000223__li040871275519"><strong id="admin_guide_000223__b1467218198112">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_000223__b1753812118116">IPv4</strong> or <strong id="admin_guide_000223__b85382217110">IPv6</strong>.</li><li id="admin_guide_000223__li52041623171841"><strong id="admin_guide_000223__b5623023311">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_000223__li99281153171714"><strong id="admin_guide_000223__b21331326811">Source Path</strong>: indicates the full path of HDFS directory for storing backup data of the standby cluster, for example, <em id="admin_guide_000223__i155073290115">Backup path/Backup task name_Data source_Task creation time</em>.</li><li id="admin_guide_000223__l4f27e9a8307c43fab688eb38ffd050d8"><strong id="admin_guide_000223__b233173217118">Queue Name</strong>: indicates the name of the Yarn queue used for backup task execution.</li><li id="admin_guide_000223__li119291202"><strong id="admin_guide_000223__b826020361218">Recovery Point List</strong>: Click <strong id="admin_guide_000223__b12600361818">Refresh</strong> and select an HDFS directory that has been backed up in the standby cluster.</li><li id="admin_guide_000223__li11931514113417"><strong id="admin_guide_000223__b1690463910116">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000223__b10101194216119">hacluster</strong>.</li><li id="admin_guide_000223__li5203145111105"><strong id="admin_guide_000223__b99668431217">Maximum Number of Maps</strong>: indicates the maximum number of maps in a MapReduce task. The default value is <strong id="admin_guide_000223__b2966114317114">20</strong>.</li><li id="admin_guide_000223__li8205351161017"><strong id="admin_guide_000223__b4619144520116">Maximum Bandwidth of a Map (MB/s)</strong>: indicates the maximum bandwidth of a map. The default value is <strong id="admin_guide_000223__b46202451015">100</strong>.</li></ul>
</div>
</li><li id="admin_guide_000223__li1832811432104"><strong id="admin_guide_000223__b1379244920114">NFS</strong>: indicates that backup files are stored in NAS using the NFS protocol. If you select <strong id="admin_guide_000223__b1078517521114">NFS</strong>, set the following parameters:<ul id="admin_guide_000223__ul131981043121213"><li id="admin_guide_000223__li8878141318353"><strong id="admin_guide_000223__b1264514214217">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_000223__b7552154125">IPv4</strong> or <strong id="admin_guide_000223__b25531644215">IPv6</strong>.</li><li id="admin_guide_000223__li84531639101211"><strong id="admin_guide_000223__b8633861423">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000223__li963620452139"><strong id="admin_guide_000223__b410616816212">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000223__i1691014916219">Backup path/Backup task name_Data source_Task creation time</em>.</li><li id="admin_guide_000223__li11461153218222"><strong id="admin_guide_000223__b125755125217">Queue Name</strong>: indicates the name of the Yarn queue used for backup task execution.</li><li id="admin_guide_000223__li39791015185012"><strong id="admin_guide_000223__b1491816146210">Recovery Point List</strong>: Click <strong id="admin_guide_000223__b1891812147214">Refresh</strong> and select an HDFS directory that has been backed up in the standby cluster.</li><li id="admin_guide_000223__li767319613517"><strong id="admin_guide_000223__b397814166219">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000223__b1826817191122">hacluster</strong>.</li><li id="admin_guide_000223__li1940905618499"><strong id="admin_guide_000223__b59259239218">Maximum Number of Maps</strong>: indicates the maximum number of maps in a MapReduce task. The default value is <strong id="admin_guide_000223__b4926923226">20</strong>.</li><li id="admin_guide_000223__li741105614912"><strong id="admin_guide_000223__b75281255216">Maximum Bandwidth of a Map (MB/s)</strong>: indicates the maximum bandwidth of a map. The default value is <strong id="admin_guide_000223__b1452892519213">100</strong>.</li></ul>
</li><li id="admin_guide_000223__li153151517158"><strong id="admin_guide_000223__b1488192713219">CIFS</strong>: indicates that backup files are stored in NAS using the CIFS protocol. If you select <strong id="admin_guide_000223__b13484829522">CIFS</strong>, set the following parameters:<ul id="admin_guide_000223__ul19998175216165"><li id="admin_guide_000223__li24069199354"><strong id="admin_guide_000223__b1061784414210">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_000223__b844412462021">IPv4</strong> or <strong id="admin_guide_000223__b344554612216">IPv6</strong>.</li><li id="admin_guide_000223__li14202144861616"><strong id="admin_guide_000223__b145719489219">Server IP Address</strong>: indicates the IP address of the NAS server.</li><li id="admin_guide_000223__li5203184891618"><strong id="admin_guide_000223__b95841550629">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_000223__b1058517501521">445</strong>.</li><li id="admin_guide_000223__li121901359121615"><strong id="admin_guide_000223__b7170052223">Username</strong>: indicates the username set when the CIFS protocol is configured.</li><li id="admin_guide_000223__li10297967178"><strong id="admin_guide_000223__b15908135318213">Password</strong>: indicates the password set when the CIFS protocol is configured.</li><li id="admin_guide_000223__li2079535310710"><strong id="admin_guide_000223__b1240910551428">Source Path</strong>: indicates the full path of the backup file on the NAS server, for example, <em id="admin_guide_000223__i5729185717220">Backup path/Backup task name_Data source_Task creation time</em>.</li><li id="admin_guide_000223__li991684118507"><strong id="admin_guide_000223__b28731459126">Queue Name</strong>: indicates the name of the Yarn queue used for backup task execution.</li><li id="admin_guide_000223__li9312850102316"><strong id="admin_guide_000223__b141253215314">Recovery Point List</strong>: Click <strong id="admin_guide_000223__b17125321837">Refresh</strong> and select an HDFS directory that has been backed up in the standby cluster.</li><li id="admin_guide_000223__li4615111153520"><strong id="admin_guide_000223__b04891115316">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000223__b109371312931">hacluster</strong>.</li><li id="admin_guide_000223__li52291114115019"><strong id="admin_guide_000223__b8817101419317">Maximum Number of Maps</strong>: indicates the maximum number of maps in a MapReduce task. The default value is <strong id="admin_guide_000223__b681711142311">20</strong>.</li><li id="admin_guide_000223__li223017147509"><strong id="admin_guide_000223__b1838131618312">Maximum Bandwidth of a Map (MB/s)</strong>: indicates the maximum bandwidth of a map. The default value is <strong id="admin_guide_000223__b63813165313">100</strong>.</li></ul>
</li><li class="subitemlist" id="admin_guide_000223__li441312313569"><strong id="admin_guide_000223__b12955132119311">SFTP</strong>: indicates that backup files are stored in the server using the SFTP protocol.<div class="subitemlist" id="admin_guide_000223__p841418318563">If you select <strong id="admin_guide_000223__b162894271734">SFTP</strong>, set the following parameters:<ul id="admin_guide_000223__ul96991812193314"><li id="admin_guide_000223__li2257142613516"><strong id="admin_guide_000223__b1463634018318">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_000223__b452617422034">IPv4</strong> or <strong id="admin_guide_000223__b1452714220315">IPv6</strong>.</li></ul>
<ul id="admin_guide_000223__ul241493118561"><li id="admin_guide_000223__li6262143122314"><strong id="admin_guide_000223__b1350811443316">Server IP Address</strong>: indicates the IP address of the server where the backup data is stored.</li><li id="admin_guide_000223__li52631431172311"><strong id="admin_guide_000223__b1514710471933">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_000223__b13147247836">22</strong>.</li><li id="admin_guide_000223__li20263163118236"><strong id="admin_guide_000223__b13318104919314">Username</strong>: indicates the username for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000223__li3263131122316"><strong id="admin_guide_000223__b14949135019312">Password</strong>: indicates the password for connecting to the server using the SFTP protocol.</li><li id="admin_guide_000223__li18584174174219"><strong id="admin_guide_000223__b190714528310">Source Path</strong>: indicates the full path of the backup file on the backup server, for example, <em id="admin_guide_000223__i14962454737">Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time</em><strong id="admin_guide_000223__b396219541639">.tar.gz</strong>.</li><li id="admin_guide_000223__li46916435404"><strong id="admin_guide_000223__b398457130">Queue Name</strong>: indicates the name of the Yarn queue used for backup task execution.</li><li id="admin_guide_000223__li569134320405"><strong id="admin_guide_000223__b96413591639">Recovery Point List</strong>: Click <strong id="admin_guide_000223__b20643595315">Refresh</strong> and select an HDFS directory that has been backed up in the standby cluster.</li><li id="admin_guide_000223__li15672142410580"><strong id="admin_guide_000223__b12937113419">Target NameService Name</strong>: indicates the NameService name of the backup directory. The default value is <strong id="admin_guide_000223__b1782718316410">hacluster</strong>.</li><li id="admin_guide_000223__li469204374016"><strong id="admin_guide_000223__b43861651845">Maximum Number of Maps</strong>: indicates the maximum number of maps in a MapReduce task. The default value is <strong id="admin_guide_000223__b18386655413">20</strong>.</li><li id="admin_guide_000223__li1969216437400"><strong id="admin_guide_000223__b109751762412">Maximum Bandwidth of a Map (MB/s)</strong>: indicates the maximum bandwidth of a map. The default value is <strong id="admin_guide_000223__b397646843">100</strong>.</li></ul>
</div>
</li></ul>
</p></li><li id="admin_guide_000223__li6089804916247"><span>In the <strong id="admin_guide_000223__b1982121010410">Backup Data</strong> column of the <strong id="admin_guide_000223__b1783171010417">Data Configuration</strong> page, select one or more pieces of backup data that needs to be restored based on service requirements. In the <strong id="admin_guide_000223__b4831010540">Target Path</strong> column, specify the target location after backup data restoration.</span><p><p class="litext" id="admin_guide_000223__p3659261116247">You are advised to set <strong id="admin_guide_000223__b87305121542">Target Path</strong> to a new path that is different from the backup path.</p>
</p></li><li id="admin_guide_000223__li111521716247"><span>Click <strong id="admin_guide_000223__b979313141849">Verify</strong> to check whether the restoration task is configured correctly.</span><p><ul class="subitemlist" id="admin_guide_000223__ul758045316247"><li id="admin_guide_000223__li3379497016247">If the queue name is incorrect, the verification fails.</li><li id="admin_guide_000223__li3571927916247">If the specified directory to be restored does not exist, the verification fails.</li></ul>
</p></li><li id="admin_guide_000223__li1003695616247"><span>Click <strong id="admin_guide_000223__b67301421143">OK</strong>.</span></li><li id="admin_guide_000223__li5830878916247"><span>In the restoration task list, locate a created task and click <strong id="admin_guide_000223__b1372712315413">Start</strong> in the <strong id="admin_guide_000223__b1372713238413">Operation</strong> column to execute the restoration task.</span><p><ul id="admin_guide_000223__ul3630491616247"><li id="admin_guide_000223__li768709916247">After the restoration is successful, the progress bar is in green.</li><li id="admin_guide_000223__li207503416247">After the restoration is successful, the restoration task cannot be executed again.</li><li id="admin_guide_000223__li3386004116247">If the restoration task fails during the first execution, rectify the fault and click <strong id="admin_guide_000223__b175624307410">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>