Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Restoring Metadata

Updated on 2022-02-22 GMT+08:00

Scenario

You need to restore metadata in the following scenarios: A user modifies or deletes data unexpectedly, data needs to be retrieved, system data becomes abnormal or does not achieve the expected result, all modules are faulty, and data is migrated to a new cluster.

This section describes how to restore metadata on MRS Manager. Only manual restoration tasks are supported.

NOTICE:
  • Data restoration can be performed only when the system version is consistent with that during data backup.
  • To restore the data when services are normal, manually back up the latest management data first and then restore the data. Otherwise, the data that is generated after the data backup and before the data restoration will be lost.
  • Use the OMS data and LdapServer data backed up at the same time to restore data. Otherwise, the service and operation may fail.
  • By default, MRS clusters use DBService to store Hive metadata.

Impact on the System

  • After the data is restored, the data generated between the backup time and restoration time is lost.
  • After the data is restored, the configuration of the components that depend on DBService may expire and these components need to be restarted.

Prerequisites

  • The data in the OMS and LdapServer backup files has been backed up at the same time.
  • The status of the OMS resources and the LdapServer instances is normal. If the status is abnormal, data restoration cannot be performed.
  • The status of the cluster hosts and services is normal. If the status is abnormal, data restoration cannot be performed.
  • The cluster host topologies during data restoration and data backup are the same. If the topologies are different, data restoration cannot be performed and you need to back up data again.
  • The services added to the cluster during data restoration and data backup are the same. If the services are different, data restoration cannot be performed and you need to back up data again.
  • The status of the active and standby DBService instances is normal. If the status is abnormal, data restoration cannot be performed.
  • The upper-layer applications depending on the MRS cluster have been stopped.
  • On MRS Manager, you have stopped all the NameNode role instances whose data is to be recovered. Other HDFS role instances are running properly. After data is recovered, the NameNode role instances need to be restarted and cannot be accessed before the restart.
  • You have checked whether NameNode backup files have been stored in the Data save path/LocalBackup/ directory on the active management node.

Procedure

  1. Check the location of backup data.

    1. On MRS Manager, choose System > Back Up Data.
    2. In the row where the specified backup task resides, choose More > View History in the Operation column to display the historical execution records of the backup task. In the window that is displayed, select a success record and click View Backup Path in the corresponding column to view its backup path information. Find the following information:
      • Backup Object: indicates the backup data source.
      • Backup Path: indicates the full path where backup files are stored.
    3. Select the correct path, and manually copy the full path of backup files in Backup Path.

  2. Create a restoration task.

    1. On MRS Manager, choose System > Recovery Management.
    2. On the page that is displayed, click Create Restoration Task.
    3. Set Task Name to the name of the restoration task.

  3. Select restoration sources.

    In Configuration, select the metadata component whose data is to be restored.

  4. Set the restoration parameters.

    1. Set Path Type to a backup directory type.
    2. The settings vary according to backup directory types:
      • LocalDir: indicates that the backup files are stored on the local disk of the active management node. If you select LocalDir, you need to set Source Path to specify the full path of the backup file. For example, Data storage path/LocalBackup/Backup task name_Task creation time/Data source_Task execution time/Version number_Data source_Task execution time.tar.gz.
      • LocalHDFS: indicates that the backup files are stored in the HDFS directory of the current cluster. If you select SFTP, set the following parameters:
        • Source Path: indicates the full HDFS path of a backup file. for example, Backup path/Backup task name_Task creation time/Version_Data source_Task execution time.tar.gz.
        • Source Instance Name: indicates the name of NameService corresponding to the backup directory when a restoration task is being executed. The default value is hacluster.
    3. Click OK.

  5. Execute the restoration task.

    In the restoration task list, locate the row where the created task resides, and click Start in the Operation column.

    • After the restoration is successful, the progress bar is in green.
    • After the restoration is successful, the restoration task cannot be executed again.
    • If the restoration task fails during the first execution, rectify the fault and try to execute the task again by clicking Start.

  6. Determine what metadata has been restored.

    • If the OMS and LdapServer metadata is restored, go to 7.
    • If DBService data is restored, no further action is required.
    • Restore NameNode data. On MRS Manager, choose Services > HDFS > More > Restart Service. The task is complete.

  7. Restarting Manager for the recovered data to take effect

    1. In MRS Manager, Choose LdapServer > More > Restart Service and click OK. Wait until the LdapServer service is restarted successfully.
    2. Log in to the active management node. For details, see Determining Active and Standby Management Nodes of Manager.
    3. Run the following command to restart OMS:

      sh ${BIGDATA_HOME}/om-0.0.1/sbin/restart-oms.sh

      The command has been executed successfully if the following information is displayed:

      start HA successfully.
    4. On MRS Manager, choose KrbServer > More > Synchronize Configuration. Do not select Restart the services and instances whose configuration has expired. Click OK and wait until the KrbServer service configuration is synchronized and restarted successfully.
    5. Choose Services > More > Synchronize Configuration. Do not select Restart the services and instances whose configuration has expired. Click OK and wait until the cluster is configured and synchronized successfully.
    6. Choose Services > More > Stop Cluster. After the cluster is stopped, choose Services > More> Start Cluster.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback