Data processing method, device and storage medium
Patent Information
- Application Number
- CN202611016790.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-07-09
AI Technical Summary
[0003]本申请的主要目的在于提供了一种数据处理方法、设备及存储介质,旨在解决如何简单方便地完成用户业务数据的恢复的技术问题
[0014]本申请通过响应于数据恢复指令,基于业务数据确定数据恢复方式,然后根据数据恢复方式和源机环境确定待恢复数据的获取方式,并根据数据恢复方式和目标机环境确定待恢复数据的推送方式,然后根据获取方式和备份点对应的备份数据集确定待恢复数据,并通过推送方式将待恢复数据传输至目标机,备份数据集包括对源机进行整机备份生成的备份数据。本申请基于备份时运行的业务数据确定数据恢复方式,根据数据恢复方式、源机环境、目标机环境确定待恢复数据的获取方式和推送方式,然后根据获取方式和备份点对应的备份数据集确定待恢复数据,再通过推送方式将待恢复数据传输至目标机,从而能够简单方便地完成用户业务数据的恢复。
Smart Images

Figure CN122526896B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, apparatus and storage medium. Background Technology
[0002] Currently, a complete business system typically consists of multiple programs and data. First, there are the operating system's programs and data, then the business programs and data, and additional files to support the system's normal operation, such as program configurations and attachments. All of this data is crucial and indispensable to the business system. However, existing backup methods back them up separately: the operating system uses block backups, while the business system uses interface backups (calling the business system's interface to perform backups, such as calling Oracle's RMAN interface to perform database backups). Block backups can only be used to restore operating system data (block backups cannot guarantee the consistency of business system data, and the restored business data is unusable); interface backups can only be used to restore specific business systems (interfaces cannot back up operating system data). Data recovery requires first restoring the operating system via block backup, then separately restoring different business data via each interface backup, and coordinating the recovery timelines; otherwise, data mismatches may occur. This is not only cumbersome but also inefficient for users. Summary of the Invention
[0003] The main purpose of this application is to provide a data processing method, device and storage medium, which aims to solve the technical problem of how to easily and conveniently restore user business data.
[0004] To achieve the above objectives, this application provides a data processing method, which includes the following steps: In response to data recovery commands, determine the data recovery method based on business data; The method for obtaining the data to be recovered is determined based on the data recovery method and the source machine environment, and the method for pushing the data to be recovered is determined based on the data recovery method and the target machine environment; The data to be restored is determined according to the acquisition method and the backup dataset corresponding to the backup point, and the data to be restored is transmitted to the target machine through the push method. The backup dataset includes backup data generated by performing a full machine backup of the source machine.
[0005] Optionally, determining the acquisition method of the data to be recovered based on the data recovery method and the source machine environment includes: When the data recovery method is full system recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset corresponding to the backup point and the synthetic disk method. When the data recovery method is file recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset and synthetic data volume corresponding to the backup point; When the data recovery method is business type data recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset and source machine environment corresponding to the backup point.
[0006] Optionally, when the data recovery method is business type data recovery, determining the acquisition method of the data to be recovered as acquisition based on the backup dataset and source machine environment corresponding to the backup point includes: When the data recovery method is business type data recovery, if the source machine environment is a single machine environment, the method for obtaining the data to be recovered is determined to be based on the backup dataset and synthetic data volume corresponding to the backup point. If the source machine environment is a cluster environment, then the method for obtaining the data to be recovered is determined to be based on the created virtual machine.
[0007] Optionally, determining the data to be restored based on the acquisition method and the backup dataset corresponding to the backup point, and transmitting the data to be restored to the target machine via the push method, includes: When the acquisition method is based on the backup dataset corresponding to the backup point, the data to be recovered is selected from the backup dataset and the data to be recovered is transmitted to the target machine through the push method; When the acquisition method is based on the created virtual machine, determine whether there is a shared disk based on the backup point, and determine the number of virtual machines based on the judgment result; The disk information is determined based on the backup point, and virtual machines are created based on the disk information and the number of virtual machines. During the virtual machine's operation, the data to be recovered is obtained from the virtual machine through the business interface, and the data to be recovered is transmitted to the target machine through the push method.
[0008] Optionally, the step of determining disk information based on the backup point and creating virtual machines based on the disk information and the number of virtual machines includes: The disk information is determined based on the backup point, and the initial program installation path is determined based on the business process information during data backup. The initial program installation path is renamed to obtain the target program installation path; A virtual machine is created based on the disk information, the number of virtual machines, and the installation path of the target program.
[0009] Optionally, transmitting the data to be recovered to the target machine via the push method includes: When the push method is a whole-machine push, the data to be recovered is written to the target machine's disk; When the push method is file push, the data to be recovered is copied to the target machine's file system; When the push method is business type data push, if the target machine environment is a single machine environment, the data to be recovered is written to the target machine's disk; If the target machine environment is a cluster environment, the business type interface is called to write the data to be recovered to the target machine's disk.
[0010] Optionally, before determining the data to be restored based on the acquisition method and the backup dataset corresponding to the backup point, the method further includes: When the source machine environment is a single-machine environment, backup points are generated based on the backup data generated from a full machine backup of the source machine. When the source machine environment is a cluster environment, the initial disk data corresponding to each disk in the source machine is selected from the backup data, and the disk type corresponding to each disk in the source machine is determined. The disk type includes: independent disk, shared disk and distributed disk. Select the independent disk data corresponding to each independent disk from the initial disk data, and generate each backup point based on the independent disk data; Select all shared disk data corresponding to each shared disk from the initial disk data, and generate a backup point based on any shared disk data in each of the shared disk data; Select the distributed disk data corresponding to each of the distributed disks from the initial disk data, and generate each backup point based on the distributed disk data.
[0011] Furthermore, to achieve the above objectives, this application provides a data processing method, which includes the following steps: The running service type is determined based on the scanned process list, and the corresponding service data is determined based on the running service type; If a disk write operation occurs, the corresponding disk write data will be used as backup data. The business data and the backup data are sent to the backup appliance for storage.
[0012] In addition, to achieve the above objectives, this application also proposes a data processing apparatus, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data processing method described above.
[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the data processing method described above.
[0014] This application, in response to a data recovery command, determines the data recovery method based on business data, then determines the method for acquiring the data to be recovered based on the data recovery method and the source machine environment, and further determines the method for pushing the data to be recovered based on the data recovery method and the target machine environment. Finally, it determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and then pushes the data to be recovered to the target machine. The backup dataset includes backup data generated from a full system backup of the source machine. This application determines the data recovery method based on the business data running during backup, determines the acquisition and push methods for the data to be recovered based on the data recovery method, the source machine environment, and the target machine environment, then determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and finally pushes the data to be recovered to the target machine, thereby enabling simple and convenient recovery of user business data. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application; Figure 2 This is a schematic diagram of the overall architecture of an embodiment of the data processing method of this application; Figure 3 This is a flowchart illustrating the second embodiment of the data processing method of this application; Figure 4 This is a flowchart illustrating the third embodiment of the data processing method of this application; Figure 5 This is a schematic diagram of the structure of the data processing device in the hardware operating environment involved in the embodiments of this application.
[0018] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0020] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0021] The main solution of this application embodiment is as follows: in response to a data recovery command, a data recovery method is determined based on business data; the acquisition method of the data to be recovered is determined according to the data recovery method and the source machine environment, and the push method of the data to be recovered is determined according to the data recovery method and the target machine environment; the data to be recovered is determined according to the acquisition method and the backup dataset corresponding to the backup point, and the data to be recovered is transmitted to the target machine through the push method, wherein the backup dataset includes backup data generated by performing a full machine backup of the source machine.
[0022] Currently, a complete business system typically consists of multiple programs and data. First, there are the operating system's programs and data, then the business programs and data, and additional files to support the system's normal operation, such as program configurations and attachments. All of this data is crucial and indispensable to the business system. However, existing backup methods back them up separately: the operating system uses block backups, while the business system uses interface backups (calling the business system's interface to perform backups, such as calling Oracle's RMAN interface to perform database backups). Block backups can only be used to restore operating system data (block backups cannot guarantee the consistency of business system data, and the restored business data is unusable); interface backups can only be used to restore specific business systems (interfaces cannot back up operating system data). Data recovery requires first restoring the operating system via block backup, then separately restoring different business data via each interface backup, and coordinating the recovery timelines; otherwise, data mismatches may occur. This is not only cumbersome but also inefficient for users.
[0023] This application, in response to a data recovery command, determines the data recovery method based on business data, then determines the method for acquiring the data to be recovered based on the data recovery method and the source machine environment, and further determines the method for pushing the data to be recovered based on the data recovery method and the target machine environment. Finally, it determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and then pushes the data to be recovered to the target machine. The backup dataset includes backup data generated from a full system backup of the source machine. This application determines the data recovery method based on the business data running during backup, determines the acquisition and push methods for the data to be recovered based on the data recovery method, the source machine environment, and the target machine environment, then determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and finally pushes the data to be recovered to the target machine, thereby enabling simple and convenient recovery of user business data.
[0024] Based on this, embodiments of this application provide a data processing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application.
[0025] In this embodiment, the data processing method includes the following steps: Step S10: In response to the data recovery command, determine the data recovery method based on the business data.
[0026] Understandably, referring to Figure 2 , Figure 2 This is a schematic diagram of the overall architecture of an embodiment of the data processing method of this application, as shown below. Figure 2 As shown, the source machine, backup appliance, and target machine are connected in sequence. During data backup, the backup appliance receives and stores the backup data from the source machine, which is the host machine that needs to be backed up. During data recovery, the backup appliance sends the backed-up data to the target machine to complete the data recovery.
[0027] It should be noted that the execution subject of this embodiment can be the aforementioned backup appliance, which can back up data from the source machine and restore the backed-up data to the target machine.
[0028] It should be understood that after responding to a user's data recovery command, the backup appliance indicates that the user needs to recover some backed-up data. This embodiment can determine the data recovery method based on business data. Business data can be the business data currently running on the source machine, obtained periodically during data backup. When selecting a data backup point for data recovery, corresponding data recovery methods can be provided based on this business data. Basic recovery methods include full machine recovery and file recovery (since it's a full machine backup, all files and disk structures are backed up, so full machine recovery and file recovery are possible). A full machine backup backs up the computer's operating system, applications, business data, and metadata such as disk partitions, volumes, and file systems to another computer. A volume device, also called a volume, consists of one or more block devices. A file system (i.e., formatting) can be created on it to store files. The computer storing the backup data is called a backup appliance. Furthermore, if the source machine is running other businesses, corresponding recovery methods are provided based on the business type. For example, if the source machine is running Oracle... For databases (including standalone databases and RAC cluster databases), Oracle database recovery can be provided; if SQL Server is running, SQL Server database recovery can be provided; if MySQL is running, MySQL database recovery can be provided; if Ceph cluster is running, Ceph data recovery can be provided, etc. These include: full machine recovery (restoring the operating system, applications, and business data to the target machine, essentially cloning the source machine to the target machine), file recovery (copying user-selected directories and data to the target machine), and business-type data recovery. Business-type data recovery is based on the running business and includes database recovery (Oracle, MySQL, SQL Server, etc.) and Ceph data recovery, determined by the business data running on the source machine. After determining all data recovery methods based on the business data, they can be displayed on the backup appliance so users can choose the desired recovery method from all available options.
[0029] In practice, the target machine can be determined based on the data recovery method, which is equivalent to eliminating target machines that do not support the recovery method. For example, if the user chooses Oracle database recovery, then the target machine needs to have Oracle database software installed. Otherwise, the database will not work after the data is recovered. This is equivalent to filtering out many unnecessary target machines for the user, saving the user time in selecting target machines, and also avoiding the user mistakenly selecting unsupported target machines and wasting a lot of time on data recovery.
[0030] Step S20: Determine the acquisition method of the data to be recovered based on the data recovery method and the source machine environment, and determine the push method of the data to be recovered based on the data recovery method and the target machine environment.
[0031] Understandably, the source machine environment refers to the environment in which the source machine runs, such as a standalone environment or a cluster environment. The method for obtaining the data to be recovered, i.e., how to obtain the data to be recovered, can be determined based on the data recovery method and the source machine environment. The data to be recovered refers to the data that the user wants to recover. The target machine environment refers to the environment in which the target machine runs, such as a standalone environment or a cluster environment. The method for pushing the data to be recovered, i.e., how to push the data to be recovered from the backup appliance to the target machine, can be determined based on the data recovery method and the target machine environment.
[0032] Furthermore, in order to effectively determine the acquisition method of the data to be recovered, in this embodiment, determining the acquisition method of the data to be recovered based on the data recovery method and the source machine environment includes: when the data recovery method is whole machine recovery, determining the acquisition method of the data to be recovered to be based on the backup dataset corresponding to the backup point and the synthetic disk method; when the data recovery method is file recovery, determining the acquisition method of the data to be recovered to be based on the backup dataset corresponding to the backup point and the synthetic data volume method; when the data recovery method is business type data recovery, determining the acquisition method of the data to be recovered to be based on the backup dataset corresponding to the backup point and the source machine environment.
[0033] It should be understood that data recovery methods can include full system recovery, file recovery, and business-type data recovery. Business-type data recovery is provided for the specific business type being run. Generally, business recovery involves the recovery of two types of data: business configuration (i.e., configuration files, or parameter files for Oracle databases) and business data (i.e., data files, such as data files, log files, and control files for Oracle databases). The storage methods and locations of these two types of data differ depending on the business type. This data can be obtained by analyzing the program's installation path, program startup parameters, and system configuration parameters. When performing a full system backup, the storage location of the running business's business configuration and business data can be obtained by analyzing the installation path, startup parameters, and system configuration. During recovery, the business configuration and business data from the backup point are restored to the target host, and parameters are corrected to complete the business recovery. The source machine environment can include a single machine or a cluster.
[0034] Understandably, when the data recovery method is full system recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset corresponding to the backup point and a composite disk method; that is, the backup datasets from the full system backup are combined into a disk and then restored to the target machine. When the data recovery method is file recovery, the method for obtaining the data to be recovered is determined to be directly obtained from the backup dataset corresponding to the backup point and a composite data volume method. When the data recovery method is business-type data recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset corresponding to the backup point and the source machine environment.
[0035] Furthermore, in order to determine the method of obtaining the data to be recovered when the data recovery method is business type data recovery, in this embodiment, determining the method of obtaining the data to be recovered as based on the backup dataset corresponding to the backup point and the source machine environment includes: if the source machine environment is a single-machine environment, then the method of obtaining the data to be recovered is determined to be based on the backup dataset corresponding to the backup point and the synthetic data volume; if the source machine environment is a cluster environment, then the method of obtaining the data to be recovered is determined to be based on the created virtual machine.
[0036] It should be understood that when the data recovery method is business type data recovery, if the source machine environment is a single machine environment, the method for obtaining the data to be recovered is to obtain it directly from the backup dataset and synthetic data volume corresponding to the backup point.
[0037] In practical implementation, if the source machine environment is a cluster environment (including a cluster environment with only a single node, which can be transformed into a multi-host cluster by adding nodes later), and the data cannot be directly obtained from the backup point, it needs to be obtained through other means. Therefore, the method for obtaining the data to be restored is determined to be based on the created virtual machine. The reason for this is that the cluster system uses shared storage or distributed storage, and the business data storage formats within it vary widely. For example, Oracle Real Application Clusters (Oracle RAC) uses shared storage. Oracle RAC combines multiple computer nodes into a cluster to provide database services externally. Data is stored on shared storage. As long as not all the computer nodes in the cluster fail, the cluster can provide database services normally, ensuring high availability of the business. Automatic Storage Management (ASM) manages the data, providing file systems, logical volume managers, and software RAID (disk arrays) services in a platform-independent manner. Not only does it offer high data reliability, but it also provides high IO load performance. However, because the stored data format is not publicly available, directly parsing the data format to obtain business data is extremely difficult. Similarly, Ceph uses distributed storage, where the data format is public, but different versions have different storage methods, making direct parsing and retrieval also very difficult. Since data backup is performed as a full machine backup, a virtual machine can be created on the backup appliance to boot the backed-up operating system and cluster system. Then, the cluster components can read the business data files and send them to the target host for data recovery.
[0038] Step S30: Determine the data to be restored according to the acquisition method and the backup dataset corresponding to the backup point, and transmit the data to be restored to the target machine through the push method. The backup dataset includes backup data generated by performing a full machine backup on the source machine.
[0039] Understandably, this embodiment can select the data to be restored from the backup dataset corresponding to the backup point according to the acquisition method, and transmit the data to be restored to the target machine via push. The backup dataset includes the backup data generated by performing a full machine backup of the source machine. During data recovery, the following situations may occur: data backup of a single machine is restored to the single machine; data backup of a single machine is restored to the cluster host; data backup of the cluster is restored to the single machine; data backup of the cluster is restored to the cluster host.
[0040] Furthermore, to effectively generate backup points, in this embodiment, before determining the data to be restored based on the acquisition method and the backup dataset corresponding to the backup point, the method further includes: generating backup points based on backup data generated from a full machine backup of the source machine when the source machine environment is a single-machine environment; selecting initial disk data corresponding to each disk in the source machine from the backup data when the source machine environment is a cluster environment, and determining the disk type corresponding to each disk in the source machine, wherein the disk type includes: independent disk, shared disk, and distributed disk; selecting independent disk data corresponding to each independent disk from the initial disk data, and generating each backup point based on the independent disk data; selecting all shared disk data corresponding to each shared disk from the initial disk data, and generating a backup point based on any shared disk data in the shared disk data; selecting distributed disk data corresponding to each distributed disk from the initial disk data, and generating each backup point based on the distributed disk data.
[0041] Understandably, when performing data backups, a full backup of the source machine is performed, backing up the operating system, applications, business data, and disk structure information together to the backup appliance. The source machine can be a single host (such as a MySQL database, Oracle database, or web server) or a host cluster (such as an Oracle RAC cluster, SQL Server failover cluster, or Ceph cluster). A single host requires a single-machine backup plan, and a cluster requires a cluster backup plan. When creating a cluster backup plan, all nodes in the cluster must be associated, and these hosts must be backed up simultaneously to ensure the integrity of the cluster data. The backup cycle can be scheduled or real-time. If it is a scheduled backup, each time a backup is performed, the process list on the host (including startup parameters) is scanned. The process list obtains the running business type on the host, and relevant information for each business type instance (such as database instance information, including the database program path, version information, configuration information, and path information for parameter files, control files, data files, redo log files, etc.), which is then sent to the backup appliance for storage. During subsequent recovery, various recovery methods are provided based on this information. If the business system is backed up in real time, it is scanned periodically to ensure that the backup point retains relevant information about the business system. During real-time backup, the source host sends the disk write data, disk number, disk offset, write timestamp, host number, etc., to the backup appliance in real time. The backup appliance sorts the write operations of each node to the shared disk according to the timestamps to ensure that the data at the backup point is not out of order.
[0042] It should be understood that after receiving backup data, the backup appliance generates backup points based on the backup data generated from the full machine backup of the source machine, provided that the source machine is in a single-machine environment. The backup data on the disk can be directly stored to form backup points.
[0043] In this embodiment, initial disk data corresponding to each disk in the source machine can be selected from the backup data, and the disk type corresponding to each disk in the source machine can be determined. The disk type may include independent disks, shared disks, and distributed disks. Independent disk data corresponding to each independent disk can be selected from the initial disk data, and backup points can be generated based on each independent disk data. A backup point may include one or more independent disk data sets. Similarly, all shared disk data corresponding to each shared disk can be selected from the initial disk data, and a backup point can be generated based on any shared disk data set. A backup point may include one or more shared disk data sets. Furthermore, distributed disk data corresponding to each distributed disk can be selected from the initial disk data, and backup points can be generated based on each distributed disk data set. A backup point may include one or more distributed disk data sets.
[0044] This embodiment responds to a data recovery command, determines the data recovery method based on business data, then determines the acquisition method of the data to be recovered based on the data recovery method and the source machine environment, and determines the push method of the data to be recovered based on the data recovery method and the target machine environment. Finally, it determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and pushes the data to be recovered to the target machine. The backup dataset includes backup data generated from a full machine backup of the source machine. This embodiment determines the data recovery method based on the business data running during backup, determines the acquisition and push methods of the data to be recovered based on the data recovery method, the source machine environment, and the target machine environment, determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and then pushes the data to be recovered to the target machine, thereby enabling simple and convenient recovery of user business data.
[0045] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the data processing method of this application.
[0046] Based on the first embodiment described above, in this embodiment, step S30 includes: Step S301: When the acquisition method is based on the backup dataset corresponding to the backup point, select the data to be restored from the backup dataset and transmit the data to be restored to the target machine through the push method.
[0047] Understandably, when the acquisition method is based on the backup dataset corresponding to the backup point, the data to be restored can be directly selected from the backup dataset. All backup data in the backup dataset can be used as the data to be restored, and then the data to be restored can be transmitted to the target machine via push.
[0048] Step S302: When the acquisition method is based on the created virtual machine, determine whether there is a shared disk according to the backup point, and determine the number of virtual machines according to the judgment result.
[0049] It should be understood that when the acquisition method is based on the creation of virtual machines, the existence of a shared disk can be determined based on the data of the backup point, and the number of virtual machines can be determined based on the judgment result. If a shared disk exists, only one virtual machine needs to be created; if no shared disk exists, then the backup points of all hosts in the source host cluster are obtained, and multiple virtual machines are created.
[0050] Step S303: Determine disk information based on the backup point, and create virtual machines based on the disk information and the number of virtual machines.
[0051] Furthermore, in order to effectively create virtual machines, in this embodiment, step S303 includes: determining disk information based on the backup point, determining the initial program installation path based on the business process information during data backup; renaming the initial program installation path to obtain the target program installation path; and creating virtual machines based on the disk information, the number of virtual machines, and the target program installation path.
[0052] Understandably, disk information can be determined based on backup points. Specifically, a series of virtual disks can be created based on the data at the backup points. The number and size of the disks are exactly the same as those on the source host. The data on the virtual disks is the data on the source host disks at the moment of backup.
[0053] In the specific implementation, to prevent the database business system on the system from starting up when the virtual machine starts, and then performing write operations on the business data of the virtual machine, resulting in the data state of the data to be restored being inconsistent with the data state at the time of backup, it is necessary to find the initial program installation path based on the business process information at the time of backup. The business process information can be the process information obtained during data backup. The initial program installation path is renamed to obtain the target program installation path (the original path " / opt / app" is renamed to " / opt / xxx", but the program path of the cluster software cannot be changed to avoid abnormal cluster startup. For example, the installation directory of the Oracle database in Oracle RAC is changed, but the installation directory of ASM cannot be modified. This way, Oracle ASM can start normally, but the database will not start, ensuring that the database data files are not modified, while business data can be obtained normally. Then, virtual machines are created and the operating system is started based on disk information, number of virtual machines, and target program installation path.
[0054] Step S304: During the virtual machine's operation, obtain the data to be recovered from the virtual machine through the business interface, and transmit the data to be recovered to the target machine through the push method.
[0055] In practical implementations, during virtual machine operation, i.e., after the cluster components start, data files can be read and recovered through business interfaces (such as the asmcmd command or the DBMS_DISKGROUP interface). However, these methods either consume a large amount of space to cache data or have poor read performance, making them unsuitable for data recovery. This embodiment obtains the data to be recovered from the virtual machine through a business interface and transmits the data to the target machine via push. In one feasible embodiment, the distribution location information of all data files on the virtual disk can be obtained first through the cluster interface (e.g., by obtaining the distribution location information of all database files on the virtual disk through SQL statements). Then, all the data to be recovered can be obtained by directly reading the virtual disk, greatly improving the efficiency of data recovery.
[0056] Furthermore, in this embodiment, transmitting the data to be recovered to the target machine via the push method includes: when the push method is a whole-machine push, writing the data to be recovered to the target machine's disk; when the push method is a file push, copying the data to be recovered to the target machine's file system; when the push method is a business-type data push, if the target machine environment is a single-machine environment, writing the data to be recovered to the target machine's disk; if the target machine environment is a cluster environment, calling the business-type interface to write the data to be recovered to the target machine's disk.
[0057] Understandably, when the push method is whole-machine push, the data to be recovered can be directly written to the target machine's disk; when the push method is file push, the data to be recovered can be copied to the target machine's file system.
[0058] In the specific implementation, when the push method is business type data push, if the target machine environment is a single machine environment, the data to be restored is directly written to the target machine's disk; if the target machine environment is a cluster environment, the business type interface (such as the Oracle ASM interface or Ceph's RBD interface) is called to write the data to be restored to the target machine's disk.
[0059] In this embodiment, when the data acquisition method is based on the backup dataset corresponding to the backup point, the data to be recovered is selected from the backup dataset and transmitted to the target machine via push. When the data acquisition method is based on created virtual machines, the existence of a shared disk is determined according to the backup point, and the number of virtual machines is determined based on the determination result. Then, disk information is determined based on the backup point, and virtual machines are created based on the disk information and the number of virtual machines. During the virtual machine's operation, the data to be recovered is obtained from the virtual machine through a business interface and transmitted to the target machine via push. This embodiment obtains the data to be recovered based on different data acquisition methods, supports different types of recovery methods, and then transmits the data to the target machine via push, meeting various user recovery needs in a simple, flexible, and convenient manner.
[0060] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the data processing method of this application.
[0061] In this embodiment, the data processing method includes the following steps: Step S40: Determine the running service type based on the scanned process list, and determine the service data corresponding to the running service type.
[0062] It should be noted that the execution entity in this embodiment can be the source machine.
[0063] Understandably, individual hosts require a single-machine backup plan, while clusters require a cluster backup plan. Creating a cluster backup plan requires associating all nodes in the cluster and backing them up simultaneously to ensure data integrity. Backup cycles can be scheduled or real-time. Real-time backup is a data backup method that uses disk filtering drivers and other technologies to monitor the write activity of each disk in real time. Block devices store data in units of blocks; this can be an entire disk (e.g., / dev / sda) or a partition on a disk (e.g., / dev / sdb1). The written data, along with the disk number and offset, is sent to the backup server for storage. This method allows for data recovery at any point in time. Scheduled backup is also a data backup method that periodically sends incremental data from the disk to a backup appliance for storage.
[0064] It should be understood that for scheduled backups, each data backup requires scanning the process list on the source machine, including startup parameters. This process list reveals the types of services running on the host and the business data for each instance (e.g., database instance information, including database program path, version information, configuration information, and path information for parameter files, control files, data files, and redo log files). If the business system is backed up in real-time, a periodic scan is performed to ensure that the backup point contains the relevant business data.
[0065] Step S50: If a disk write operation occurs, the corresponding disk write data is used as backup data.
[0066] Understandably, when performing real-time or scheduled backups, if the source machine performs disk write operations, the corresponding disk write data will be used as backup data.
[0067] Step S60: Send the business data and the backup data to the backup appliance for storage.
[0068] In practice, business data, backup data, disk number, disk offset, write timestamp, and host number can be sent to the backup appliance for storage.
[0069] This embodiment determines the type of service being run based on the scanned process list, and identifies the corresponding service data. If a disk write operation occurs, the corresponding disk write data is used as backup data. Then, the service data and backup data are sent to a backup appliance for storage. This embodiment, by sending the service data and backup data to the backup appliance for storage, enables simple and effective full-machine backup of the source machine.
[0070] This application provides a data processing apparatus, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data processing method in Embodiment 1 above.
[0071] The following is for reference. Figure 5 This document illustrates a structural diagram of a data processing device suitable for implementing embodiments of this application. The data processing device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The data processing device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0072] like Figure 5 As shown, the data processing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the data processing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the data processing device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show data processing devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.
[0073] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0074] The data processing device provided in this application, employing the data processing method described in the above embodiments, can solve the technical problem of how to easily and conveniently restore user business data. Compared with the prior art, the beneficial effects of the data processing device provided in this application are the same as those of the data processing method provided in the above embodiments, and other technical features of this data processing device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0075] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0076] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0077] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the data processing method described in the above embodiments.
[0078] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0079] The aforementioned computer-readable storage medium may be included in a data processing device or may exist independently without being assembled into a data processing device.
[0080] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by a data processing device, the data processing device: responds to a data recovery instruction and determines a data recovery method based on business data; determines an acquisition method for the data to be recovered based on the data recovery method and the source machine environment, and determines a push method for the data to be recovered based on the data recovery method and the target machine environment; determines the data to be recovered based on the acquisition method and the backup dataset corresponding to the backup point, and transmits the data to be recovered to the target machine through the push method, wherein the backup dataset includes backup data generated by performing a full machine backup of the source machine.
[0081] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Python, Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0083] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0084] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data processing method, thereby solving the technical problem of how to easily and conveniently recover user business data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the data processing method provided in the above embodiments, and will not be repeated here.
[0085] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.
Claims
1. A data processing method, characterized in that, The data processing method includes the following steps: In response to data recovery commands, determine the data recovery method based on business data; The method for obtaining the data to be recovered is determined based on the data recovery method and the source machine environment, and the method for pushing the data to be recovered is determined based on the data recovery method and the target machine environment; The data to be restored is determined according to the acquisition method and the backup dataset corresponding to the backup point, and the data to be restored is transmitted to the target machine through the push method. The backup dataset includes backup data generated by performing a full machine backup of the source machine. The step of determining the acquisition method of the data to be recovered based on the data recovery method and the source machine environment includes: When the data recovery method is full system recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset corresponding to the backup point and the synthetic disk method. When the data recovery method is file recovery, the method for obtaining the data to be recovered is determined to be based on the backup dataset and synthetic data volume corresponding to the backup point; When the data recovery method is business type data recovery, if the source machine environment is a single machine environment, the method for obtaining the data to be recovered is determined to be based on the backup dataset and synthetic data volume corresponding to the backup point. If the source machine environment is a cluster environment, then the method for obtaining the data to be recovered is determined to be based on the created virtual machine.
2. The data processing method as described in claim 1, characterized in that, The step of determining the data to be restored based on the acquisition method and the backup dataset corresponding to the backup point, and transmitting the data to be restored to the target machine via the push method, includes: When the acquisition method is based on the backup dataset corresponding to the backup point, the data to be recovered is selected from the backup dataset and the data to be recovered is transmitted to the target machine through the push method; When the acquisition method is based on the created virtual machine, determine whether there is a shared disk based on the backup point, and determine the number of virtual machines based on the judgment result; The disk information is determined based on the backup point, and virtual machines are created based on the disk information and the number of virtual machines. During the virtual machine's operation, the data to be recovered is obtained from the virtual machine through the business interface, and the data to be recovered is transmitted to the target machine through the push method.
3. The data processing method as described in claim 2, characterized in that, The step of determining disk information based on the backup point and creating virtual machines based on the disk information and the number of virtual machines includes: The disk information is determined based on the backup point, and the initial program installation path is determined based on the business process information during data backup. The initial program installation path is renamed to obtain the target program installation path; A virtual machine is created based on the disk information, the number of virtual machines, and the installation path of the target program.
4. The data processing method as described in claim 2, characterized in that, The step of transmitting the data to be recovered to the target machine via the push method includes: When the push method is a whole-machine push, the data to be recovered is written to the target machine's disk; When the push method is file push, the data to be recovered is copied to the target machine's file system; When the push method is business type data push, if the target machine environment is a single machine environment, the data to be recovered is written to the target machine's disk; If the target machine environment is a cluster environment, the business type interface is called to write the data to be recovered to the target machine's disk.
5. The data processing method according to any one of claims 1 to 4, characterized in that, Before determining the data to be restored based on the acquisition method and the backup dataset corresponding to the backup point, the method further includes: When the source machine environment is a single-machine environment, backup points are generated based on the backup data generated from a full machine backup of the source machine. When the source machine environment is a cluster environment, the initial disk data corresponding to each disk in the source machine is selected from the backup data, and the disk type corresponding to each disk in the source machine is determined. The disk type includes: independent disk, shared disk, and distributed disk. Select the independent disk data corresponding to each independent disk from the initial disk data, and generate each backup point based on the independent disk data; Select all shared disk data corresponding to each shared disk from the initial disk data, and generate a backup point based on any shared disk data in each of the shared disk data; Select the distributed disk data corresponding to each of the distributed disks from the initial disk data, and generate each backup point based on the distributed disk data.
6. A data processing device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data processing method as described in any one of claims 1 to 5.
7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the data processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Online backup method and system for virtual machine
CN105224391A
