Backup data load balancing method, system and device

By sharding the backup data and sending it to multiple backup storage nodes in parallel, the problem of insufficient load balancing of backup data in the existing technology is solved, and the balanced distribution and efficient transmission of backup data among multiple nodes are achieved.

CN118642890APending Publication Date: 2024-09-13JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410660625.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing backup data load balancing methods cannot achieve effective load balancing in single-task and multi-task scenarios, resulting in serial transmission of backup data streams or differences in backup rates, which cannot meet stringent load balancing requirements.

Method used

By sharding the backup data, a one-to-one corresponding backup channel is established, and the sharded data is sent to multiple backup storage nodes in parallel to ensure load balancing on each node, and the sharded data is spliced ​​during the recovery process to restore the original data.

Benefits of technology

It achieves a balanced distribution of backup data among backup service nodes, avoids overload on a single node, improves the overall performance and efficiency of the backup system, and is suitable for single backup task and multiple backup task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642890A
    Figure CN118642890A
Patent Text Reader

Abstract

The invention provides a backup data load balancing method, system and device, and relates to the field of data backup, the method is applied to a backup agent end, and the method comprises the following steps: obtaining backup data, performing fragmentation processing on the backup data to obtain a plurality of fragmented backup data, the sizes of the plurality of fragmented backup data being the same; establishing a one-to-one corresponding backup channel between the backup agent end and the backup server end of each backup storage node; determining a sending batch of each piece of fragmented backup data in the plurality of pieces of fragmented backup data; according to the sending batch, the multiple pieces of fragmented backup data are divided into multiple backup groups containing the same number of fragmented backup data, and the multiple backup groups are in one-to-one correspondence with the backup storage nodes; and through each backup channel, sending each backup group to the corresponding backup storage node in parallel for backup. According to the method disclosed by the invention, the balanced distribution of the backup data among the backup service nodes is ensured, and meanwhile, the load balancing requirement under a single backup task is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data backup, and in particular to a backup data load balancing method, system and device. Background Art

[0002] User business data is a core digital asset. The industry often uses backup software to back up and protect these core data. When an abnormal situation such as power outage or restart occurs on the production host, the production business data needs to be restored to the normal state before the failure. At this time, the backup data needs to be restored to the production host through backup software.

[0003] The related technology is to use the load balancing function of the backup storage cluster to realize the concurrent transmission of data streams from the backup agent to multiple backup service nodes. By configuring a domain name access load balancing strategy based on a polling mechanism, the backup data can be distributed to multiple backup storage nodes. However, if only one backup task is configured, there is only a single chain of a backup channel under a single task, and the backup data stream will only be transmitted serially to one backup storage node, and the load balancing of the backup data cannot be achieved. At the same time, if multiple backup tasks are configured, due to the different data types and data volumes of each task, the backup rate will vary greatly, resulting in large fluctuations in the data flow between the backup storage node and the backup client, which cannot meet the stringent load balancing requirements. Summary of the invention

[0004] The embodiments of the present disclosure provide a backup data load balancing method, system and device, aiming to solve the problems existing in the above-mentioned background technology.

[0005] In order to solve the above technical problems, the present disclosure is implemented as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides a backup data load balancing method, which is applied to a backup proxy, and the method includes:

[0007] Acquire backup data, and perform sharding on the backup data to obtain multiple sharded backup data, where the sizes of the multiple sharded backup data are the same;

[0008] Establishing a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node;

[0009] Determine a sending batch of each shard backup data among the multiple shard backup data;

[0010] According to the sending batch, the plurality of shard backup data are divided into a plurality of backup groups containing the same number of shard backup data, and the plurality of backup groups correspond to each backup storage node one by one;

[0011] Through each backup channel, each backup group is sent in parallel to the corresponding backup storage node for backup.

[0012] Optionally, the performing sharding processing on the backup data to obtain a plurality of sharded backup data includes:

[0013] According to the data type of the backup data, a preset shard value is set;

[0014] Based on the preset shard value, the backup data is split to obtain a plurality of shard backup data.

[0015] Optionally, the method further comprises:

[0016] Get the backup data file name and backup task number;

[0017] According to the order of the splitting operation, a splitting order identifier, a file name of the backup data and a backup task number are added to each shard backup data;

[0018] Through each backup channel, each backup group is sent in parallel to the corresponding backup storage node for backup, including:

[0019] Through each backup channel, the shard backup data in each backup group is sent in parallel to the corresponding backup storage node;

[0020] The method further comprises:

[0021] In response to a recovery request corresponding to the recovery task, the recovery request corresponding to the recovery task is sent to each backup storage node, and multiple shard recovery data corresponding to the data to be recovered obtained from each backup storage node is recorded in the local cache;

[0022] Obtain the file name of the data to be restored, the backup task number, and the segmentation order identifier of each of the multiple shard recovery data sent by each backup storage node;

[0023] When all shard recovery data are recorded in the local cache, the multiple shard recovery data are spliced ​​according to the file name of the data to be recovered, the backup task number and the segmentation order identifiers of the multiple shard recovery data to obtain the original data file of the data to be recovered.

[0024] Optionally, a one-to-one corresponding backup channel is established between the backup proxy and the backup server of each backup storage node, including:

[0025] Determine the protocol type of each backup storage node, and configure the network connection parameters of the backup proxy terminal according to the protocol type of each backup storage node;

[0026] Based on the network connection parameters, a backup channel is established between the backup proxy and the backup service of each backup storage node, and the backup channel performs data transmission through the network protocol corresponding to the protocol type.

[0027] In a second aspect, an embodiment of the present disclosure provides a backup data load balancing method, which is applied to any backup storage node in a distributed backup storage cluster, wherein the distributed backup storage cluster includes multiple backup storage nodes, and the method includes:

[0028] receiving the shard backup data sent by the backup proxy through the backup channel, wherein the shard backup data is obtained by the backup proxy through sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence;

[0029] The shard backup data is written to the local hard disk through the backup server.

[0030] Optionally, the method further comprises:

[0031] Determine the storage path of the shard backup data through the backup server;

[0032] Receive the backup data file name, backup task number and segmentation sequence identifier of the sharded backup data sent by the backup agent;

[0033] The file name of the backup data, the backup task number, the storage path of the shard backup data, and the segmentation sequence identifier of the shard backup data are recorded in the backup metadata database as metadata information of the shard backup data.

[0034] Optionally, the method further comprises:

[0035] In response to a recovery request corresponding to the recovery task, read a plurality of shards corresponding to the data to be recovered from the local hard disk to recover the data;

[0036] The backup server reads and parses metadata information corresponding to the data to be restored from the backup metadata repository to obtain the file name, backup task number and segmentation order identifier of the data to be restored, respectively;

[0037] The multiple shard recovery data, the file name of the data to be recovered, the backup task number, and the segmentation order identifiers of each of the multiple shard recovery data are sent to the backup proxy end.

[0038] In a third aspect, an embodiment of the present disclosure provides a backup data load balancing system, the system comprising: one or more backup clients and any of the above-described distributed backup storage clusters;

[0039] The backup client is deployed with any of the above backup proxy terminals;

[0040] The distributed storage cluster includes a distributed file system and multiple backup storage nodes, wherein a backup server, a backup metadata library and a local hard disk are deployed in any backup storage node, and a one-to-one backup channel is established between the backup proxy and the backup server of each backup storage node.

[0041] In a fourth aspect, an embodiment of the present disclosure provides a backup data load balancing device, which is applied to a backup proxy end, and the device includes:

[0042] A shard processing module is used to obtain backup data, perform shard processing on the backup data, and obtain multiple shard backup data, and the multiple shard backup data have the same size;

[0043] An establishing module, used to establish a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node;

[0044] A determination module determines a sending batch of each shard backup data among the multiple shard backup data;

[0045] A division module, used for dividing the plurality of shard backup data into a plurality of backup groups containing the same number of shard backup data according to the sending batches, wherein the plurality of backup groups correspond to each backup storage node one by one;

[0046] The parallel sending module is used to send each backup group in parallel to the corresponding backup storage node for backup through each backup channel.

[0047] Optionally, the fragmentation processing module includes:

[0048] A sharding value setting submodule, used to set a preset sharding value according to the data type of the backup data;

[0049] The slicing submodule is used to perform a slicing operation on the backup data based on the preset slicing value to obtain a plurality of slicing backup data.

[0050] Optionally, the device further comprises:

[0051] The first acquisition module is used to obtain the file name and backup task number of the backup data;

[0052] An adding module is used to add a segmentation sequence identifier, a file name of the backup data and a backup task number to each shard backup data according to the sequence of the segmentation operation;

[0053] The parallel sending module comprises:

[0054] The parallel sending submodule is used to send the shard backup data in each backup group to the corresponding backup storage node in parallel through each backup channel;

[0055] The device also includes:

[0056] A recording module is used to respond to a recovery request corresponding to a recovery task, and send the recovery request corresponding to the recovery task to each backup storage node, and record multiple shard recovery data corresponding to the data to be recovered obtained from each backup storage node into a local cache;

[0057] The second acquisition module is used to obtain the file name of the data to be restored, the backup task number and the segmentation order identifier of each of the multiple shard recovery data sent by each backup storage node;

[0058] The splicing module is used to, when all the shard recovery data are recorded in the local cache, splice the multiple shard recovery data according to the file name of the data to be recovered, the backup task number and the segmentation order identifier of each of the multiple shard recovery data to obtain the original data file of the data to be recovered.

[0059] Optionally, the establishment module includes:

[0060] A protocol type determination submodule, used to determine the protocol type of each backup storage node, and configure the network connection parameters of the backup proxy terminal according to the protocol type of each backup storage node;

[0061] An establishment submodule is used to establish a backup channel between the backup proxy end and the backup service end of each backup storage node based on the network connection parameters, and the backup channel transmits data through the network protocol corresponding to the protocol type.

[0062] In a fifth aspect, an embodiment of the present disclosure provides a backup data load balancing device, which is applied to any backup storage node in a distributed backup storage cluster, wherein the distributed backup storage cluster includes multiple backup storage nodes, and the device includes:

[0063] A receiving module is used to receive the shard backup data sent by the backup proxy through a backup channel, wherein the shard backup data is obtained by the backup proxy through sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence;

[0064] The writing module is used to write the shard backup data to the local hard disk through the backup server.

[0065] Optionally, the device further comprises:

[0066] A storage path determination module, used to determine the storage path of the shard backup data through the backup server;

[0067] A metadata information receiving module, used to receive the file name of the backup data, the backup task number and the segmentation sequence identifier of the sharded backup data sent by the backup agent;

[0068] The backup metadata database recording module is used to record the backup data file name, backup task number, storage path of the shard backup data, and segmentation sequence identifier of the shard backup data as metadata information of the shard backup data into the backup metadata database.

[0069] Optionally, the device further comprises:

[0070] A shard recovery data reading module, used to respond to a recovery request corresponding to a recovery task and read multiple shard recovery data corresponding to the data to be recovered from a local hard disk;

[0071] The metadata information parsing module is used to read and parse the metadata information corresponding to the data to be restored from the backup metadata database through the backup server, and obtain the file name, backup task number and segmentation order identifier of the data to be restored, respectively;

[0072] The metadata information sending module is used to send the multiple shard recovery data, the file name of the data to be recovered, the backup task number and the segmentation order identifier of each of the multiple shard recovery data to the backup proxy end.

[0073] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0074] The present disclosure proposes to perform sharding on the backup data to obtain multiple sharded backup data of the same size, and to distribute the data flow evenly through parallel multi-backup channels, so as to ensure that the backup data is evenly distributed among the backup service nodes, and to avoid the situation where a single node is overloaded, so as to improve the overall performance and efficiency of the backup system, and to ensure the efficient transmission and storage of the backup data. At the same time, the backup data load balancing method disclosed in the present disclosure is applicable to the scenarios of single backup tasks and multiple backup tasks, and can realize the load balancing requirements in the scenarios of single backup tasks and multiple backup tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0076] Figure 1 It is a schematic diagram of the steps of a backup data load balancing method provided by an embodiment of the present disclosure;

[0077] Figure 2 It is a schematic diagram of a backup data load balancing writing process provided by an embodiment of the present disclosure;

[0078] Figure 3 This is a schematic diagram of a backup data load balancing recovery process provided by an embodiment of the present disclosure;

[0079] Figure 4 This is a schematic diagram of the steps of another backup data load balancing method provided by an embodiment of the present disclosure;

[0080] Figure 5 It is a structural block diagram of a backup data load balancing device provided by an embodiment of the present disclosure;

[0081] Figure 6 It is a structural block diagram of another backup data load balancing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0083] In the related art, data backup is usually performed using backup software. The function of backup software is to regularly back up data in the production environment to a secure storage medium to prevent data loss or damage. There are two main deployment methods for backup software: stand-alone and distributed. In stand-alone backup software, the backup agent is usually a software component installed on the production host running the user's business. Its function is to obtain business data on the production host and transmit the data to the backup server. The backup server is deployed on a general server to receive data from the backup agent. When executing a backup task, the backup agent transmits the data to the backup server, and the backup server writes the data to the backup storage medium. In distributed backup software, the backup storage cluster uses a distributed storage system, through which the storage resources of each backup server are uniformly managed. The backup server is deployed on each backup storage node, and these backup servers support high availability. Even if one of the nodes fails, the entire backup system can still work normally. When executing a backup task, the backup agent accesses the load balancing strategy through the domain name and distributes the backup data stream to multiple backup storage nodes. Each backup storage node is responsible for receiving the backup data and writing it to the backup storage medium. For example, suppose there is a distributed backup cluster, including three backup storage nodes A, B, and C. There are four backup tasks at the same time, which are executed by backup clients 1, 2, 3, and 4 respectively. When backup client 1 executes the backup task, the backup data stream is transmitted to backup storage node A; when backup client 2 executes the backup task, the backup data stream is transmitted to backup storage node B; when backup client 3 executes the backup task, the backup data stream is transmitted to backup storage node C; when backup client 4 executes the backup task, the backup data stream is transmitted to backup storage node A again. Through the polling algorithm, the data of multiple backup tasks are distributed to each backup storage node of the backup cluster in turn, realizing multi-stream concurrency and approximate load balancing of backup data. This method requires configuring multiple backup tasks at the same time, or deploying multiple backup clients, and distributing the data of multiple backup tasks or multiple backup clients to multiple backup storage nodes through the load balancing strategy of the backup cluster. However, if only one backup task is configured, the backup data stream of this task will only be transmitted to one backup storage node resolved by the domain name, that is, the backup data stream is only sent from the backup proxy to one backup storage node in the backup cluster, which cannot meet the backup data load balancing requirements. At the same time, the data types and data volumes of different backup tasks are different, resulting in differences in backup rates. The data traffic between each backup storage node and the backup client may fluctuate greatly, which cannot meet the more stringent load balancing requirements.

[0084] In order to solve the above technical problems, the present disclosure proposes a backup data load balancing system. Figure 2is a schematic diagram of a backup data load balancing writing process provided by an embodiment of the present disclosure. The system can be applied to Figure 2 A system for writing a process is shown, the system comprising: one or more backup clients, and a distributed backup storage cluster that implements any of the backup data load balancing methods on the backup storage node side; a backup proxy that implements any of the backup data load balancing methods on the backup proxy side is deployed on the backup client; the distributed storage cluster comprises a distributed file system and multiple backup storage nodes, wherein a backup server, a backup metadata library and a local hard disk are deployed in any backup storage node, and a one-to-one backup channel is established between the backup proxy and the backup server of each backup storage node.

[0085] In the backup data load balancing system proposed in the present disclosure, the backup client is an important component of the system. It is located on the backup client and a backup agent is deployed. The backup agent can be understood as a client component in the backup client. The backup agent is responsible for managing the execution of backup tasks. This includes scheduling the execution time of backup tasks, monitoring task progress, handling task interruptions or failures, etc. It can perform regular backups according to a predetermined plan, or it can perform instant backups as needed. During the data transmission process, the backup agent usually involves compressing and encrypting the data to reduce transmission costs and increase data security. The main function of the backup client is to obtain the backup data generated by the production host application and transmit the data to the backup storage node.

[0086] The distributed backup storage cluster is a distributed storage system for storing backup data. It consists of multiple backup storage nodes, each of which is deployed with a backup server responsible for receiving and storing the sharded backup data from the backup proxy. Each backup storage node also contains its own local hard disk for physically storing the received sharded backup data. The main goal of the distributed backup storage cluster is to provide high availability, scalability, and data redundancy to ensure the security and reliability of backup data.

[0087] Each of the multiple backup storage nodes is also deployed with a backup metadata database, which is a database for recording metadata information of the backup data. During the backup process, the backup agent writes the backup data slices into the backup storage medium and records the relevant information of the backup data (such as the backup task number, the backup original file name, the slice data size, the slice data number, the storage path in the backup storage, etc.) into the backup metadata database. The role of the backup metadata database is to record the metadata of the backup data so that the corresponding backup data can be found and read based on this information during data recovery.

[0088] Based on the above backup data load balancing system, the present disclosure proposes a backup data load balancing method, please refer to Figure 1 The method is applied to a backup agent, and the method comprises:

[0089] Step S101, obtaining backup data, and performing sharding processing on the backup data to obtain multiple sharded backup data, wherein the sizes of the multiple sharded backup data are the same;

[0090] Step S102, establishing a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node;

[0091] Step S103, determining a sending batch of each shard backup data in the plurality of shard backup data;

[0092] Step S104, dividing the plurality of shard backup data into a plurality of backup groups containing the same number of shard backup data according to the sending batch, wherein the plurality of backup groups correspond to each backup storage node one by one;

[0093] Step S105: Send each backup group in parallel to the corresponding backup storage node through each backup channel for backup.

[0094] Involving step S101, such as Figure 2 As shown in the figure, after creating a backup task, the backup agent obtains the backup data to be backed up from the production business application. The backup data will be fragmented during the backup process, and the backup data will be divided into multiple fragments of the same size to achieve load balancing of the backup data flow. Figure 2 ①, ②, ③, ④, and ⑤ in the figure are the overall backup data writing process, which correspond to the following five steps respectively: the backup agent obtains the backup data from the production business application, multiple backup channels are established between the backup agent and the backup server of each backup storage node, and the backup data is sharded and distributed to each backup channel at the same time, the backup service of each backup storage node receives the sharded backup data and writes it to the hard disk, and the backup server writes the metadata information of the backup data into the locally deployed backup metadata database. The overall writing process will be explained later and will not be described in detail here.

[0095] In step S102, in order to achieve load balancing and parallel transmission of backup data streams, the present disclosure establishes a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node. Each backup channel corresponds to the backup server end of a backup storage node, and the backup proxy can transmit data to multiple backup channels at the same time to ensure that the backup data is evenly distributed among the backup service nodes to avoid the situation where a single node is overloaded. Through the backup channel, the backup proxy end can distribute the fragmented backup data to each backup channel at the same time, achieving load balancing and parallel transmission of the backup data stream, so as to improve the transmission efficiency of the backup data and the performance of the overall backup system.

[0096] Involving step S103 and step S104, under normal circumstances, the number of shard backup data and the number of storage nodes are not consistent, and multiple shard backup data need to be grouped and sent in batches. For example, if there are 10 shard backup data and 3 backup storage nodes, the 10 shard backup data can be divided into 3 sending batches, each sending batch containing 3 shard backup data and one backup storage node. According to the determination of the sending batch, the multiple shard backup data are divided into multiple backup groups containing the same number of shard backup data. Each backup group corresponds one to one to each backup storage node. In the above example, the grouped sending of multiple shard backup data can be achieved based on a preset polling algorithm. The polling algorithm is a simple scheduling algorithm that assigns tasks in sequence and cyclically. In the above scenario, each shard backup data is assigned to the backup storage node in turn until all shard backup data are assigned.

[0097] The following is a detailed description of the implementation of the above steps based on the polling algorithm. Continuing with the above example, in the initialization phase, assume that the shard backup data is numbered D1, D2, D3, ..., D10, and the backup storage nodes are numbered N1, N2, N3. There are established backup channels C1, C2, C3, corresponding to N1, N2, N3 respectively. The first round of allocation: D1→N1(C1), D2→N2(C2), D3→N3(C3); the second round of allocation: D4→N1(C1), D5→N2(C2), D6→N3(C3); the third round of allocation: D7→N1(C1), D8→N2(C2), D9→N3(C3); the fourth round of allocation: D10→N1(C1). Then, backup groups are generated: backup group 1: D1, D4, D7, D10 (assigned to N1, through C1), backup group 2: D2, D5, D8 (assigned to N2, through C2), backup group 3: D3, D6, D9 (assigned to N3, through C3). Then, D1, D4, D7, D10 in backup group 1 are sent to backup storage node N1 through backup channel C1, D2, D5, D8 in backup group 2 are sent to backup storage node N2 through backup channel C2, and D3, D6, D9 in backup group 3 are sent to backup storage node N3 through backup channel C3. In the actual sending process, the backup proxy sends the shard backup data in each sending batch to the corresponding backup storage node according to the corresponding relationship of the backup groups, so that each backup storage node can receive the corresponding shard backup data, and the data traffic load on each backup channel is relatively balanced.

[0098] In step S105, each backup group is sent in parallel to the corresponding backup storage node through each backup channel for backup, thereby realizing multi-stream concurrency of backup data.

[0099] The present disclosure proposes to perform sharding on the backup data to obtain multiple sharded backup data of the same size, and to distribute the data flow evenly through parallel multi-backup channels, so as to ensure that the backup data is evenly distributed among the backup service nodes, and to avoid the situation where a single node is overloaded, so as to improve the overall performance and efficiency of the backup system, and to ensure the efficient transmission and storage of the backup data. At the same time, the backup data load balancing method disclosed in the present disclosure is applicable to the scenarios of single backup tasks and multiple backup tasks, and can realize the load balancing requirements under single backup tasks and multiple backup tasks.

[0100] Exemplarily, the sharding the backup data to obtain a plurality of sharded backup data includes: setting a preset sharding value according to a data type of the backup data; and sharding the backup data based on the preset sharding value to obtain a plurality of sharded backup data.

[0101] First, identify the type of backup data, such as video, text, audio, or database files. Set a suitable shard value based on the characteristics of the data type and the required backup efficiency. The shard value affects the size of the shard, which is usually measured in bytes. Use the preset shard value to split the backup data and generate multiple shard backup data, each of which has the same or close to the preset shard value. Assume that there are two types of data: video files and text files. Of course, the production data in actual production is not limited to this. This is just for the convenience of readers. For video files, they are usually large in size and contain a large amount of continuous data. Assume that the preset shard value is 100MB. Slicing large files is conducive to parallel processing and transmission, reducing the probability that a single transmission error affects the entire file. If the video file size is 500MB, according to the preset shard value of 100MB, it is split into 5 shards (each 100MB, the last one may be slightly less than 100MB). For text files, the text files are small in size and the data discontinuity is not as obvious as video files. Assume that the preset shard value is 10KB. Although the size is small, slicing can improve the flexibility of text processing and the speed of fault recovery. If the text file size is 50KB, it will be divided into 5 shards according to the preset shard value of 10KB. The backup data of each shard can be backed up and restored independently, which is suitable for distributed file systems and improves the backup and recovery speed. If a shard is damaged during transmission or storage, only the shard needs to be reprocessed instead of the entire file.

[0102] Exemplarily, the method further includes: obtaining a file name and a backup task number of the backup data; and adding a segmentation sequence identifier, the file name and the backup task number of the backup data to each shard backup data according to the sequence of the segmentation operation.

[0103] After the data sharding process is performed, additional metadata information needs to be added to each shard backup data to ensure integrity and recoverability. Here, the metadata information includes the shard data identifier. According to the order of the sharding operation, an identifier is added to each shard backup data to ensure that these shard backup data can be spliced ​​in the correct order during recovery. Suppose a database file named "project_data" is being backed up, and the backup task number is task_001. The entire file is sharded and divided into five parts. Each shard backup data needs to add a sharding order identifier. Because they belong to the same backup data, these shard backup data have the same file name and backup task number for the backup data.

[0104] Shard 1: Shard order identifier: 1 / 5, file name: project_data, backup task number: task_001;

[0105] Shard 2: Shard order identifier: 2 / 5, file name: project_data, backup task number: task_001;

[0106] Shard 3: Shard order identifier: 3 / 5, file name: project_data, backup task number: task_001;

[0107] Shard 4: Shard order identifier: 4 / 5, file name: project_data, backup task number: task_001;

[0108] Shard 5: Shard order identifier: 5 / 5, file name: project_data, backup task number: task_001;

[0109] The split sequence identifier allows each shard backup data to know its location, so that it can be spliced ​​in the correct order when restoring the entire file. Task tracking: The file name and task number can ensure that the backup data is consistent with the backup task to prevent data confusion or loss. In the subsequent recovery process, if a shard backup data is damaged or missing, the sequence identifier and task number can also be used to quickly locate the problem and repair it by retransmitting or re-backing up.

[0110] Sending each backup group in parallel to a corresponding backup storage node for backup through each backup channel, including: sending the shard backup data in each backup group in parallel to the corresponding backup storage node through each backup channel;

[0111] In the process of data backup, the shard backup data of each backup group is divided into two categories: file data information and metadata information for distribution. Through each backup channel, the shard backup data in each backup group is sent in parallel to the corresponding backup storage node, that is, the file data information of the shard backup data of each backup group is distributed in parallel. The file name and backup task number of the backup data are sent in parallel to the corresponding backup storage node, that is, the metadata information of the shard backup data of each backup group is distributed. In the present disclosure, the metadata information may include: the file name, backup task number, storage path, etc. of the backup data, and the metadata information refers to the additional information of the backup data, which is used to describe the attributes and characteristics of the backup data. The file name of the backup data refers to the name of the original file corresponding to the backup data. The file name can be uniquely identified by the original file to which the backup data belongs. The backup task number refers to the unique identifier of the backup task. Each backup task has a unique number for distinguishing different backup tasks. The backup task number can be used for indexing and retrieval of the backup data, and the metadata information can be used to facilitate the location and recovery of specific backup data during the backup and recovery process.

[0112] The method also includes: responding to a recovery request corresponding to the recovery task, and sending the recovery request corresponding to the recovery task to each backup storage node, recording multiple shard recovery data corresponding to the data to be recovered obtained from each backup storage node into a local cache; obtaining the file name, backup task number and segmentation sequence identifier of the data to be recovered sent by each backup storage node; when all the shard recovery data are recorded in the local cache, splicing the multiple shard recovery data according to the file name, backup task number and segmentation sequence identifier of the data to be recovered, so as to obtain the original data file of the data to be recovered.

[0113] Figure 3 This is a schematic diagram of a backup data load balancing recovery process provided by an embodiment of the present disclosure. Please refer to Figure 3 When the backup agent receives a recovery request corresponding to a recovery task, it first sends the request to the relevant backup storage nodes. Each backup storage node responds to the recovery request and sends the shard recovery data to be restored to the backup agent for processing. These shard recovery data are then recorded in the local cache of the backup agent. Once all the required shard recovery data are recorded in the local cache, the backup agent will use the file name, backup task number and segmentation sequence identifier to correctly sort and splice these shards. Assume that the shard recovery data is as follows:

[0114] Shard 1: Shard order identifier: 1 / 5, file name: project_data, backup task number: task_001;

[0115] Shard 2: Shard order identifier: 2 / 5, file name: project_data, backup task number: task_001;

[0116] Shard 3: Shard order identifier: 3 / 5, file name: project_data, backup task number: task_001;

[0117] Shard 4: Shard order identifier: 4 / 5, file name: project_data, backup task number: task_001;

[0118] Shard 5: Shard order identifier: 5 / 5, file name: project_data, backup task number: task_001;

[0119] The backup agent will stitch together the five shards with the task number task_001 in order (shard 1, shard 2, shard 3, shard 4, shard 5) according to the sequence identifier to form a complete "project_data" file. Figure 3 ①, ②, ③, ④, and ⑤ in the figure are the overall recovery process of the data to be recovered, which correspond to the following five steps: the backup server reads the metadata information corresponding to the data to be recovered from the metadata database; the backup server reads the required shard files from the distributed file system based on the metadata information read; the backup server transmits the read shard files to the backup agent through multiple channels concurrently; the backup agent splices the shard files to restore the original files after receiving them. The restored original file data is taken over and accessed by the production business application.

[0120] It can be seen that the present disclosure provides an efficient and reliable solution for large-scale data backup and recovery.

[0121] Exemplarily, a one-to-one backup channel is established between the backup proxy and the backup server of each backup storage node, including: determining the protocol type of each backup storage node, and configuring the network connection parameters of the backup proxy according to the protocol type of each backup storage node; based on the network connection parameters, a backup channel is established between the backup proxy and the backup server of each backup storage node, and the backup channel transmits data through the network protocol corresponding to the protocol type.

[0122] Figure 4 FIG. 1 is a schematic diagram of steps of another method for load balancing backup data provided by an embodiment of the present disclosure. Figure 4 As shown, the method is applied to any backup storage node in a distributed backup storage cluster, the distributed backup storage cluster includes multiple backup storage nodes, and the method includes:

[0123] Step S201, receiving the shard backup data sent by the backup proxy through the backup channel, wherein the shard backup data is obtained by the backup proxy through sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence;

[0124] Step S202: write the shard backup data to the local hard disk through the backup server.

[0125] In step S201, as described above, at the backup proxy end, the original backup data is divided into multiple shard backup data of the same size, which helps to evenly distribute the load and simplify data management. The backup storage node receives the shard backup data sent from the backup proxy end through its backup server.

[0126] Involving step S202, after the received shard backup data arrives at the backup storage node through network transmission, the data is written to the local hard disk of the node. Optionally, the writing process involves processes including data storage location allocation, write speed optimization and data security processing. As a data storage medium, the local hard disk has a high data reading and writing speed and low latency, and is suitable for fast access to large amounts of data. By reasonably distributing the shard backup data on different local hard disks, the performance and reliability of the backup system can be further improved.

[0127] Exemplarily, the method further includes: in response to a recovery request corresponding to a recovery task, reading multiple shard recovery data corresponding to the data to be recovered from a local hard disk; reading and parsing metadata information corresponding to the data to be recovered from the backup metadata database through a backup server to obtain the file name of the data to be recovered, the backup task number, and the segmentation order identifiers of each of the multiple shard recovery data; sending the multiple shard recovery data, the file name of the data to be recovered, the backup task number, and the segmentation order identifiers of each of the multiple shard recovery data to the backup proxy. Among them, multiple partitions can be pre-created on each hard disk to effectively manage data of different types or priorities. For example, frequently accessed data and infrequently accessed data can be stored in different partitions respectively. For each hard disk, a data block can also be mapped to a specific hard disk through a hash function, and the data load is evenly distributed among different hard disks in the local area to reduce the risk of overloading a single hard disk. And for the scenario of a single backup client disclosed in the present invention, there is no need to configure a load balancing algorithm additionally. For the process of writing the shard backup data to the hard disk, an appropriate cache mechanism, such as write-ahead caching or write-back caching, can be used to optimize the writing performance and improve the response speed. The above is only a preferred implementation and is not limited to this.

[0128] Exemplarily, the method also includes: in response to a recovery request corresponding to a recovery task, reading multiple shard recovery data corresponding to the data to be recovered from a local hard disk; reading and parsing metadata information corresponding to the data to be recovered from the backup metadata database through a backup server to obtain the file name of the data to be recovered, the backup task number, and the segmentation sequence identifiers of each of the multiple shard recovery data; sending the multiple shard recovery data, the file name of the data to be recovered, the backup task number, and the segmentation sequence identifiers of each of the multiple shard recovery data to the backup agent.

[0129] When the backup server of the backup storage node receives a request to restore data, it first identifies and automatically responds to trigger the subsequent data recovery process. The backup server will retrieve all necessary data shards to be restored from one or more local hard disks, that is, read multiple shard recovery data to reconstruct the complete data file. Then, the metadata information corresponding to the data to be restored is read and parsed from the backup metadata database. Finally, the file data of the multiple shard recovery data, the file name of the data to be restored, the backup task number, and the segmentation order identifier of each of the multiple shard recovery data obtained by parsing are sent to the backup agent to enable the backup agent to restore and reconstruct the data.

[0130] Figure 5 is a structural block diagram of a backup data load balancing device provided by an embodiment of the present disclosure, such as Figure 5 As shown, applied to a backup proxy end, the device includes:

[0131] The fragment processing module 301 is used to obtain backup data, and fragment the backup data to obtain multiple fragment backup data, and the multiple fragment backup data have the same size;

[0132] Establishing module 302, used to establish a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node;

[0133] A determination module 303 determines a sending batch of each shard backup data in the plurality of shard backup data;

[0134] A division module 304 is used to divide the plurality of shard backup data into a plurality of backup groups containing the same number of shard backup data according to the sending batch, and the plurality of backup groups correspond to each backup storage node one by one;

[0135] The parallel sending module 305 is used to send each backup group in parallel to the corresponding backup storage node for backup through each backup channel.

[0136] Optionally, the fragmentation processing module includes:

[0137] A sharding value setting submodule, used to set a preset sharding value according to the data type of the backup data;

[0138] The slicing submodule is used to perform a slicing operation on the backup data based on the preset slicing value to obtain a plurality of slicing backup data.

[0139] Optionally, the device further comprises:

[0140] The first acquisition module is used to obtain the file name and backup task number of the backup data;

[0141] An adding module is used to add a segmentation sequence identifier, a file name of the backup data and a backup task number to each shard backup data according to the sequence of the segmentation operation;

[0142] The parallel sending module comprises:

[0143] The parallel sending submodule is used to send the shard backup data in each backup group to the corresponding backup storage node in parallel through each backup channel;

[0144] The device also includes:

[0145] A recording module is used to respond to a recovery request corresponding to a recovery task, and send the recovery request corresponding to the recovery task to each backup storage node, and record multiple shard recovery data corresponding to the data to be recovered obtained from each backup storage node into a local cache;

[0146] The second acquisition module is used to obtain the file name of the data to be restored, the backup task number and the segmentation order identifier of each of the multiple shard recovery data sent by each backup storage node;

[0147] The splicing module is used to, when all the shard recovery data are recorded in the local cache, splice the multiple shard recovery data according to the file name of the data to be recovered, the backup task number and the segmentation order identifier of each of the multiple shard recovery data to obtain the original data file of the data to be recovered.

[0148] Optionally, the establishment module includes:

[0149] A protocol type determination submodule, used to determine the protocol type of each backup storage node, and configure the network connection parameters of the backup proxy terminal according to the protocol type of each backup storage node;

[0150] An establishment submodule is used to establish a backup channel between the backup proxy end and the backup service end of each backup storage node based on the network connection parameters, and the backup channel transmits data through the network protocol corresponding to the protocol type.

[0151] Figure 6 is a structural block diagram of another backup data load balancing device provided by an embodiment of the present disclosure, such as Figure 6 As shown, it is applied to any backup storage node in a distributed backup storage cluster, the distributed backup storage cluster includes multiple backup storage nodes, and the device includes:

[0152] The receiving module 401 is used to receive the shard backup data sent by the backup proxy through the backup channel, wherein the shard backup data is obtained by the backup proxy after sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence;

[0153] The writing module 402 is used to write the shard backup data into the local hard disk through the backup server.

[0154] Optionally, the device further comprises:

[0155] A storage path determination module, used to determine the storage path of the shard backup data through the backup server;

[0156] A metadata information receiving module, used to receive the file name of the backup data, the backup task number and the segmentation sequence identifier of the sharded backup data sent by the backup agent;

[0157] The backup metadata database recording module is used to record the backup data file name, backup task number, storage path of the shard backup data, and segmentation sequence identifier of the shard backup data as metadata information of the shard backup data into the backup metadata database.

[0158] Optionally, the device further comprises:

[0159] A shard recovery data reading module, used to respond to a recovery request corresponding to a recovery task and read multiple shard recovery data corresponding to the data to be recovered from a local hard disk;

[0160] The metadata information parsing module is used to read and parse the metadata information corresponding to the data to be restored from the backup metadata database through the backup server, and obtain the file name, backup task number and segmentation order identifier of the data to be restored, respectively;

[0161] The metadata information sending module is used to send the multiple shard recovery data, the file name of the data to be recovered, the backup task number and the segmentation order identifier of each of the multiple shard recovery data to the backup proxy end.

[0162] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.

[0163] Finally, it should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. The above describes in detail a backup data load balancing method, system and device provided by the present disclosure. The present disclosure uses specific examples to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present disclosure; at the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A backup data load balancing method, characterized in that: Applied to a backup agent, the method includes: Acquire backup data, and perform sharding on the backup data to obtain multiple sharded backup data, where the sizes of the multiple sharded backup data are the same; Establishing a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node; Determine a sending batch of each shard backup data among the multiple shard backup data; According to the sending batch, the plurality of shard backup data are divided into a plurality of backup groups containing the same number of shard backup data, and the plurality of backup groups correspond to each backup storage node one by one; Through each backup channel, each backup group is sent in parallel to the corresponding backup storage node for backup.

2. The method according to claim 1, characterized in that: The slicing process of the backup data to obtain a plurality of slicing backup data includes: According to the data type of the backup data, a preset shard value is set; Based on the preset shard value, the backup data is split to obtain a plurality of shard backup data.

3. The method according to claim 2, characterized in that The method further comprises: Get the backup data file name and backup task number; According to the order of the segmentation operation, a segmentation order identifier, a file name and a backup task number of the backup data, and a file name and a backup task number of the backup data are added to each shard backup data; Through each backup channel, each backup group is sent in parallel to the corresponding backup storage node for backup, including: Through each backup channel, the shard backup data in each backup group is sent in parallel to the corresponding backup storage node; The method further comprises: In response to a recovery request corresponding to the recovery task, the recovery request corresponding to the recovery task is sent to each backup storage node, and multiple shard recovery data corresponding to the data to be recovered obtained from each backup storage node is recorded in the local cache; Obtain the file name of the data to be restored, the backup task number, and the segmentation order identifier of each of the multiple shard recovery data sent by each backup storage node; When all shard recovery data are recorded in the local cache, the multiple shard recovery data are spliced ​​according to the file name of the data to be recovered, the backup task number and the segmentation order identifiers of the multiple shard recovery data to obtain the original data file of the data to be recovered.

4. The method according to claim 1, characterized in that: A one-to-one corresponding backup channel is established between the backup proxy end and the backup server end of each backup storage node, including: Determine the protocol type of each backup storage node, and configure the network connection parameters of the backup proxy terminal according to the protocol type of each backup storage node; Based on the network connection parameters, a backup channel is established between the backup proxy and the backup service of each backup storage node, and the backup channel performs data transmission through the network protocol corresponding to the protocol type.

5. A backup data load balancing method, characterized in that: Applied to any backup storage node in a distributed backup storage cluster, the distributed backup storage cluster includes multiple backup storage nodes, the method includes: receiving the shard backup data sent by the backup proxy through the backup channel, wherein the shard backup data is obtained by the backup proxy through sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence; The shard backup data is written to the local hard disk through the backup server.

6. The method according to claim 5, characterized in that The method further comprises: Determine the storage path of the shard backup data through the backup server; Receive the backup data file name, backup task number and segmentation sequence identifier of the sharded backup data sent by the backup agent; The file name of the backup data, the backup task number, the storage path of the shard backup data, and the segmentation sequence identifier of the shard backup data are recorded in the backup metadata database as metadata information of the shard backup data.

7. The method according to claim 6, characterized in that The method further comprises: In response to a recovery request corresponding to the recovery task, read a plurality of shards corresponding to the data to be recovered from the local hard disk to recover the data; The backup server reads and parses metadata information corresponding to the data to be restored from the backup metadata repository to obtain the file name, backup task number and segmentation order identifier of the data to be restored, respectively; The multiple shard recovery data, the file name of the data to be recovered, the backup task number, and the segmentation order identifiers of each of the multiple shard recovery data are sent to the backup proxy end.

8. A backup data load balancing system, characterized in that: The system comprises: one or more backup clients and a distributed backup storage cluster as described in any one of claims 5 to 7; The backup client is deployed with the backup proxy terminal according to any one of claims 1 to 4; The distributed storage cluster includes a distributed file system and multiple backup storage nodes, wherein a backup server, a backup metadata library and a local hard disk are deployed in any backup storage node, and a one-to-one backup channel is established between the backup proxy and the backup server of each backup storage node.

9. A backup data load balancing device, characterized in that: Applied to a backup proxy, the device comprises: A shard processing module is used to obtain backup data, perform shard processing on the backup data, and obtain multiple shard backup data, and the multiple shard backup data have the same size; An establishing module, used to establish a one-to-one corresponding backup channel between the backup proxy end and the backup server end of each backup storage node; A determination module determines a sending batch of each shard backup data among the multiple shard backup data; A division module, used for dividing the plurality of shard backup data into a plurality of backup groups containing the same number of shard backup data according to the sending batches, wherein the plurality of backup groups correspond to each backup storage node one by one; The parallel sending module is used to send each backup group in parallel to the corresponding backup storage node for backup through each backup channel.

10. A backup data load balancing device, characterized in that: Applied to any backup storage node in a distributed backup storage cluster, the distributed backup storage cluster includes multiple backup storage nodes, and the device includes: A receiving module is used to receive the shard backup data sent by the backup proxy through a backup channel, wherein the shard backup data is obtained by the backup proxy through sharding the backup data, and the sizes of the multiple shard backup data are the same; the backup channel is a network channel established between the backup proxy and the backup server of each backup storage node in a one-to-one correspondence; The writing module is used to write the shard backup data to the local hard disk through the backup server.

Citation Information

Cited By

  • Multi-target data backup method and device, computer equipment, readable storage medium and program product

    CN121233400A