Data backup method, device, equipment and storage medium

By dynamically determining the data backup strategy, combining data increment and host resource volume, the problem of irrationality of traditional data backup strategies is solved, improving the success rate and reducing the backup time.

CN112948169BActive Publication Date: 2025-09-02ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911175589.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-26
Publication Date
2025-09-02
Estimated Expiration
2039-11-26

Smart Images

  • Figure CN112948169B_ABST
    Figure CN112948169B_ABST
Patent Text Reader

Abstract

This application proposes a data backup method, apparatus, device, and storage medium. The method includes: obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time; the device to be backed up is run on the corresponding host device, and a backup terminal is installed on the host device; based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, a backup policy for the device to be backed up at the current backup time is determined, the backup policy including at least one of the direction of disk file merging for the device to be backed up, the depth of disk file merging, and the selection of a target host device; and, based on the backup policy, sending an instruction to back up the device to be backed up to the backup terminal in the target host device. This method can improve the success rate of data backup and reduce the duration of data backup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data backup method, apparatus, device, and storage medium. Background Art

[0002] As we all know, data backup is an important means of preventing data loss and improving data security. For example, in virtualized data centers, virtual machine data backup is essential. This backup function prevents unexpected disk damage, data loss, or user errors, allowing virtual machine data to be restored using backup data. Traditionally, data backup policies are typically set by users based on experience. However, these traditional methods can lead to irrational backup policy settings, resulting in low data backup success rates and extended backup times. Summary of the Invention

[0003] The present application provides a method, apparatus, device and storage medium for data backup.

[0004] In a first aspect, an embodiment of the present application provides a data backup method, comprising:

[0005] Obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the device to be backed up runs on the corresponding host device and a backup terminal is installed on the host device;

[0006] Determining a backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device;

[0007] According to the backup policy, an instruction for backing up the device to be backed up is sent to a backup terminal in a target host device.

[0008] In a second aspect, an embodiment of the present application provides a data backup device, comprising:

[0009] A first acquisition module is configured to acquire a data increment at a current backup time of a device to be backed up relative to a previous backup time, a data volume at the current backup time and a data volume at the previous backup time, and a resource volume of a host device at the current backup time, wherein the device to be backed up is running on a corresponding host device on which a backup terminal is installed;

[0010] a first determining module, configured to determine a backup strategy for the device to be backed up at the current backup time based on the data increment, the amount of data at the current backup time, the amount of data at the previous backup time, and the amount of resources of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device;

[0011] The first sending module is configured to send an instruction for backing up the device to be backed up to the backup terminal in the target host device according to the backup policy.

[0012] In a third aspect, an embodiment of the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the data backup method provided in the first aspect of the embodiment of the present application when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the data backup method provided in the first aspect of the embodiment of the present application is implemented.

[0014] The data backup method, apparatus, device and storage medium provided in the embodiments of the present application enable the computer device to determine the backup strategy of the device to be backed up at the current backup moment based on the acquired data increment, the amount of data at the current backup moment, the amount of data at the previous backup moment and the amount of resources of the host device at the current backup moment. The backup strategy includes at least one of the disk file merging direction, the disk file merging depth and the selection of the target host device of the device to be backed up, and based on the determined backup strategy, sends an instruction for backing up the device to be backed up to the backup terminal in the target host device. Since the backup strategy is determined based on the actual operating information of the device to be backed up and the host device, rather than a manually formulated strategy, that is, the backup strategy determined by the present application matches the actual operating information of the device to be backed up and the host device, the irrationality of the manually formulated backup strategy is avoided, thereby improving the success rate of data backup and reducing the duration of data backup. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A system architecture diagram for the data backup method provided in an embodiment of the present application;

[0016] Figure 2 A flowchart of a data backup method provided in an embodiment of the present application;

[0017] Figure 3 A schematic diagram illustrating changes in the qcow2 external snapshot disk file chain of a virtual machine during data backup provided in an embodiment of the present application;

[0018] Figure 4 Another flowchart of the data backup method provided in an embodiment of the present application;

[0019] Figure 5 A schematic diagram of another flow chart of the data backup method provided in an embodiment of the present application;

[0020] Figure 6 A schematic diagram of a backup strategy for a virtual machine provided in an embodiment of the present application;

[0021] Figure 7 A schematic diagram of the structure of a data backup device provided in an embodiment of the present application;

[0022] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The data backup method provided in the embodiment of the present application can be applied to Figure 1 The system shown may include a data backup policy generating apparatus 10 and a system to be backed up 11. The system to be backed up includes a device to be backed up 110 and a host device 111. The device to be backed up 110 runs on the host device 111, which has a backup client installed on it. The data backup policy generating apparatus 10 is used to generate a backup policy. Based on the generated backup policy, the backup client retrieves the data of the device to be backed up 110 from a storage repository (which may be a disk array) via a backup proxy interface on the host device 111 and sends the data to a backup server, thereby backing up the data of the device to be backed up 110.

[0024] To make the purpose, technical solutions and advantages of this application more clear, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of this application can be combined with each other in any way.

[0025] It should be noted that the execution subject of the following method embodiment may be a data backup device, which may be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware. The following method embodiment is described using the execution subject being a computer device as an example.

[0026] Figure 2 A flow chart of a data backup method provided by an embodiment of the present application. This embodiment relates to a specific process of how a computer device determines a backup strategy based on the operating information of the device to be backed up and the host device. Figure 2 As shown, the method may include:

[0027] S101. Obtain the data increment of the current backup time of the device to be backed up relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time. The device to be backed up runs on the corresponding host device, and a backup terminal is installed on the host device.

[0028] Specifically, the computer device can obtain the current backup time and the last backup time of the device to be backed up through the basic backup policy set in the backup server. The backup server can obtain the basic backup policy through the backup-related content set by the user, and can also obtain the basic backup policy through the policy output by the data backup policy generation device. This embodiment does not specifically limit the method of obtaining the basic backup policy. Among them, the basic backup policy may include the start time of the data backup of the device to be backed up, and whether the data backup is a full backup or an incremental backup. A full backup refers to backing up all data on the disk of the device to be backed up, and an incremental backup refers to backing up the incremental data in the disk of the device to be backed up, wherein the incremental data is the data added, deleted and / or modified in the disk of the device to be backed up after the last backup.

[0029] The aforementioned data increment refers to the amount of data change on the device to be backed up at the current backup time relative to the previous backup time, including the amount of data change added, deleted, and / or modified on the disk of the device to be backed up. The aforementioned data volume at the current time is related to whether a full backup or incremental backup is performed on the device to be backed up. When a full backup is performed on the device to be backed up at the current backup time, the aforementioned data volume at the current time is the amount of all data on the disk of the device to be backed up. When an incremental backup is performed on the device to be backed up at the current backup time, the aforementioned data volume at the current time is the amount of data change on the disk of the device to be backed up relative to the previous backup time. The aforementioned data volume at the previous backup time refers to the amount of all data on the disk of the device to be backed up at the previous backup time. The aforementioned resource volume of the host device at the current backup time includes the CPU usage and memory usage of the host device at the current backup time. The aforementioned backup terminal is the backup client. Since the backup client is installed on the host device, it will occupy resources such as the CPU and memory of the host device during the backup process. Therefore, when generating a backup strategy, it is necessary to consider the resource usage of the host device at the current backup time.

[0030] S102. Determine the backup strategy of the device to be backed up at the current backup moment based on the data increment, the amount of data at the current backup moment, the amount of data at the previous backup moment, and the amount of resources of the host device at the current backup moment. The backup strategy includes at least one of the disk file merging direction, disk file merging depth, and selection of the target host device of the device to be backed up.

[0031] Specifically, the above-mentioned device to be backed up can be a virtual machine. The format of the disk file of the device to be backed up can be qcow2 format or raw format. When the disk of the device to be backed up adopts qcow2 external snapshot, when backing up data on the device to be backed up, as the number of backups increases, the disk file chain will become longer and longer, affecting the disk read and write speed of the device to be backed up, and will also reduce the success rate of data backup. At this time, it is necessary to merge the redundant disk file nodes to shorten the length of the disk file chain. The following takes the virtual machine as an example to introduce the changes in the disk file chain when the virtual machine disk adopts qcow2 external snapshot for data backup. Figure 3 As shown in the figure, the original node of the virtual machine disk is vm-baseRW, which is the virtual machine's running node and has read-write properties. When backing up a running virtual machine, an additional node, vm-snap1RW, is added as the virtual machine's running node, and the original vm-baseRW becomes the read-only node vm-baseRO. At this point, vm-baseRO is the node that requires a full backup (the first backup of a virtual machine must be a full backup). After the virtual machine has been running for a period of time, a backup task request comes again. It is still necessary to pull out an additional node vm-snap2RW as the virtual machine running node, and the original vm-snap1RW becomes the read-only node vm-snap1RO. At this time, vm-snap1RO is the node with incremental changes compared to the first full backup. If it is a full backup, vm-baseRO and vm-snap1RO are copied to the backup repository. If it is an incremental backup, only vm-snap1RO needs to be copied to the backup repository. In this way, a file node will be added after each backup. As the number of backups increases, the file node chain will become longer and longer.

[0032] The direction of merging the disk files of the device to be backed up includes upward merging or downward merging. Figure 3 In the example shown, upward merging refers to merging data from the vm-snap1RO node into the vm-baseRO node, and downward merging refers to merging data from the vm-baseRO node into the vm-snap1RO node. The merge depth of the disk files of the device to be backed up refers to either immediate merging or delayed merging.

[0033] The computer device can determine the direction of merging disk files of the device to be backed up based on the comparison result between the data increment of the current backup time relative to the previous backup time and the data volume at the current backup time. Optionally, the process of the computer device determining the direction of merging disk files of the device to be backed up can be: when the data increment does not exceed the data volume at the previous backup time, the direction of merging disk files of the device to be backed up is determined to be upward merging; when the data increment exceeds the data volume at the previous backup time, the direction of merging disk files of the device to be backed up is determined to be downward merging. Continue with Figure 3 Taking the example in as an example, when the amount of data in the vm-snap1RO node is greater than the amount of data in the vm-baseRO node, the data in the vm-baseRO node can be merged downward into the vm-snap1RO node; when the amount of data in the vm-snap1RO node is less than or equal to the amount of data in the vm-baseRO node, the data in the vm-snap1RO node can be merged upward into the vm-baseRO node.

[0034] In addition, the computer device can determine the disk file merge depth of the device to be backed up based on the amount of data on the device to be backed up at the current backup time. For example, if the amount of data on the device to be backed up at the current backup time exceeds a preset threshold, the disk file merge depth of the device to be backed up is delayed merge; if the amount of data on the device to be backed up at the current backup time does not exceed the preset threshold, the disk file merge depth of the device to be backed up is immediate merge.

[0035] Optionally, the computer device may determine a target host device from among the host devices based on the data volume at the current backup time and the resource volume of the host device at the current backup time, so as to execute the current backup task for the device to be backed up via the backup terminal in the target host device. For example, when the data volume at the current backup time of the device to be backed up is greater than a preset threshold, a target host device with a large resource volume and an idle state may be selected to serve the backup task for the device to be backed up; when the data volume at the current backup time of the device to be backed up does not exceed the preset threshold, a target host device with a small resource volume and a less busy state may be selected to serve the backup task for the device to be backed up.

[0036] S103: Send an instruction for backing up the device to be backed up to the backup terminal in the target host device according to the backup policy.

[0037] Specifically, the computer device sends instructions for backing up the device to be backed up to the backup terminal in the target host device according to the backup strategy determined above, so that the backup terminal uses the resources provided by the target host device to obtain the data of the device to be backed up from the repository through the backup proxy interface, and sends the obtained data to the backup repository in the backup server, thereby completing the data backup of the device to be backed up.

[0038] The data backup method provided by the embodiment of the present application is that the computer device can determine the backup strategy of the device to be backed up at the current backup time based on the acquired data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time. The backup strategy includes at least one of the disk file merging direction of the device to be backed up, the disk file merging depth, and the selection of the target host device. Based on the determined backup strategy, an instruction for backing up the device to be backed up is sent to the backup terminal in the target host device. Since the backup strategy is determined based on the actual operating information of the device to be backed up and the host device, rather than a manually formulated strategy, that is, the backup strategy determined by the present application matches the actual operating information of the device to be backed up and the host device, the irrationality of the manually formulated backup strategy is avoided, thereby improving the success rate of data backup and reducing the duration of data backup.

[0039] In actual applications, due to the limited bandwidth of data transmission, in order to avoid the technical problem of congestion caused by the amount of data in the transmission process exceeding the bandwidth limit, thereby reducing the success rate of data backup, that is, to further improve the success rate of data backup, the above-mentioned backup strategy optionally also includes a backup speed limit. In this case, the above-mentioned S102 may include: obtaining the network bandwidth utilization of the system to be backed up at the current backup time of the device to be backed up; and determining the backup strategy of the device to be backed up at the current backup time based on the data increment, the amount of data at the current backup time, the amount of data at the previous backup time, the amount of resources of the host device at the current backup time, and the network bandwidth utilization of the system to be backed up at the current backup time.

[0040] Specifically, the computer device can determine a backup rate limit policy for the device to be backed up based on the network bandwidth utilization of the system to be backed up at the current backup time. For example, the backup rate limit policy can be to perform data backup at a rate of 30M / S, 50M / S, or 100M / S, although other rates are also possible. During the actual backup process, when the obtained network bandwidth utilization reaches a preset threshold, the backup rate is limited. When the obtained network bandwidth utilization falls below the preset threshold, the backup rate can be appropriately increased. Optionally, the system to be backed up can be a virtualized data center.

[0041] In this embodiment, the computer device can also determine the backup strategy based on the network bandwidth utilization at the current backup time, so that the backup rate can be automatically and flexibly adjusted based on the network bandwidth utilization during the backup process, thereby avoiding transmission channel congestion and improving the success rate of data backup.

[0042] In actual application, the basic backup strategy of the device to be backed up can be obtained by the data backup strategy generation device, wherein the basic backup strategy may include the start time of the data backup of the device to be backed up, and whether the data backup is a full backup or an incremental backup, etc. The following embodiment introduces the process of determining the basic backup strategy of the device to be backed up. Based on the above embodiment, optionally, before the above S101, Figure 4 As shown, the method may further include:

[0043] S201. When the backup strategy generation time is reached, obtain the data volume of the device to be backed up at the generation time, the data increment of the device to be backed up within a preset time, the resource volume of the host device at the generation time, and the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the generation time.

[0044] Specifically, the generation cycle of the backup strategy can be set according to actual conditions. When the backup strategy generation time is reached, the computer device generates a basic backup strategy for the device to be backed up. The data volume at the generation time refers to the total amount of data on the disk of the device to be backed up at the generation time. The data increment within the preset time refers to the amount of data change on the disk of the device to be backed up within the preset time since the last backup, including the amount of data added, deleted and / or modified on the disk of the device to be backed up. The resource volume at the generation time refers to the CPU occupancy, memory occupancy, etc. of the host device at the generation time.

[0045] S202. According to the amount of data at the generation time, the data increment within the preset time, the amount of resources at the generation time, and the bandwidth utilization at the generation time, a basic backup strategy for the device to be backed up is determined through a preset recommendation algorithm. The basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

[0046] The basic backup strategy may also include a backup cycle, etc. The computer device may determine the basic backup strategy for the device to be backed up based on the following recommendation algorithm. Specifically:

[0047] The computer device determines whether to perform a full backup or an incremental backup of the device to be backed up based on the data increment within a preset time period and the data volume at the time the device to be backed up was created. For example, when the data increment within a preset time period is less than a preset ratio of the data volume at the time the device to be backed up was created, the computer device determines to perform an incremental backup of the device to be backed up. Optionally, the preset ratio may be one thousandth. When the weekly data change on the disk of the device to be backed up is less than a preset threshold (optionally, the preset threshold may be 100MB), the computer device may recommend backing up the device to be backed up once a week, and perform the backup during non-busy hours. When the weekly data change on the disk of the device to be backed up is greater than a preset threshold (optionally, the preset threshold may be 1TB), the computer device may recommend backing up the device to be backed up once a day, and may determine a specific time period for the backup. When the data increment on the disk of the device to be backed up within a preset time period is greater than a preset ratio (optionally, the preset ratio may be one-half) of the total data volume on the disk of the device to be backed up, the computer device determines to perform a full backup of the device to be backed up. The computer device may output the devices to be backed up that can be backed up in the time period based on the network bandwidth utilization at the time of generation, and determine the corresponding backup rate based on the amount of data to be backed up on the devices to be backed up at the time of generation and the bandwidth utilization at the time of generation. The time of generation may be the current backup time.

[0048] Of course, other recommendation algorithms may also be used to determine the basic backup strategy for the device to be backed up, which will not be described in detail in this embodiment.

[0049] Based on the above embodiment, optionally, the above S202 can be: determining the backup strategy set to be recommended through a preset recommendation algorithm based on the data volume at the generation moment, the data increment within the preset time, the resource volume at the generation moment, and the bandwidth utilization at the generation moment; and selecting a target backup strategy from the backup strategy set to be recommended as the basic backup strategy in combination with the historical backup strategy set by the user.

[0050] In this embodiment, the computer device can generate a basic backup strategy for the device to be backed up based on the operating information of the device to be backed up and the host device at the time of policy generation, as well as the network bandwidth utilization at the time of generation, so that the generated basic backup strategy matches the operating status of the production system where the device to be backed up and the host device are located. Compared with the basic backup strategy formulated manually, the generated basic backup strategy is more reasonable, thereby further improving the success rate of data backup.

[0051] Based on the above embodiment, optionally, the method further includes: sending an instruction for merging disk files to the device to be backed up according to the backup policy.

[0052] Specifically, after the current backup task is completed, the device to be backed up merges the disk file nodes according to the disk file merging direction and the disk file merging depth in the backup policy.

[0053] In this embodiment, since the computer device can send instructions for disk file merging to the device to be backed up based on the backup strategy, after the current backup task is completed, the device to be backed up merges the disk file nodes according to the disk file merging direction and the merging depth of the disk files in the backup strategy, thereby improving the disk reading and writing speed of the device to be backed up, and further improving the success rate of data backup.

[0054] In order to facilitate the understanding of those skilled in the art, the following is an example of the device to be backed up being a virtual machine and the system to be backed up being a virtualized data center. Specifically, Figure 5 As shown, the method may include:

[0055] S301. When the backup policy generation time is reached, obtain the data volume of the virtual machine at the generation time, the data increment of the virtual machine within the preset time, the resource volume of the host device at the generation time, and the network bandwidth utilization of the virtualization data center where the virtual machine is located at the generation time.

[0056] S302. According to the amount of data at the generation time, the data increment within the preset time, the amount of resources at the generation time, and the network bandwidth utilization at the generation time, a basic backup strategy for the virtual machine is determined through a preset recommendation algorithm. The basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

[0057] S303. Obtain the data increment of the virtual machine at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time. The virtual machine runs on the corresponding host device, and a backup terminal is installed on the host device.

[0058] S304. Determine the sub-backup strategy of the virtual machine at the current backup moment based on the data increment, the data volume at the current backup moment, the data volume at the previous backup moment, and the resource volume of the host device at the current backup moment. The sub-backup strategy includes at least one of the disk file merging direction, disk file merging depth, and target host device selection of the virtual machine.

[0059] Among them, optionally, the above S304 may include: obtaining the network bandwidth utilization of the system to be backed up where the virtual machine is located at the current backup time; determining the sub-backup strategy of the virtual machine at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, the resource volume of the host device at the current backup time, and the network bandwidth utilization of the virtualization data center at the current backup time, wherein the sub-backup strategy also includes a backup speed limit.

[0060] Through the above process, a basic backup strategy can be generated for each virtual machine in the virtualized data center, and multiple sub-backup strategies can be generated for each virtual machine. The sub-backup strategy is used to extend the basic backup strategy, and the sub-backup strategy includes at least one of the virtual machine's disk file merging direction, disk file merging depth, target host device selection, and backup speed limit. Figure 6 As shown, the virtualized data center includes multiple virtual machines, and the computer device determines a basic backup strategy for each virtual machine (the basic backup strategy is Figure 6 In this way, virtual machine 1, virtual machine 2... virtual machine m are bound to basic backup policy 1 ( Figure 6 In the policy 1), virtual machines m+1, m+2, ..., q are bound to the basic backup policy 2 ( Figure 6 In the strategy 2), virtual machines t+1, t+2, ..., w are bound to the basic backup strategy n ( Figure 6 By expanding the basic backup policy, multiple sub-backup policies are bound to each virtual machine (such as Figure 6 Sub-policies in), such as virtual machine 1 is bound to sub-backup policies ab, ba, ca and db, virtual machine 2 is bound to sub-backup policies aa, bb, ca and da, virtual machine m is bound to sub-backup policies aa, ba, cb and dc, virtual machine m+1 is bound to sub-backup policies ab, bb, ca and da, virtual machine m+2 is bound to sub-backup policies aa, ba, ca and db, virtual machine q is bound to sub-backup policies ab, ba, ca and db, virtual machine t+1 is bound to sub-backup policies aa, bb, ca and db, virtual machine t+2 is bound to sub-backup policies ab, ba, cb and dc, virtual machine w is bound to sub-backup policies aa, ba, ca and da. Among them, the sub-backup policies include qcow2 file node chain merging method (aa: upward merge, ab: downward merge), qcow2 file chain depth control (ba: timely merge, bb: delayed merge), target host device selection (ca: large resource bandwidth allocation, cb: small resource bandwidth allocation) (i.e. Figure 6 Selection of task processing nodes in ), backup speed limit strategy (da: speed limit 30M / S, db: speed limit 50M / S, dc: speed limit 100M / S).

[0061] S305: Send an instruction for backing up the virtual machine to the backup terminal in the target host device according to the basic backup strategy and the sub-backup strategy.

[0062] According to the above basic backup strategy and sub-backup strategy, an instruction for backing up the virtual machine is sent to the backup terminal in the target host device, so that the backup terminal uses the resources of the target host device to back up the data of the virtual machine based on the basic backup strategy and sub-backup strategy.

[0063] S306: Send an instruction for merging disk files to the virtual machine according to the sub-backup policy.

[0064] After the current backup task is completed, the device to be backed up merges the disk file nodes according to the disk file merging direction and the disk file merging depth in the sub-backup policy.

[0065] It should be noted that, for the specific description of S301 to S306 above, reference may be made to the specific description in the above embodiment, which will not be repeated in this embodiment.

[0066] In this embodiment, the computer device can automatically set a basic backup strategy for the device to be backed up, and based on the basic backup strategy and the actual operating information of the device to be backed up and the host device, set a sub-backup strategy for the device to be backed up, so that in the actual backup process, data backup is performed based on the above-mentioned determined basic backup strategy and sub-backup strategy, avoiding the irrationality of the artificially formulated backup strategy, thereby improving the success rate of data backup and reducing the duration of data backup.

[0067] Figure 7 This is a schematic diagram of the structure of the data backup device provided in the embodiment of the present application. Figure 7 As shown, the device may include: a first acquisition module 20, a first determination module 21 and a first sending module 22.

[0068] Specifically, the first acquisition module 20 is used to obtain the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the device to be backed up runs on the corresponding host device, and the backup terminal is installed on the host device;

[0069] The first determining module 21 is configured to determine a backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the backup strategy includes at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and a selection of a target host device;

[0070] The first sending module 22 is configured to send an instruction for backing up the device to be backed up to the backup terminal in the target host device according to the backup policy.

[0071] The data backup device provided in the embodiment of the present application can determine the backup strategy of the device to be backed up at the current backup time based on the acquired data increment, the amount of data at the current backup time, the amount of data at the previous backup time, and the amount of resources of the host device at the current backup time. The backup strategy includes at least one of the disk file merging direction of the device to be backed up, the disk file merging depth, and the selection of the target host device. Based on the determined backup strategy, an instruction for backing up the device to be backed up is sent to the backup terminal in the target host device. Since the backup strategy is determined based on the actual operating information of the device to be backed up and the host device, rather than a manually formulated strategy, that is, the backup strategy determined by the present application matches the actual operating information of the device to be backed up and the host device, the irrationality of the manually formulated backup strategy is avoided, thereby improving the success rate of data backup and reducing the duration of data backup.

[0072] Based on the above embodiment, optionally, the backup strategy further includes a backup speed limit;

[0073] The first determination module 21 is specifically used to obtain the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the current backup time; determine the backup strategy of the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, the resource volume of the host device at the current backup time, and the network bandwidth utilization of the system to be backed up at the current backup time.

[0074] Based on the above embodiment, optionally, the device further includes: a second acquisition module and a second determination module.

[0075] Specifically, the second acquisition module is used to obtain, before the first acquisition module 20 obtains the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, when the backup policy generation time is reached, obtain the data volume of the device to be backed up at the generation time, the data increment of the device to be backed up within a preset time, the resource volume of the host device at the generation time, and the network bandwidth utilization rate of the system to be backed up where the device to be backed up is located at the generation time;

[0076] The second determination module is used to determine the basic backup strategy of the device to be backed up through a preset recommendation algorithm based on the data volume at the generation time, the data increment within the preset time, the resource volume at the generation time, and the network bandwidth utilization at the generation time. The basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

[0077] Based on the above embodiment, optionally, the second determination module is specifically used to determine the backup strategy set to be recommended based on the data volume at the generation moment, the data increment within the preset time, the resource volume at the generation moment, and the bandwidth utilization at the generation moment through a preset recommendation algorithm; and select a target backup strategy from the backup strategy set to be recommended as the basic backup strategy in combination with the historical backup strategy set by the user.

[0078] Based on the above embodiment, optionally, when the backup strategy includes a merging direction of the disk files of the device to be backed up and selection of a target host device, the first determining module 21 is specifically configured to determine that the merging direction of the disk files of the device to be backed up is upward merging when the data increment does not exceed the data amount at the last backup time;

[0079] The first determining module 21 is specifically configured to determine that the merging direction of the disk files of the device to be backed up is downward merging when the data increment exceeds the data amount at the last backup time;

[0080] The first determination module 21 is specifically used to determine the target host device from each host device based on the data volume at the current backup time and the resource volume of the host device at the current backup time, so as to execute the backup task of the device to be backed up through the backup terminal in the target host device.

[0081] Based on the above embodiment, optionally, the device further includes: a second sending module.

[0082] Specifically, the second sending module is used to send an instruction for merging disk files to the device to be backed up according to the backup policy.

[0083] Based on the above embodiment, optionally, the system to be backed up is a virtualized data center, and the device to be backed up is a virtual machine.

[0084] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 8As shown. The computer device includes a processor, memory, network interface and database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data during the data backup process. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data backup method is implemented.

[0085] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0086] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0087] Obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the device to be backed up runs on the corresponding host device and a backup terminal is installed on the host device;

[0088] Determining a backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device;

[0089] According to the backup policy, an instruction for backing up the device to be backed up is sent to a backup terminal in a target host device.

[0090] In one embodiment, the backup strategy also includes a backup speed limit; when the processor executes the computer program, the following steps are also implemented: obtaining the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the current backup time; determining the backup strategy of the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, the resource volume of the host device at the current backup time, and the network bandwidth utilization of the system to be backed up at the current backup time.

[0091] In one embodiment, the processor further implements the following steps when executing the computer program: when the backup strategy generation moment is reached, obtain the data volume of the device to be backed up at the generation moment, the data increment of the device to be backed up within the preset time, the resource volume of the host device at the generation moment, and the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the generation moment; based on the data volume at the generation moment, the data increment within the preset time, the resource volume at the generation moment, and the network bandwidth utilization at the generation moment, determine the basic backup strategy of the device to be backed up through a preset recommendation algorithm, wherein the basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

[0092] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining a backup strategy set to be recommended through a preset recommendation algorithm based on the amount of data at the generation moment, the data increment within the preset time, the amount of resources at the generation moment, and the bandwidth utilization at the generation moment; and selecting a target backup strategy from the backup strategy set to be recommended as the basic backup strategy in combination with the historical backup strategy set by the user.

[0093] In one embodiment, when the backup strategy includes the merging direction of the disk files of the device to be backed up and the selection of the target host device, the processor further implements the following steps when executing the computer program: when the data increment does not exceed the data volume at the previous backup time, the merging direction of the disk files of the device to be backed up is determined to be an upward merge; when the data increment exceeds the data volume at the previous backup time, the merging direction of the disk files of the device to be backed up is determined to be a downward merge; based on the data volume at the current backup time and the resource volume of the host device at the current backup time, the target host device is determined from each host device, so as to execute the current backup task of the device to be backed up through the backup terminal in the target host device.

[0094] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: sending an instruction for merging disk files to the device to be backed up according to the backup policy.

[0095] Optionally, the system to be backed up is a virtualized data center, and the device to be backed up is a virtual machine.

[0096] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0097] Obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the device to be backed up runs on the corresponding host device and a backup terminal is installed on the host device;

[0098] Determining a backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device;

[0099] According to the backup policy, an instruction for backing up the device to be backed up is sent to a backup terminal in a target host device.

[0100] In one embodiment, the backup strategy also includes a backup speed limit; when the computer program is executed by the processor, the following steps are also implemented: obtaining the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the current backup time; determining the backup strategy of the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, the resource volume of the host device at the current backup time, and the network bandwidth utilization of the system to be backed up at the current backup time.

[0101] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the backup policy generation moment is reached, the data volume of the device to be backed up at the generation moment, the data increment of the device to be backed up within the preset time, the resource volume of the host device at the generation moment, and the network bandwidth utilization of the system to be backed up where the device to be backed up is located at the generation moment are obtained; based on the data volume at the generation moment, the data increment within the preset time, the resource volume at the generation moment, and the network bandwidth utilization at the generation moment, a preset recommendation algorithm is used to determine the basic backup strategy for the device to be backed up, wherein the basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

[0102] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a backup strategy set to be recommended through a preset recommendation algorithm based on the amount of data at the generation moment, the data increment within the preset time, the amount of resources at the generation moment, and the bandwidth utilization at the generation moment; and selecting a target backup strategy from the backup strategy set to be recommended as the basic backup strategy in combination with the historical backup strategy set by the user.

[0103] In one embodiment, when the backup strategy includes the merging direction of the disk files of the device to be backed up and the selection of the target host device, the computer program further implements the following steps when executed by the processor: when the data increment does not exceed the data volume at the last backup moment, the merging direction of the disk files of the device to be backed up is determined to be an upward merge; when the data increment exceeds the data volume at the last backup moment, the merging direction of the disk files of the device to be backed up is determined to be a downward merge; based on the data volume at the current backup moment and the resource volume of the host device at the current backup moment, the target host device is determined from each host device, so as to execute the current backup task of the device to be backed up through the backup terminal in the target host device.

[0104] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the backup policy, an instruction for merging disk files is sent to the device to be backed up.

[0105] Optionally, the system to be backed up is a virtualized data center, and the device to be backed up is a virtual machine.

[0106] The data backup apparatus, computer device, and storage medium provided in the above embodiments can execute the data backup method provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not fully described in the above embodiments, please refer to the data backup method provided in any embodiment of the present application.

[0107] The above description is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application.

[0108] In general, various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.

[0109] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a fault injection test apparatus, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0110] The block diagram of any logical flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logical circuits, modules and functions, or can represent a combination of program steps and logical circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory device and system (digital versatile disc DVD or CD optical disc) etc. Computer-readable media can include non-transient storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FPGA) and a processor based on a multi-core processor architecture.

[0111] The above description of exemplary embodiments of the present application has been provided by way of exemplary and non-limiting examples. However, various modifications and adaptations of the above embodiments will be apparent to those skilled in the art, when considered in conjunction with the accompanying drawings and the appended claims, without departing from the scope of the present application. Therefore, the proper scope of the present application will be determined by reference to the appended claims.

Claims

1. A data backup method, characterized in that: include: Obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, wherein the device to be backed up runs on the corresponding host device and a backup terminal is installed on the host device; Determining a backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device; The disk file merging direction includes upward merging or downward merging. Upward merging refers to merging the data in the nodes of the disk file that have been incrementally changed since the last backup time into the nodes backed up at the last backup time. Downward merging refers to merging the data in the nodes backed up at the last backup time into the nodes that have been incrementally changed since the last backup time. The disk file merging depth includes timely merging or delayed merging; According to the backup strategy, sending an instruction for backing up the device to be backed up to the backup terminal in the target host device; When the backup strategy includes a merging direction of disk files of the device to be backed up and selection of a target host device, determining the backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time includes: When the data increment does not exceed the data amount at the last backup time, determining that the merging direction of the disk files of the device to be backed up is upward merging; When the data increment exceeds the data amount at the last backup time, determining that the merging direction of the disk files of the device to be backed up is downward merging; According to the data volume at the current backup time and the resource volume of the host device at the current backup time, a target host device is determined from each host device, so as to execute the backup task of the device to be backed up through the backup terminal in the target host device.

2. The method according to claim 1, characterized in that The backup strategy also includes backup speed limit; The step of determining the backup strategy for the device to be backed up at the current backup time based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, and the resource volume of the host device at the current backup time includes: Obtaining the network bandwidth utilization rate of the system to be backed up where the device to be backed up is located at the current backup time; The backup strategy of the device to be backed up at the current backup time is determined based on the data increment, the data volume at the current backup time, the data volume at the previous backup time, the resource volume of the host device at the current backup time, and the network bandwidth utilization of the system to be backed up at the current backup time.

3. The method according to claim 1, characterized in that Before obtaining the data increment of the device to be backed up at the current backup time relative to the previous backup time, the data volume at the current backup time and the data volume at the previous backup time, and the resource volume of the host device at the current backup time, the method further includes: When the backup strategy generation time is reached, the amount of data of the device to be backed up at the generation time, the data increment of the device to be backed up within a preset time, the resource amount of the host device at the generation time, and the network bandwidth utilization rate of the system to be backed up where the device to be backed up is located at the generation time are obtained; Based on the data volume at the generation time, the data increment within the preset time, the resource volume at the generation time, and the network bandwidth utilization at the generation time, a basic backup strategy for the device to be backed up is determined through a preset recommendation algorithm. The basic backup strategy includes the start time of the backup and the choice between full backup and incremental backup.

4. The method according to claim 3, characterized in that The step of determining the basic backup strategy for the device to be backed up by a preset recommendation algorithm based on the data volume at the generation time, the data increment within the preset time, the resource volume at the generation time, and the bandwidth utilization at the generation time includes: Determining a backup strategy set to be recommended by a preset recommendation algorithm based on the data volume at the generation time, the data increment within the preset time, the resource volume at the generation time, and the bandwidth utilization at the generation time; In combination with the historical backup strategies set by the user, a target backup strategy is selected from the backup strategy set to be recommended as the basic backup strategy.

5. The method according to any one of claims 1 to 4, characterized in that Also includes: According to the backup policy, an instruction for merging disk files is sent to the device to be backed up.

6. The method according to any one of claims 2 to 4, characterized in that The system to be backed up is a virtualized data center, and the device to be backed up is a virtual machine.

7. A data backup device, characterized in that: include: A first acquisition module is configured to acquire a data increment at a current backup time of a device to be backed up relative to a previous backup time, a data volume at the current backup time and a data volume at the previous backup time, and a resource volume of a host device at the current backup time, wherein the device to be backed up is running on a corresponding host device on which a backup terminal is installed; a first determining module, configured to determine a backup strategy for the device to be backed up at the current backup time based on the data increment, the amount of data at the current backup time, the amount of data at the previous backup time, and the amount of resources of the host device at the current backup time, the backup strategy including at least one of a disk file merging direction and a disk file merging depth of the device to be backed up, and selection of a target host device; The disk file merging direction includes upward merging or downward merging. Upward merging refers to merging the data in the nodes of the disk file that have been incrementally changed since the last backup time into the nodes backed up at the last backup time. Downward merging refers to merging the data in the nodes backed up at the last backup time into the nodes that have been incrementally changed since the last backup time. The disk file merging depth includes timely merging or delayed merging; A first sending module, configured to send an instruction for backing up the device to be backed up to a backup terminal in a target host device according to the backup strategy; When the backup strategy includes a merging direction of the disk files of the device to be backed up and selection of a target host device, the first determining module is specifically configured to determine that the merging direction of the disk files of the device to be backed up is upward merging when the data increment does not exceed the data amount at the last backup time; The first determining module is specifically configured to determine that the merging direction of the disk files of the device to be backed up is downward merging when the data increment exceeds the data amount at the last backup time; The first determination module is specifically used to determine the target host device from each host device based on the data volume at the current backup time and the resource volume of the host device at the current backup time, so as to execute the backup task of the device to be backed up through the backup terminal in the target host device.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Virtual machine backup method and device, recovery method and device and backup server cluster

    CN109558215A

  • Selecting a backup type based on changed data

    US20150370645A1