WO2017219678A1 - 一种数据恢复方法、装置及云存储系统 - Google Patents

一种数据恢复方法、装置及云存储系统 Download PDF

Info

Publication number
WO2017219678A1
WO2017219678A1 PCT/CN2017/073343 CN2017073343W WO2017219678A1 WO 2017219678 A1 WO2017219678 A1 WO 2017219678A1 CN 2017073343 W CN2017073343 W CN 2017073343W WO 2017219678 A1 WO2017219678 A1 WO 2017219678A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
metadata database
index
storage node
index data
Prior art date
Application number
PCT/CN2017/073343
Other languages
English (en)
French (fr)
Inventor
张克涛
许爱秋
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US16/312,587 priority Critical patent/US10824372B2/en
Priority to EP17814417.6A priority patent/EP3477914B1/en
Publication of WO2017219678A1 publication Critical patent/WO2017219678A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/59Providing operational support to end devices by off-loading in the network or by emulation, e.g. when they are unavailable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • G06F3/0641De-duplication techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present application relates to the field of cloud storage technologies, and in particular, to a data recovery method, apparatus, and cloud storage system.
  • a cloud storage system refers to a system that integrates various types of storage devices in a network through application software through cluster applications, network technologies, or distributed file systems to provide users with data storage and service access functions. .
  • the application cloud storage system can meet the user's convenient access to data at any time and any place.
  • the existing cloud storage system may include a management node (CVM, Cloud Video Management), a video access node (CVA, Cloud Video Access), and a storage node (CVS, Cloud Video Storage).
  • the management node mainly provides management services for the cloud storage system and stores the metadata.
  • the video access node is mainly responsible for video capture and stores the captured video on the storage node.
  • the storage node is mainly responsible for managing storage devices, providing data writing and reading services.
  • the management node may store the metadata in a metadata database, and the metadata database may include configuration data and index data.
  • the configuration data refers to some basic configuration information of the cloud storage system, such as information of a video access node in the cluster, information of a storage management node in the cluster, and the like.
  • the index data refers to address information of videos, files, pictures, or other resources written by users stored in the cloud storage system, such as device information, block information, segment information, and the like of a storage node that stores the foregoing resources.
  • the above metadata database can be a distributed database, such as the Hbase database.
  • the Hbase database is a Hadoop cluster-based database that is widely used in distributed environments. Hadoop cluster can To ensure the consistency of data in the Hbase database of each node in the cluster. However, if the Hadoop cluster is damaged due to power outages, network disconnection, etc., the metadata in the Hbase database will not be recoverable.
  • the purpose of the embodiments of the present application is to provide a data recovery method and device, and a cloud storage system, to solve the problem that metadata in the cloud storage system cannot be recovered.
  • the embodiment of the present application discloses a data recovery method, which is applied to a management node in a cloud storage system, where the cloud storage system further includes a storage node, and the method includes:
  • the metadata database is set to an accessible state to cause the metadata database to resume service.
  • the backup data of the configuration data is read, and the backup data is added to the metadata database, which may include:
  • the method may further include:
  • An integrity check is performed on the backup data added to the metadata database.
  • the obtaining the index data of the stored data in the storage node, and adding the index data to the metadata database may include:
  • the index data is added to the metadata database.
  • the generating the index data of the stored data in the storage node according to the parsing result may include:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the filtering the parsing result according to the preset filtering rule may include:
  • the information in the parsing result that does not match the backup data is deleted.
  • the adding the index data to the metadata database may include:
  • the data in the preset file is added to the metadata database by using the import tool.
  • the embodiment of the present application further discloses a data recovery device, which is applied to a management node in a cloud storage system, where the cloud storage system further includes a storage node, including:
  • a building module configured to build a blank metadata database, and set the metadata database to be inaccessible
  • a first adding module configured to read backup data of the configuration data, and add the backup data to the metadata database
  • a second adding module configured to acquire index data of the stored data in the storage node, and add the index data to the metadata database
  • a setting module configured to set the metadata database to an accessible state to enable the element Data database recovery service.
  • the first adding module may include:
  • a first obtaining submodule configured to obtain backup data of the configuration data from the first file, where the backup data is stored in the first file according to a preset storage format
  • the first adding submodule is configured to parse the backup data according to the preset storage format, and add the parsed data to the metadata database.
  • the device may further include:
  • An inspection module for performing an integrity check on the backup data added to the metadata database.
  • the second adding module may include:
  • a reading and analyzing sub-module configured to read and parse an index export file in the storage node, where the index export file stores information of index data of the stored data in the storage node;
  • Generating a submodule configured to generate index data of the stored data in the storage node according to the parsing result
  • a second adding submodule for adding the index data to the metadata database.
  • the generating submodule is specifically configured to:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the generating submodule is specifically configured to:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the second adding submodule is specifically configured to:
  • the data in the preset file is added to the metadata database by using the import tool.
  • the embodiment of the present application further discloses a cloud storage system, including: a management node and a storage node, where
  • the management node is configured to construct a blank metadata database, set the metadata database to a non-accessible state, read backup data of the configuration data, and add the backup data to the metadata database; Obtaining, in the storage node, index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the Metadata database recovery service;
  • the storage node is configured to obtain index data of the stored data, and send the index data to the management node.
  • an embodiment of the present application further discloses a management node, including: a casing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the casing, the processor and the The memory is disposed on the circuit board; the power circuit is configured to supply power to each circuit or device of the management node; the memory is used to store executable program code; and the processor runs and executes the program by reading executable program code stored in the memory.
  • an embodiment of the present application further discloses an executable program code for being executed to execute the above data recovery method.
  • an embodiment of the present application further discloses a storage medium for storing executable program code for being executed to execute the above data recovery method.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of configuration data, and adds the backup data.
  • Adding to the metadata database acquiring index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, To restore the metadata database to the service. It can be seen that, when the metadata database is damaged, the metadata database is reconstructed, the configuration data and the index data are obtained, and the obtained configuration data and index data are added to the constructed new database, and the pair element is realized. Recovery of data.
  • FIG. 1 is a schematic flowchart of a data recovery method according to an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a cloud storage system according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a management node according to an embodiment of the present application.
  • the embodiment of the present application provides a data recovery method, device, and cloud storage system.
  • the data recovery method and device are applied to a management node in a cloud storage system, and the cloud storage system may include a management node 301 and a storage node 302, and may also include a video access node, etc., as shown in FIG. No restrictions.
  • the management node stores the metadata in the form of a metadata database.
  • FIG. 1 is a schematic flowchart of a data recovery method according to an embodiment of the present disclosure, including:
  • S101 Construct a blank metadata database, and set the metadata database to a state that is not accessible.
  • the management node may be automatically triggered to perform the data recovery method provided by the embodiment of the present application.
  • the data recovery method provided by the embodiment of the present application can also be manually triggered, and is not limited herein.
  • the reconstructed metadata database is a blank metadata database. Since the blank metadata database does not contain any information, and the process of reconstructing the metadata database, the data contained in the metadata database is incomplete, in order to prevent the metadata database. Providing erroneous data, which cannot be connected to a video access node or a storage node before the reconstruction of the metadata data is completed, that is, the external service cannot be provided. Therefore, the IP address of the externally provided service of the blank metadata database needs to be modified.
  • the metadata database is set to be inaccessible, avoiding video access nodes, and the storage nodes are connected to provide external services.
  • S102 Read backup data of the configuration data, and add the backup data to the metadata database.
  • the characteristic of the configuration data is that the amount of data is small and the modification frequency is low. Therefore, the management node can back up the configuration data every preset time period or when the configuration data changes, and store the backup data of the configuration data into a preset file, for example, /home/backup.txt.
  • this step may include:
  • the above first file can be understood as a preset file.
  • the storage format may be determined according to attribute information of the first file, and the foregoing preset storage format may be as follows:
  • the backup data of the configuration data is obtained from the above /home/backup.txt. Since the backup data is stored according to a preset storage format, the acquired backup data needs to be parsed according to the preset storage format. The parsed configuration data is added to the built metadata database.
  • the backup data of the configuration data can be directly added to the metadata database, simplifying The recovery operation of the configuration data.
  • the backup data added to the metadata database may be checked for integrity.
  • the prompt information may be sent to prompt the relevant personnel to perform processing.
  • S103 Acquire index data of the stored data in the storage node, and add the index data to the metadata database.
  • Index data refers to the address information of videos, files, pictures or other resources written by users stored in the cloud storage system. Index data has a large amount of data, and as long as a user writes new data in the cloud storage system, the index data changes. If the index data is also backed up and stored, it will occupy a very large resource, and frequent updates to the backup data may cause the system to crash. Therefore, another way of storing the index data is taken.
  • this step may include:
  • the index data is added to the metadata database.
  • an index export function unit may be run in the storage node, and the index export function unit acquires index data of the stored data in the storage node by signaling interaction with the storage node.
  • the index export function unit may be connected to the communication port 8527 of the storage node, and the index data in the storage node is obtained through the communication port. The obtained index data is then stored in a fixed format in an index export file, which may be /home/index_vsid.txt.
  • a file management system can be run in the storage node, and the file management system can store index data of all the data stored in the storage node, and the index export function unit can obtain the index data through the file management system.
  • the management node reads the above index export file into the storage node. Since the index data is stored in the index export file in a fixed format, the index export file can be parsed by using the format, and then the index data included in the parsing result is sequentially input into the metadata database according to the format, or The index data of the stored data in the storage node is reconstructed (that is, reconstructed) according to the analysis result, and the reconstructed index data is stored in the metadata database.
  • the re-construction process can be understood as: adjusting the storage format or storage order of the parsed index data according to a preset mapping relationship or a preset rule, so that the adjusted index data can match the metadata database. Specifically, the parsed index data can be reconstructed into tsv_data.txt, and tsv_data.txt is added to the metadata database.
  • the index data Since the index data has a large amount of data and a high modification frequency, the index data is not backed up and stored, but the storage node stores the index data of the stored data in its own device into the index export file. In this way, there is no need to back up the index data, and only when the metadata database is reconstructed, the management node exports the file according to the index, reconstructs the index data, and adds the reconstructed index data to the metadata database, thereby reducing the data volume and frequency of the data backup. .
  • the index data of the stored data in the storage node is generated according to the analysis result, which may include:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the result of the analysis is the index data obtained after parsing, and there may be redundant or invalid index data in the index data obtained after parsing. Therefore, the index data may be filtered first, and then the index data of the stored data in the storage node is reconstructed according to the filtered index data.
  • filtering the parsing result according to the preset filtering rule may include:
  • the information in the parsing result that does not match the backup data is deleted.
  • index data is valid according to the backup data of the configuration data added to the metadata database. If the index data does not match the backup data, it indicates that the index data has expired. For example, if the backup data of the configuration data indicates that a video access node does not exist, and the index data still includes the index data corresponding to the video access node, it indicates that the index data corresponding to the video access node has expired. Delete invalid index data.
  • adding index data to the metadata database may include:
  • the data in the preset file is added to the metadata database by using the import tool.
  • the default file can be tsv_data.txt above.
  • the metadata database comes with an import tool. Importing data into a metadata database with its own import tool is faster and more efficient than importing data in batches. Therefore, the import tool can be determined based on the metadata database. For example, the import tool that comes with the hbase database is importedtsv. Add tsv_data.txt to hbase using importtsv In the database. Of course, you can also use the third-party import tool to import data into the metadata database, no restrictions here.
  • S104 Set the metadata database to an accessible state to restore the metadata database to the service.
  • the configuration data and the index data are added to the constructed metadata database, and the metadata database can be connected with the video access node or the storage node to provide an external service. Therefore, the metadata database needs to be externally
  • the IP address of the service provided is re-modified to an accessible state. In this way, the recovery of the metadata database is completed.
  • the management node constructs a blank metadata database, sets the metadata database to be inaccessible; reads backup data of configuration data, and adds the backup data to the element.
  • the data database acquiring index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the element Data database recovery service. It can be seen that, when the metadata database is damaged, the metadata database is reconstructed, the configuration data and the index data are obtained, and the obtained configuration data and index data are added to the constructed new database, and the pair element is realized. Recovery of data.
  • the embodiment of the present application further provides a data recovery device.
  • FIG. 2 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present disclosure, including:
  • a building module 201 configured to build a blank metadata database, and set the metadata database to be inaccessible
  • the first adding module 202 is configured to read backup data of the configuration data, and add the backup data to the metadata database;
  • a second adding module 203 configured to acquire index data of the stored data in the storage node, and add the index data to the metadata database;
  • the setting module 204 is configured to set the metadata database to an accessible state to restore the metadata database to a service.
  • the first adding module may include: a first acquiring submodule and a first adding sub-module (not shown), wherein
  • a first obtaining submodule configured to obtain backup data of the configuration data from the first file, where the backup data is stored in the first file according to a preset storage format
  • the first adding submodule is configured to parse the backup data according to the preset storage format, and add the parsed data to the metadata database.
  • the device may further include:
  • An inspection module (not shown) for performing an integrity check on the backup data added to the metadata database.
  • the second adding module 203 may include: a read parsing submodule, a generating submodule, and a second adding submodule (not shown), where
  • a reading and analyzing sub-module configured to read and parse an index export file in the storage node, where the index export file stores information of index data of the stored data in the storage node;
  • Generating a submodule configured to generate index data of the stored data in the storage node according to the parsing result
  • a second adding submodule for adding the index data to the metadata database.
  • the generating sub-module may be specifically used to:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the generating sub-module may be specifically used to:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the second adding submodule may be specifically used to:
  • the data in the preset file is added to the metadata database by using the import tool.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of configuration data, and adds the backup data to the element.
  • the data database acquiring index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the element Data database recovery service.
  • FIG. 3 is a schematic structural diagram of a cloud storage system according to an embodiment of the present disclosure, including:
  • a management node 301 configured to build a blank metadata database, set the metadata database to a non-accessible state; read backup data of the configuration data, and add the backup data to the metadata database; Obtaining index data of the stored data in the storage node in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the element Data database recovery service.
  • the storage node 302 is configured to obtain index data of the stored data, and send the index data to the management node.
  • the management node 301 can also be used to:
  • the management node 301 can also be used to:
  • An integrity check is performed on the backup data added to the metadata database.
  • the management node 301 can also be used to:
  • the index data is added to the metadata database.
  • the management node 301 can also be used to:
  • Index data of the stored data in the storage node is generated based on the analysis result after the filtering process.
  • the management node 301 can also be used to:
  • the information in the parsing result that does not match the backup data is deleted.
  • the management node 301 can also be used to:
  • the data in the preset file is added to the metadata database by using the import tool.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of configuration data, and adds the backup data to the element.
  • the data database acquiring index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the element Data database recovery service.
  • the device includes a housing 401, a processor 402, a memory 403, a circuit board 404, and a power circuit 405.
  • the circuit board 404 is disposed in the housing 401.
  • the processor 402 and the memory 403 are disposed on the circuit board 404;
  • the power supply circuit 405 is used to supply power to the respective circuits or devices of the management node;
  • the memory 403 is used to store executable program code;
  • the processor 402 is read by
  • the executable program code stored in the memory 403 is configured to execute a program corresponding to the executable program code for executing the data recovery method, the method comprising:
  • the metadata database is set to an accessible state to cause the metadata database to resume service.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of configuration data, and adds the backup data to the element.
  • the data database acquiring index data of the stored data in the storage node, adding the index data to the metadata database; setting the metadata database to an accessible state, so that the element Data database recovery service.
  • the embodiment of the present application further provides an executable program code, where the executable program code is used to be executed to execute the data recovery method, and the method includes:
  • the metadata database is set to an accessible state to cause the metadata database to resume service.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of the configuration data, and adds the backup data to the metadata database.
  • Obtaining index data of the stored data in the storage node adding the index data to the metadata database; setting the metadata database to an accessible state, so that the metadata database Restore the service. It can be seen that, when the metadata database is damaged, the metadata database is reconstructed, the configuration data and the index data are obtained, and the obtained configuration data and index data are added to the constructed new database, and the pair element is realized. Recovery of data.
  • the embodiment of the present application further provides a storage medium for storing executable program code, where the executable program code is used to execute the data recovery method, and the method includes:
  • the metadata database is set to an accessible state to cause the metadata database to resume service.
  • the management node constructs a blank metadata database, sets the metadata database to a non-accessible state, reads backup data of the configuration data, and adds the backup data to the metadata database.
  • Obtaining index data of the stored data in the storage node adding the index data to the metadata database; setting the metadata database to an accessible state, so that the metadata database Restore the service. It can be seen that, when the metadata database is damaged, the metadata database is reconstructed, the configuration data and the index data are obtained, and the obtained configuration data and index data are added to the constructed new database, and the pair element is realized. Recovery of data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种数据恢复方法、装置及云存储系统,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。

Description

一种数据恢复方法、装置及云存储系统
本申请要求于2016年6月22日提交中国专利局、申请号为201610464595.5、发明名称为“一种数据恢复方法、装置及云存储系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云存储技术领域,特别涉及一种数据恢复方法、装置及云存储系统。
背景技术
随着科技的不断发展,云存储系统已被广泛应用。云存储系统是指通过集群应用、网络技术或分布式文件系统等功能,将网络中各种不同类型的存储设备通过应用软件集合起来协同工作,能够向用户提供数据存储和业务访问功能的一个系统。应用云存储系统,可以满足用户在任何时间、任何地点方便地存取数据。
现有的云存储系统可以包括管理节点(CVM,Cloud Video Management)、视频接入节点(CVA,Cloud Video Access)和存储节点(CVS,Cloud Video Storage)。其中,管理节点主要为云存储系统提供管理服务,并对元数据进行存储。视频接入节点主要负责视频采集,并将采集到的视频存储到存储节点上。存储节点主要负责管理存储设备,提供数据的写入,读取服务。
上述管理节点可以以元数据数据库的方式对元数据进行存储,元数据数据库中可以包括配置数据以及索引数据。其中,配置数据是指云存储系统的一些基本配置信息,比如集群中的视频接入节点的信息,集群中的存储管理节点的信息等。索引数据是指云存储系统中存储的用户写入的视频、文件、图片或其他资源的地址信息,比如存储上述资源的存储节点的设备信息、块信息、段信息等等。当用户向管理节点提交查询请求时,管理节点通过存储的索引数据将该查询请求对应的资源的地址信息返回给用户,以使用户获得该资源。
上述元数据数据库可以为分布式数据库,比如Hbase数据库。Hbase数据库是广泛应用于分布式环境中的基于Hadoop集群的数据库。Hadoop集群可 以保证集群中各个节点的Hbase数据库中数据的一致性。但是,如果出现断电、断网等情况使Hadoop集群受到损坏,则Hbase数据库中的元数据将无法进行恢复。
发明内容
本申请实施例的目的在于提供一种数据恢复方法、装置及云存储系统,以解决云存储系统中的元数据无法恢复的问题。
为达到上述目的,本申请实施例公开了一种数据恢复方法,应用于云存储系统中的管理节点,所述云存储系统还包括存储节点,方法包括:
构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
可选的,所述读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中,可以包括:
从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
可选的,所述方法还可以包括:
对添加到所述元数据数据库中的所述备份数据进行完整性检查。
可选的,所述获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中,可以包括:
读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
对所述索引导出文件进行解析;
根据解析结果生成所述存储节点中已存储数据的索引数据;
将所述索引数据添加到所述元数据数据库中。
可选的,所述根据解析结果生成所述存储节点中已存储数据的索引数据,可以包括:
按照预设的过滤规则对解析结果进行过滤处理;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
可选的,所述按照预设的过滤规则对解析结果进行过滤处理,可以包括:
对解析结果中相同的信息进行去重处理;和/或
删除解析结果中与所述备份数据不匹配的信息。
可选的,所述将所述索引数据添加到所述元数据数据库中,可以包括:
将所述索引数据存储至预设的文件中;
根据所述元数据数据库,确定导入工具;
利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
为达到上述目的,本申请实施例还公开了一种数据恢复装置,应用于云存储系统中的管理节点,所述云存储系统还包括存储节点,包括:
构建模块,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
第一添加模块,用于读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
第二添加模块,用于获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
设置模块,用于将所述元数据数据库设置为可接入的状态,以使所述元 数据数据库恢复服务。
可选的,所述第一添加模块,可以包括:
第一获取子模块,用于从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
第一添加子模块,用于根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
可选的,所述装置还可以包括:
检查模块,用于对添加到所述元数据数据库中的所述备份数据进行完整性检查。
可选的,所述第二添加模块,可以包括:
读取解析子模块,用于读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
生成子模块,用于根据解析结果生成所述存储节点中已存储数据的索引数据;
第二添加子模块,用于将所述索引数据添加到所述元数据数据库中。
可选的,所述生成子模块,具体可以用于:
按照预设的过滤规则对解析结果进行过滤处理;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
可选的,所述生成子模块,具体可以用于:
对解析结果中相同的信息进行去重处理;和/或
删除解析结果中与所述备份数据不匹配的信息;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
可选的,所述第二添加子模块,具体可以用于:
将所述索引数据存储至预设的文件中;
根据所述元数据数据库,确定导入工具;
利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
为达到上述目的,本申请实施例还公开了一种云存储系统,包括:管理节点和存储节点,其中,
所述管理节点,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;从所述存储节点中获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务;
所述存储节点,用于获得已存储数据的索引数据,将所述索引数据发送给所述管理节点。
为达到上述目的,本申请实施例还公开了一种管理节点,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为管理节点的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行上述数据恢复方法。
为达到上述目的,本申请实施例还公开了一种可执行程序代码,所述可执行程序代码用于被运行以执行上述数据恢复方法。
为达到上述目的,本申请实施例还公开了一种存储介质,所述存储介质用于存储可执行程序代码,所述可执行程序代码用于被运行以执行上述数据恢复方法。
应用本申请实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添 加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
附图说明
为了更清楚地说明本申请实施例和相关技术的技术方案,下面对实施例和相关技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种数据恢复方法的流程示意图;
图2为本申请实施例提供的一种数据恢复装置的结构示意图;
图3为本申请实施例提供的一种云存储系统的结构示意图;
图4为本申请实施例所提供的一种管理节点的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了解决上述技术问题,本申请实施例提供了一种数据恢复方法、装置及云存储系统。其中,数据恢复方法及装置应用于云存储系统中的管理节点,所述云存储系统可以如图3所示,包括管理节点301和存储节点302,当然还可以包括视频接入节点等,在此不做限制。管理节点以元数据数据库的方式对元数据进行存储。
下面首先对本申请实施例提供的数据恢复方法进行详细说明。
图1为本申请实施例提供的一种数据恢复方法的流程示意图,包括:
S101:构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态。
当出现断电、断网等情况时,元数据数据库受到损坏,需要重新构建元数据数据库。作为本申请的一种实施方式,当恢复供电或者网络重新连接时,可以自动触发管理节点执行本申请实施例提供的数据恢复方法。当然,也可以人工触发本申请实施例提供的数据恢复方法,在此不做限制。
另外,重新构建的元数据数据库是空白元数据数据库,由于空白元数据数据库中不包含任何信息,且重构元数据数据库的过程中,元数据数据库中所包含的数据不全,为防止元数据数据库提供错误的数据,在重构元数据数据完成前不能与视频接入节点或存储节点等相连接,也就是不能对外提供服务,因此,需要修改该空白元数据数据库对外提供服务的IP地址,将该元数据数据库设置为不可接入的状态,避免视频接入节点,存储节点连接过来对外提供服务。
S102:读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中。
配置数据的特点是数据量少,修改频率较低。因此,管理节点可以每隔预设时间段或者当配置数据发生改变时,对上述配置数据进行备份,将上述配置数据的备份数据存储至预设的文件中,例如,/home/backup.txt。
具体的,在本申请所示实施例中,本步骤可以包括:
从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
上述第一文件可以理解为预设的文件。作为本申请的一种实施方式,存储格式可以根据第一文件的属性信息确定,上述预设的存储格式可以如下所示:
Figure PCTCN2017073343-appb-000001
管理节点构建空白元数据数据库后,从上述/home/backup.txt中获取配置数据的备份数据。由于上述备份数据是按照预设的存储格式进行存储的,因而,需要根据该预设的存储格式对获取的备份数据进行解析。将解析后得到的配置数据添加到构建的元数据数据库中。
由于配置数据数据量少,修改频率较低,对配置数据进行备份存储,并不占用太多资源,而且在重建元数据数据库时,可以直接将配置数据的备份数据添加到元数据数据库中,简化了配置数据的恢复操作。
作为本申请的一种实施方式,可以对添加到该元数据数据库中的备份数据进行完整性检查,当检查不通过时,可以发送提示信息,以提示相关人员进行处理。
S103:获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中。
索引数据是指云存储系统中存储的用户写入的视频、文件、图片或其他资源的地址信息。索引数据的数据量很大,而且只要有用户在云存储系统中写入新的数据,索引数据就会发生变更。如果对索引数据也进行备份存储,会占用非常大的资源,而且频繁地对备份数据进行更新很可能导致系统崩溃。因此,对索引数据采取另一种存储方式。
具体的,在本申请所示实施例中,本步骤可以包括:
读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
根据解析结果生成所述存储节点中已存储数据的索引数据;
将所述索引数据添加到所述元数据数据库中。
在本申请所示实施例中,可以在存储节点中运行索引导出功能单元,该索引导出功能单元通过与存储节点的信令交互获取到该存储节点中已存储数据的索引数据。具体的,该索引导出功能单元可以连接存储节点的通信端口8527,通过该通信端口获取该存储节点中的索引数据。然后将获取到的索引数据以固定的格式存储到索引导出文件中,该索引导出文件可以为/home/index_vsid.txt。
可以理解的是,存储节点中可以运行有文件管理系统,文件管理系统中可以存储有该存储节点中已存储的所有数据的索引数据,索引导出功能单元可以通过文件管理系统获取索引数据。
管理节点到存储节点中读取上述索引导出文件。由于索引数据是以固定的格式存储在索引导出文件中,因此可以利用该格式对索引导出文件进行解析,然后依照该格式,将该解析结果中包含的索引数据,顺序输入元数据数据库,或者,根据解析结果重新构建(即重构)该存储节点中已存储数据的索引数据,将重新构建后的索引数据存入元数据数据库中。重新构建的过程可以理解为,依照预设的映射关系或者预设规则,将解析出的索引数据的存储格式或存储顺序进行调整,以使得调整后的索引数据能够与元数据数据库匹配。具体的,可以将解析后的索引数据重新构建为tsv_data.txt,将tsv_data.txt添加到该元数据数据库中。
由于索引数据数据量大,修改频率高,因此不对索引数据进行备份存储,而是由存储节点将自身设备中已存储数据的索引数据存储到索引导出文件中。这样,无需备份索引数据,只需在重建元数据数据库时,管理节点根据索引导出文件,重构索引数据,将重构的索引数据添加到元数据数据库中,降低了数据备份的数据量和频率。
在本申请所示实施例中,根据解析结果生成所述存储节点中已存储数据的索引数据,可以包括:
按照预设的过滤规则对解析结果进行过滤处理;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
解析结果即为解析后得到的索引数据,解析后得到的索引数据中可能存在冗余或者失效的索引数据。因此,可以先将索引数据进行过滤,然后根据过滤后的索引数据重构该存储节点中已存储数据的索引数据。
具体的,按照预设的过滤规则对解析结果进行过滤处理,可以包括:
对解析结果中相同的信息进行去重处理;和/或
删除解析结果中与所述备份数据不匹配的信息。
如果解析后得到的索引数据中存在冗余信息,则对相同的信息进行去重处理。另外,可以根据添加到元数据数据库中的配置数据的备份数据,验证索引数据是否有效,如果索引数据与该备份数据不匹配,则表示索引数据已失效。比如,配置数据的备份数据中显示某视频接入节点已经不存在,而索引数据中仍包括该视频接入节点对应的索引数据,则表示该视频接入节点对应的索引数据已失效。删除失效的索引数据。
在本申请所示实施例中,将索引数据添加到元数据数据库中,可以包括:
将所述索引数据存储至预设的文件中;
根据所述元数据数据库,确定导入工具;
利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
预设的文件可以为上述tsv_data.txt。通常情况下,元数据数据库会自带导入工具。利用自带导入工具将数据导入到元数据数据库比批量导入数据速度更快,效率更高。因此,可以根据元数据数据库,确定导入工具。比如,hbase数据库自带的导入工具为importtsv。利用importtsv,将tsv_data.txt添加到hbase 数据库中。当然也可以利用第三方导入工具,将数据导入到元数据数据库,在此不做限制。
S104:将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
经过上述步骤,将配置数据及索引数据添加到构建的元数据数据库中,该元数据数据库已经可以与视频接入节点或存储节点等相连接以提供对外服务,因此,需要将该元数据数据库对外提供服务的IP地址重新修改为可接入的状态。这样,就完成了元数据数据库的恢复。
应用本申请图1所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
与上述的方法实施例相对应,本申请实施例还提供一种数据恢复装置。
图2为本申请实施例提供的一种数据恢复装置的结构示意图,包括:
构建模块201,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
第一添加模块202,用于读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
第二添加模块203,用于获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
设置模块204,用于将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
在本申请所示实施例中,第一添加模块,可以包括:第一获取子模块和 第一添加子模块(图中未示出),其中,
第一获取子模块,用于从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
第一添加子模块,用于根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
在本申请所示实施例中,所述装置还可以包括:
检查模块(图中未示出),用于对添加到所述元数据数据库中的所述备份数据进行完整性检查。
在本申请所示实施例中,第二添加模块203,可以包括:读取解析子模块、生成子模块和第二添加子模块(图中未示出),其中,
读取解析子模块,用于读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
生成子模块,用于根据解析结果生成所述存储节点中已存储数据的索引数据;
第二添加子模块,用于将所述索引数据添加到所述元数据数据库中。
在本申请所示实施例中,所述生成子模块,具体可以用于:
按照预设的过滤规则对解析结果进行过滤处理;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
在本申请所示实施例中,所述生成子模块,具体可以用于:
对解析结果中相同的信息进行去重处理;和/或
删除解析结果中与所述备份数据不匹配的信息;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
在本申请所示实施例中,所述第二添加子模块,具体可以用于:
将所述索引数据存储至预设的文件中;
根据所述元数据数据库,确定导入工具;
利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
应用本申请图2所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
图3为本申请实施例提供的一种云存储系统的结构示意图,包括:
管理节点301,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;从所述存储节点中获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
存储节点302,用于获得已存储数据的索引数据,将所述索引数据发送给所述管理节点。
在本申请所示实施例中,管理节点301还可以用于:
从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
在本申请所示实施例中,管理节点301还可以用于:
对添加到所述元数据数据库中的所述备份数据进行完整性检查。
在本申请所示实施例中,管理节点301还可以用于:
读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
根据解析结果生成所述存储节点中已存储数据的索引数据;
将所述索引数据添加到所述元数据数据库中。
在本申请所示实施例中,管理节点301还可以用于:
按照预设的过滤规则对解析结果进行过滤处理;
根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
在本申请所示实施例中,管理节点301还可以用于:
对解析结果中相同的信息进行去重处理;和/或
删除解析结果中与所述备份数据不匹配的信息。
在本申请所示实施例中,管理节点301还可以用于:
将所述索引数据存储至预设的文件中;
根据所述元数据数据库,确定导入工具;
利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
应用本申请图3所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现 了对元数据的恢复。
本申请实施例还提供了一种管理节点,如图4所示,包括:壳体401、处理器402、存储器403、电路板404和电源电路405,其中,电路板404安置在壳体401围成的空间内部,处理器402和存储器403设置在电路板404上;电源电路405,用于为管理节点的各个电路或器件供电;存储器403用于存储可执行程序代码;处理器402通过读取存储器403中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行所述数据恢复方法,方法包括:
构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
应用本申请图4所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
本申请实施例还提供了一种可执行程序代码,所述可执行程序代码用于被运行以执行所述数据恢复方法,方法包括:
构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所 述元数据数据库中;
将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
应用本申请所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
本申请实施例还提供了一种存储介质,所述存储介质用于存储可执行程序代码,所述可执行程序代码用于被运行以执行所述数据恢复方法,方法包括:
构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
应用本申请所示实施例,管理节点构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。由此可见,应用本方案,当元数据数据库受到损坏后,重新构建元数据数据库,并获得配置数据及索引数据,将获得的配置数据及索引数据添加到构建的新数据库中,实现了对元数据的恢复。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (18)

  1. 一种数据恢复方法,应用于云存储系统中的管理节点,所述云存储系统还包括存储节点,其特征在于,包括:
    构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
    读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
    获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
    将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
  2. 根据权利要求1所述的方法,其特征在于,所述读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中,包括:
    从第一文件中获取配置数据的备份数据;其中,所述备份数据是按照预设的存储格式存储在所述第一文件中的;
    根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    对添加到所述元数据数据库中的所述备份数据进行完整性检查。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中,包括:
    读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
    根据解析结果生成所述存储节点中已存储数据的索引数据;
    将所述索引数据添加到所述元数据数据库中。
  5. 根据权利要求4所述的方法,其特征在于,所述根据解析结果生成所述存储节点中已存储数据的索引数据,包括:
    按照预设的过滤规则对解析结果进行过滤处理;
    根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
  6. 根据权利要求5所述的方法,其特征在于,所述按照预设的过滤规则对解析结果进行过滤处理,包括:
    对解析结果中相同的信息进行去重处理;和/或
    删除解析结果中与所述备份数据不匹配的信息。
  7. 根据权利要求4所述的方法,其特征在于,所述将所述索引数据添加到所述元数据数据库中,包括:
    将所述索引数据存储至预设的文件中;
    根据所述元数据数据库,确定导入工具;
    利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
  8. 一种数据恢复装置,应用于云存储系统中的管理节点,所述云存储系统还包括存储节点,其特征在于,包括:
    构建模块,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;
    第一添加模块,用于读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;
    第二添加模块,用于获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;
    设置模块,用于将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务。
  9. 根据权利要求8所述的装置,其特征在于,所述第一添加模块,包括:
    第一获取子模块,用于从第一文件中获取配置数据的备份数据;其中, 所述备份数据是按照预设的存储格式存储在所述第一文件中的;
    第一添加子模块,用于根据所述预设的存储格式,解析所述备份数据,并将解析后的数据添加到所述元数据数据库中。
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    检查模块,用于对添加到所述元数据数据库中的所述备份数据进行完整性检查。
  11. 根据权利要求8-10中任一项所述的装置,其特征在于,所述第二添加模块,包括:
    读取解析子模块,用于读取并解析所述存储节点中的索引导出文件,其中,所述索引导出文件中存储有所述存储节点中已存储数据的索引数据的信息;
    生成子模块,用于根据解析结果生成所述存储节点中已存储数据的索引数据;
    第二添加子模块,用于将所述索引数据添加到所述元数据数据库中。
  12. 根据权利要求11所述的装置,其特征在于,所述生成子模块,具体用于:
    按照预设的过滤规则对解析结果进行过滤处理;
    根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
  13. 根据权利要求11所述的装置,其特征在于,所述生成子模块,具体用于:
    对解析结果中相同的信息进行去重处理;和/或
    删除解析结果中与所述备份数据不匹配的信息;
    根据过滤处理后的解析结果,生成所述存储节点中已存储数据的索引数据。
  14. 根据权利要求11所述的装置,其特征在于,所述第二添加子模块,具体用于:
    将所述索引数据存储至预设的文件中;
    根据所述元数据数据库,确定导入工具;
    利用所述导入工具,将所述预设文件中的数据添加到所述元数据数据库中。
  15. 一种云存储系统,其特征在于,包括:管理节点和存储节点,其中,
    所述管理节点,用于构建空白元数据数据库,将所述元数据数据库设置为不可接入的状态;读取配置数据的备份数据,将所述备份数据添加到所述元数据数据库中;从所述存储节点中获取所述存储节点中已存储数据的索引数据,将所述索引数据添加到所述元数据数据库中;将所述元数据数据库设置为可接入的状态,以使所述元数据数据库恢复服务;
    所述存储节点,用于获得已存储数据的索引数据,将所述索引数据发送给所述管理节点。
  16. 一种管理节点,其特征在于,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为管理节点的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行权利要求1-7任一项所述的数据恢复方法。
  17. 一种可执行程序代码,其特征在于,所述可执行程序代码用于被运行以执行权利要求1-7任一项所述的数据恢复方法。
  18. 一种存储介质,其特征在于,所述存储介质用于存储可执行程序代码,所述可执行程序代码用于被运行以执行权利要求1-7任一项所述的数据恢复方法。
PCT/CN2017/073343 2016-06-22 2017-02-13 一种数据恢复方法、装置及云存储系统 WO2017219678A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/312,587 US10824372B2 (en) 2016-06-22 2017-02-13 Data recovery method and device, and cloud storage system
EP17814417.6A EP3477914B1 (en) 2016-06-22 2017-02-13 Data recovery method and device, and cloud storage system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610464595.5 2016-06-22
CN201610464595.5A CN107528872B (zh) 2016-06-22 2016-06-22 一种数据恢复方法、装置及云存储系统

Publications (1)

Publication Number Publication Date
WO2017219678A1 true WO2017219678A1 (zh) 2017-12-28

Family

ID=60735198

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073343 WO2017219678A1 (zh) 2016-06-22 2017-02-13 一种数据恢复方法、装置及云存储系统

Country Status (4)

Country Link
US (1) US10824372B2 (zh)
EP (1) EP3477914B1 (zh)
CN (1) CN107528872B (zh)
WO (1) WO2017219678A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990664A (zh) * 2019-12-16 2020-04-10 云赛智联股份有限公司 一种大数据运营管理系统
CN111143158A (zh) * 2019-12-04 2020-05-12 武汉光谷信息技术股份有限公司 一种监控数据实时存储方法、系统、电子设备及存储介质
CN111638995A (zh) * 2020-05-08 2020-09-08 杭州海康威视系统技术有限公司 元数据备份方法、装置及设备、存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11061713B2 (en) * 2017-08-07 2021-07-13 Datto, Inc. Prioritization and source-nonspecific based virtual machine recovery apparatuses, methods and systems
US11061776B2 (en) * 2017-08-07 2021-07-13 Datto, Inc. Prioritization and source-nonspecific based virtual machine recovery apparatuses, methods and systems
CN108183966A (zh) * 2018-01-15 2018-06-19 江苏冠达通电子科技有限公司 一种云储存系统
CN108681558B (zh) * 2018-04-10 2021-08-06 创新先进技术有限公司 一种数据回滚方法、装置、及终端
CN111104259B (zh) * 2019-12-23 2022-08-12 厦门市美亚柏科信息股份有限公司 一种数据库恢复方法、装置及存储介质
CN112131281A (zh) * 2020-09-29 2020-12-25 华中科技大学 一种高校教师的教学科研数据采集管理系统
CN112328583A (zh) * 2020-10-29 2021-02-05 北京东方耀阳信息技术有限公司 一种时空数据管理方法
US11113915B1 (en) * 2020-11-13 2021-09-07 Mark Ellery Ogram Vote counting station
US20230004462A1 (en) * 2021-06-30 2023-01-05 Microsoft Technology Licensing, Llc Persistently storing metadata associated with a backup of data in a source database
CN113556252B (zh) * 2021-07-23 2023-06-06 中信银行股份有限公司 一种网络设备基线配置检查与修复的方法和系统
US11675812B1 (en) 2022-09-29 2023-06-13 Fmr Llc Synchronization of metadata between databases in a cloud computing environment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577735A (zh) * 2009-06-24 2009-11-11 成都市华为赛门铁克科技有限公司 一种接管故障元数据服务器的方法、装置及系统
US20100332818A1 (en) * 2009-06-30 2010-12-30 Anand Prahlad Cloud storage and networking agents, including agents for utilizing multiple, different cloud storage sites
CN103729436A (zh) * 2013-12-27 2014-04-16 中国科学院信息工程研究所 一种分布式元数据管理方法及系统
CN105095439A (zh) * 2015-07-23 2015-11-25 浙江立元通信技术股份有限公司 一种图片专属安全存储云系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7725428B1 (en) * 2002-03-14 2010-05-25 Novell, Inc. System and method for restoring a database in a distributed database system
CN103761161B (zh) * 2013-12-31 2017-01-04 华为技术有限公司 恢复数据的方法、服务器及系统
GB2531295A (en) * 2014-10-15 2016-04-20 Ibm A data block based backup method
CN105515823A (zh) * 2015-11-24 2016-04-20 上海斐讯数据通信技术有限公司 网元数据恢复方法、装置及系统
CN105608155B (zh) * 2015-12-17 2018-09-25 北京华油信通科技有限公司 海量数据分布式存储系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577735A (zh) * 2009-06-24 2009-11-11 成都市华为赛门铁克科技有限公司 一种接管故障元数据服务器的方法、装置及系统
US20100332818A1 (en) * 2009-06-30 2010-12-30 Anand Prahlad Cloud storage and networking agents, including agents for utilizing multiple, different cloud storage sites
CN103729436A (zh) * 2013-12-27 2014-04-16 中国科学院信息工程研究所 一种分布式元数据管理方法及系统
CN105095439A (zh) * 2015-07-23 2015-11-25 浙江立元通信技术股份有限公司 一种图片专属安全存储云系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143158A (zh) * 2019-12-04 2020-05-12 武汉光谷信息技术股份有限公司 一种监控数据实时存储方法、系统、电子设备及存储介质
CN111143158B (zh) * 2019-12-04 2023-05-16 武汉光谷信息技术股份有限公司 一种监控数据实时存储方法、系统、电子设备及存储介质
CN110990664A (zh) * 2019-12-16 2020-04-10 云赛智联股份有限公司 一种大数据运营管理系统
CN110990664B (zh) * 2019-12-16 2023-05-23 云赛智联股份有限公司 一种大数据运营管理系统
CN111638995A (zh) * 2020-05-08 2020-09-08 杭州海康威视系统技术有限公司 元数据备份方法、装置及设备、存储介质

Also Published As

Publication number Publication date
CN107528872A (zh) 2017-12-29
US20190324691A1 (en) 2019-10-24
CN107528872B (zh) 2020-07-24
EP3477914A4 (en) 2019-05-08
US10824372B2 (en) 2020-11-03
EP3477914B1 (en) 2020-10-14
EP3477914A1 (en) 2019-05-01

Similar Documents

Publication Publication Date Title
WO2017219678A1 (zh) 一种数据恢复方法、装置及云存储系统
US11520670B2 (en) Method and apparatus for restoring data from snapshots
CN110147411B (zh) 数据同步方法、装置、计算机设备及存储介质
US8260742B2 (en) Data synchronization and consistency across distributed repositories
JP6448555B2 (ja) オブジェクトストレージインデキシングシステムのためのコンテンツクラス
WO2017201977A1 (zh) 一种数据写、读方法、装置及分布式对象存储集群
US20170177452A1 (en) Computing device replication using file system change detection methods and systems
US20170123935A1 (en) Cloud object data layout (codl)
US11093387B1 (en) Garbage collection based on transmission object models
JP2017529625A (ja) 共有フォルダ及び共有ファイルの同期
CN107977396B (zh) 一种KeyValue数据库的数据表的更新方法与表数据更新装置
US10061629B2 (en) Compact binary event log generation
US20200364239A1 (en) Asynchronous replication of in-scope table data
US9946609B2 (en) Managing multi-level backups into the cloud
US10324802B2 (en) Methods and systems of a dedupe storage network for image management
US20200042409A1 (en) Partial restore from tape backup
CN108228756A (zh) 基于日志解析技术的PG数据库到Hadoop平台的数据同步复制方法
CN110362590A (zh) 数据管理方法、装置、系统、电子设备及计算机可读介质
CN111753141B (zh) 一种数据管理方法及相关设备
WO2021208402A1 (zh) 现代应用的副本数据管理系统及方法
CN111444194B (zh) 一种块链式账本中索引的清除方法、装置及设备
US11204890B2 (en) System and method for archiving data in a decentralized data protection system
US11645333B1 (en) Garbage collection integrated with physical file verification
JP2023523704A (ja) 分散データ・ストレージ環境におけるセキュアなデータ複製
US11860894B2 (en) Database management system data replication

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17814417

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017814417

Country of ref document: EP

Effective date: 20190122