WO2017211099A1 - Data backup method and apparatus - Google Patents

Data backup method and apparatus Download PDF

Info

Publication number
WO2017211099A1
WO2017211099A1 PCT/CN2017/075489 CN2017075489W WO2017211099A1 WO 2017211099 A1 WO2017211099 A1 WO 2017211099A1 CN 2017075489 W CN2017075489 W CN 2017075489W WO 2017211099 A1 WO2017211099 A1 WO 2017211099A1
Authority
WO
WIPO (PCT)
Prior art keywords
backup
storage device
application
data
disk
Prior art date
Application number
PCT/CN2017/075489
Other languages
French (fr)
Chinese (zh)
Inventor
伏高顶
杨文珺
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017211099A1 publication Critical patent/WO2017211099A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Definitions

  • the present invention relates to the field of computers, and in particular, to a data backup method and apparatus.
  • IT systems in enterprise data centers may cause unplanned downtime due to natural disasters such as fires, floods, earthquakes, etc., resulting in business interruptions, or business interruptions due to human factors such as misuse, software errors, and virus intrusions. Once the business is interrupted, it will cause unpredictable losses to the enterprise. As a result, more and more companies are realizing the need to build their own disaster recovery sites to prevent unknown disasters.
  • the application data consistency refers to the application having The caching mechanism, so the data stored in the storage device is not the complete data for the application, and the data backup needs to ensure that the cached data for the application and the data on the storage device are backed up. Otherwise, in the event of a disaster, although the data has been backed up to the disaster recovery site, the backup data does not guarantee the consistency of the application data, which is very difficult or even unrecoverable for service recovery.
  • the database has a caching mechanism inside, part of the data in the database is written to the disk, and some of it is stored in its own cache space.
  • the database cache space after the system is out of plan.
  • the saved data will be lost, and only the data in the disk can be recovered. This will result in inconsistent data before the system is shut down and after the system is restarted, which may make the database service recovery difficult and even cause the database to fail to restart.
  • all the data in the database must be backed up to the disaster recovery site.
  • the data written to the disk and the data stored in the cache space are backed up to the disaster recovery site to ensure the consistency of the application data.
  • the self-built disaster recovery system needs to freeze the application IO before the data is backed up, and flush the dirty data cached in the application to the storage device to ensure the consistency of the application data and enable the service to be restored.
  • the technical principles of application data consistency backup for different applications are basically similar. As shown in Figure 1, the application that needs to perform data backup is a database, and the backup device that performs data backup is a storage array. The application data is described below with reference to Figure 1. Typical process of backup:
  • S101 The management server sends a startup data backup protection command to the host agent.
  • S102 The host agent notifies the database to submit the cached dirty data to the corresponding storage device and freezes the database IO.
  • Freezing the database IO means stopping the write operation to the database.
  • S103 The management server sends a startup data backup command to the storage array to perform data backup on each storage device that stores the database data.
  • the data can be backed up by remote replication, snapshot, clone, etc. of the storage array.
  • the storage array uses the backup mode for data backup, the state of the database needs to be judged, and it is determined that the dirty data has been submitted to the corresponding data.
  • the storage device freezes the database IO, the data backup for each storage device that holds the database data is started.
  • S105 The host agent notifies the database to restore the database IO.
  • Restoring the database IO restores the write operation to the database.
  • the above steps can ensure that the data backed up to the disaster recovery site meets the requirements of application data consistency, and the service can be restored when the data is used for service recovery.
  • the purpose of the embodiments of the present invention is to provide a data backup method and device, which solves the problem of high complexity when the backup device performs data backup for each application in the system.
  • a data backup method including:
  • the disk IO corresponding to each storage device is restored.
  • the backup device does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application, and only needs to connect to the host agent through the standard southbound interface, thereby reducing the backup complexity. , improve backup efficiency.
  • the application that needs to perform data backup is determined, including:
  • the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or to notify the application to process the transaction being executed.
  • the disk IO corresponding to each of the at least one storage device is frozen, include:
  • the received IO command for each storage device is discarded.
  • the embodiments of the present invention propose various ways of freezing the disk IO, which increases the flexibility of freezing the disk IO.
  • the method further includes:
  • the method further includes:
  • the data backup timer is cleared.
  • the data backup timer can freeze the disk IO for too long, which affects the system operation.
  • the method further includes:
  • the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or,
  • the method further includes:
  • the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
  • a data backup device includes:
  • a backup control module for determining an application that needs to perform data backup
  • An application driver module configured to determine at least one storage device that stores data of the application
  • a disk drive module configured to freeze a disk IO corresponding to each of the at least one storage device
  • a backup driver module configured to notify the backup device to perform a data backup for the storage device for each of the at least one storage device
  • the disk drive module is further configured to restore the disk IO corresponding to each storage device after determining that the backup device completes the data backup for the application.
  • the backup control module when determining an application that needs to perform data backup, is specifically configured to:
  • the backup control module is further configured to:
  • the application driving module is further used to
  • the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application to process the transaction being executed.
  • the disk drive module when the disk IO corresponding to each of the at least one storage device is frozen, the disk drive module is specifically configured to:
  • the received IO command for each storage device is discarded.
  • the disk drive module is further configured to:
  • the disk drive module is further configured to:
  • the data backup timer is cleared.
  • the disk drive module is further configured to:
  • the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device;
  • the backup control module is further configured to:
  • a backup end notification message is sent to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
  • an embodiment of the present invention provides a data backup device, including:
  • a memory for storing instructions
  • a processor coupled to the memory and the transceiver, for executing the instructions to perform the following steps when executing the instructions:
  • the disk IO corresponding to each storage device is restored.
  • the embodiment of the present invention provides a data backup method, the method includes: determining an application that needs to perform data backup, and storing at least one storage device of the application data; and freezing the disk IO corresponding to each storage device in the at least one storage device, To ensure that the application data is consistent; the backup device is configured to perform data backup for the application for each storage device in the at least one storage device, and the backup device does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application at this time, and only needs to pass
  • the standard southbound interface is connected to the host agent; after determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored. Therefore, the backup complexity is reduced and the backup efficiency is improved.
  • FIG. 3 is a schematic structural diagram of a Host agent according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a data backup apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a data backup device according to an embodiment of the present invention.
  • an embodiment of the present invention provides a data backup method, including:
  • the Host agent determines an application that needs to perform data backup, and at least one storage device that stores data of the application.
  • the Host agent freezes the disk IO corresponding to each storage device in at least one storage device.
  • S220 The host agent notifies the backup device to perform data backup for the application for each of the at least one storage device.
  • the backup device here can be a storage array or a backup server.
  • the Host agent receives an application registration message sent by a third-party system, and the application registration message is used to indicate an application that needs to perform data backup.
  • the application registration message contains the database instance name and password.
  • the third party system here can be the management server in FIG.
  • the Host agent After the Host agent determines the application that needs to perform data backup, it begins to perform environment preparation for the application, that is, further determines at least one storage device that stores data of the application. For example, a database application has multiple types of data, and various types of data are stored in different storage devices.
  • the Host agent receives the third party before freezing the disk IO corresponding to each storage device in the at least one storage device.
  • a startup data backup message sent by the system the message is used to trigger the host agent to send an instruction to the storage device to perform data backup for the application.
  • the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application that the processing is being executed. Business.
  • the content of the backup pre-processing is different. Some applications only need to store the cached dirty data to the corresponding storage device. Some applications need to process the transaction being executed, including ending the currently executing transaction or waiting for the current The executed transaction is completed, etc.
  • the backup pre-processing here is triggered by the Host agent, and the backup device does not need to care about the backup pre-processing content of each application.
  • the host agent freezes the disk IO corresponding to each storage device in the at least one storage device, but is not limited to the following two methods:
  • the first way the host agent caches the received IO command for each storage device to the IO queue of the corresponding storage device.
  • the host agent After recovering the disk IO corresponding to each storage device in the above manner, the host agent sequentially takes out the IO commands cached in the IO queue of each storage device and submits them to the corresponding storage device.
  • the second way The host agent discards the received IO commands for each storage device.
  • the backup device when the backup device receives the data backup instruction for the application, the backup device backs up the data for the application to the disaster recovery site.
  • the backup device when the backup device is a storage array, the storage array can back up the data by remote copying tasks, or by creating snapshots, or by launching clones, or by specific backup software.
  • the Host agent After performing S220, that is, after notifying the backup device to perform data backup for the application for each of the at least one storage device, the Host agent starts a data backup timer.
  • the data backup timer is cleared.
  • the host agent determines that there is a storage device that does not complete the data backup for the application in at least one storage device, and then restores the disk IO corresponding to each storage device, so as to prevent the disk IO from being frozen for a long time to run on the system. Have an impact.
  • the Host agent after executing S230, notifies the application to perform backup post processing, and the backup post processing corresponds to the backup preprocessing.
  • the content of backup post-processing is different for different applications. For example, if the backup pre-processing performed by the application is to store the cached dirty data to the corresponding storage device, the backup post-processing is not required. If the backup pre-processing performed by the application is to block the commit transaction, the backup post-processing performed by the application is the resume transaction commit.
  • the host agent after recovering the disk IO corresponding to each storage device, the host agent sends a backup end notification message to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
  • the host agent is divided into four modules in FIG. 3, and the backup control module (BackupController) interfaces with a third-party system through a standard northbound interface, and is used for communication with a third-party system, and the application driver module is used.
  • the backup driver module (BackupDriver) for determining at least one storage device storing data of the application, and notifying each application to perform backup pre-processing (for example, notifying that OracleDriver and DB2Driver respectively perform backup pre-processing as shown in FIG. 4), disk drive module (DiskDriver) ) Used to freeze disk IO and recover disk IO.
  • the backup driver module (BackupDriver) is used to interface with the backup device through the standard southbound interface.
  • Figure 4 shows the specific process of data backup for Oracle and DB2, including:
  • S401 The third-party system sends an application registration message to the Host agent, where the password includes the application name of Oracle and Oracle and the passwords of the application names DB2 and DB2.
  • the third-party system registers the application message that needs to be backed up by the standard to the BackupController through the standard northbound interface.
  • the Host agent receives the application registration message, and determines, according to the application registration message, that the application that needs to perform data backup is Oracle and DB2.
  • the host agent prepares an application environment for the Oracle and the DB2, and determines at least one storage device corresponding to the Oracle and at least one storage device corresponding to the DB2.
  • the host agent obtains at least one storage device corresponding to Oracle from the Oracle according to the application registration message.
  • S404 The third-party system sends a startup data backup message to the host agent.
  • S405 The Host agent receives the startup data backup message, and notifies Oracle and DB2 to perform backup pre-processing.
  • Oracle needs to set the database to hot standby mode.
  • the host agent freezes the disk IO corresponding to each storage device in the at least one storage device corresponding to the Oracle device, and the disk IO corresponding to each storage device in the at least one storage device corresponding to the DB2.
  • DiskDriver DiskDriver
  • the host agent notifies the backup device to perform data backup for Oracle corresponding to at least one storage device corresponding to the Oracle, and notifies the backup device to perform data backup for the DB2 by using at least one storage device corresponding to the DB2.
  • BackupDriver notifies the backup device to perform data backup through the standard southbound interface, and does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application.
  • the backup device here is a storage array or a backup server.
  • the backup server performs data backup for Oracle for at least one storage device corresponding to Oracle, and performs data backup for DB2 for at least one storage device corresponding to DB2.
  • the host agent determines, when the data backup for Oracle is completed, restores the disk IO corresponding to each storage device in the at least one storage device corresponding to the Oracle, and determines that at least one storage device corresponding to the Oracle is restored when the data backup for the DB2 is completed. Disk IO corresponding to each storage device.
  • S411 The Host agent notifies the Oracle and DB2 data backups to complete.
  • S412 Oracle and DB2 perform backup post processing separately.
  • S413 The Host agent sends a backup end notification message to the third-party system to notify the third-party system that the data backup for Oracle and DB2 is successful.
  • the embodiment of the present invention further provides a data backup device, which includes the host agent in the embodiment shown in FIG. 2, which can be used to execute the method embodiment corresponding to FIG. 2, and thus the present invention is implemented.
  • a data backup device which includes the host agent in the embodiment shown in FIG. 2, which can be used to execute the method embodiment corresponding to FIG. 2, and thus the present invention is implemented.
  • the data backup device provided in the example, refer to the implementation manner of the method, and the repeated description is not repeated.
  • an embodiment of the present invention provides a data backup device 50, including:
  • the backup control module 51 is configured to determine an application that needs to perform data backup
  • An application driver module 52 configured to determine at least one storage device that stores data of the application
  • the disk drive module 53 is configured to freeze the disk IO corresponding to each of the at least one storage device
  • the backup driver module 54 is configured to notify the backup device to perform data backup for the storage device for each of the at least one storage device;
  • the disk drive module 53 is further configured to restore the disk IO corresponding to each storage device after determining that the backup device completes the data backup for the application.
  • the backup control module 51 when determining an application that needs to perform data backup, is specifically configured to:
  • the backup control module 51 is further configured to:
  • the application driving module 52 is further used to
  • the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application to process the transaction being executed.
  • the disk drive module 53 when the disk IO corresponding to each of the at least one storage device is frozen, the disk drive module 53 is specifically configured to:
  • the received IO command for each storage device is discarded.
  • the disk drive module 53 is further configured to:
  • the disk drive module 53 is further configured to:
  • the data backup timer is cleared.
  • the disk drive module 53 is further configured to:
  • the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device;
  • the backup control module 51 is further configured to:
  • a backup end notification message is sent to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
  • the data backup device is also provided in the embodiment of the present invention, and the device can be used to perform the method embodiment corresponding to the foregoing FIG. 2, and therefore, the implementation manner of the data backup device provided by the embodiment of the present invention can be referred to The implementation of the method, the repetition will not be repeated.
  • an embodiment of the present invention provides a data backup device, including:
  • a memory 62 for storing instructions
  • the processor 63 is respectively connected to the memory 62 and the transceiver 61 for executing the instructions to perform the following steps when executing the instructions:
  • the disk IO corresponding to each storage device is restored.
  • connection manner between the parts shown in FIG. 6 is only one possible example. It may also be that the transceiver 61 and the memory 63 are both connected to the processor 62, and between the transceiver 61 and the memory 63. There is no connection, or it can be other possible connections.
  • the host agent ensures the application data consistency by freezing the disk IO mode, and the backup device only needs to connect to the host agent through the standard southbound interface. Pay attention to the specific backup pre-processing and backup post-processing of the upper application, which reduces the backup complexity and improves the backup efficiency.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Mining & Analysis (AREA)

Abstract

Disclosed are a data backup method and apparatus. The method comprises: determining an application requiring data backup, and determining at least one storage device storing data of the application (S200); freezing disk IO corresponding to each of the at least one storage devices (S210); for each of the at least one storage devices, instructing a backup device to perform data backup for the application (S220); and after determining that the backup device has completed data backup for the application, restoring disk IO corresponding to each storage device (S230). In the present invention a host agent ensures consistency of application data by freezing disk IO. The backup device only needs to interface with the host agent via a standard southbound interface, and does not need to carry out specific backup pre-processing and backup post-processing actions for an upper-layer application, thus reducing the complexity and improving efficiency of data backup.

Description

一种数据备份方法及装置Data backup method and device 技术领域Technical field
本发明涉及计算机领域,尤其涉及一种数据备份方法及装置。The present invention relates to the field of computers, and in particular, to a data backup method and apparatus.
背景技术Background technique
企业数据中心中的IT系统可能会因火灾、洪水、地震等自然灾害导致计划外停机,造成业务中断,也可能因人为因素,如误操作、软件错误、病毒入侵等导致业务中断。业务一旦中断,将会给企业造成难以预估的损失。因此,越来越多的企业意识到需要自建容灾站点以防止未知的灾害。IT systems in enterprise data centers may cause unplanned downtime due to natural disasters such as fires, floods, earthquakes, etc., resulting in business interruptions, or business interruptions due to human factors such as misuse, software errors, and virus intrusions. Once the business is interrupted, it will cause unpredictable losses to the enterprise. As a result, more and more companies are realizing the need to build their own disaster recovery sites to prevent unknown disasters.
在将系统中各个应用的应用数据备份至容灾站点时,为确保灾难发生时业务可以正确恢复,需要在进行数据备份时保证应用数据的一致性,这里的应用数据一致性是指由于应用具有缓存机制,因此存储设备中存储的数据不是针对该应用的完整数据,在数据备份时需要确保将针对该应用的缓存数据和存储设备上的数据均进行备份。否则,在灾难发生时,可能出现虽然数据已经备份至容灾站点,但由于备份的数据没有保证应用数据的一致性,给业务恢复带来非常大的难度,甚至不可恢复。When the application data of each application in the system is backed up to the disaster recovery site, in order to ensure that the service can be correctly restored when the disaster occurs, it is necessary to ensure the consistency of the application data during data backup. The application data consistency here refers to the application having The caching mechanism, so the data stored in the storage device is not the complete data for the application, and the data backup needs to ensure that the cached data for the application and the data on the storage device are backed up. Otherwise, in the event of a disaster, although the data has been backed up to the disaster recovery site, the backup data does not guarantee the consistency of the application data, which is very difficult or even unrecoverable for service recovery.
例如,由于数据库内部具有缓存机制,数据库中的数据一部分写入磁盘当中,还有一部分保存在自身的缓存空间中,当系统不具备容灾站点时,在系统计划外停机后,数据库的缓存空间中保存的数据将会丢失,只有磁盘中的数据能够恢复,这就产生了系统停机前和系统重启后数据不一致的情形,可能使数据库业务恢复困难,甚至造成数据库重启失败。在系统具备容灾站点时,需将数据库中的全部数据备份至容灾站点,即将写入磁盘的数据和保存在缓存空间中的数据均备份至容灾站点,以保证应用数据的一致性。For example, because the database has a caching mechanism inside, part of the data in the database is written to the disk, and some of it is stored in its own cache space. When the system does not have a disaster recovery site, the database cache space after the system is out of plan. The saved data will be lost, and only the data in the disk can be recovered. This will result in inconsistent data before the system is shut down and after the system is restarted, which may make the database service recovery difficult and even cause the database to fail to restart. When the system has a disaster recovery site, all the data in the database must be backed up to the disaster recovery site. The data written to the disk and the data stored in the cache space are backed up to the disaster recovery site to ensure the consistency of the application data.
因此,自建的容灾系统需要在备份数据前需冻结应用IO,并刷应用中缓存的脏数据至存储设备中,以确保应用数据的一致性,使业务能够被恢复。当前业界针对不同的应用进行应用数据一致性备份的技术原理基本类似,如图1所示,需要进行数据备份的应用是数据库,执行数据备份的备份设备为存储阵列,下面结合图1说明应用数据备份的典型过程:Therefore, the self-built disaster recovery system needs to freeze the application IO before the data is backed up, and flush the dirty data cached in the application to the storage device to ensure the consistency of the application data and enable the service to be restored. The technical principles of application data consistency backup for different applications are basically similar. As shown in Figure 1, the application that needs to perform data backup is a database, and the backup device that performs data backup is a storage array. The application data is described below with reference to Figure 1. Typical process of backup:
S101:管理服务器向主机代理(Host Agent)发送启动数据备份保护命令。S101: The management server sends a startup data backup protection command to the host agent.
S102:Host Agent通知数据库提交缓存脏数据至相应的存储设备并且冻结数据库IO。S102: The host agent notifies the database to submit the cached dirty data to the corresponding storage device and freezes the database IO.
冻结数据库IO是指停止对数据库的写入操作。Freezing the database IO means stopping the write operation to the database.
S103:管理服务器向存储阵列发送启动数据备份命令,以使其对保存数据库数据的各个存储设备进行数据备份。S103: The management server sends a startup data backup command to the storage array to perform data backup on each storage device that stores the database data.
例如,这里可以结合存储阵列的远程复制、快照、克隆等对数据进行备份,在存储阵列使用各自备份方式进行数据备份时,需要对数据库的状态进行判断,确定其已经完成将脏数据提交至相应的存储设备且冻结数据库IO时,再开始执行针对保存数据库数据的各个存储设备的数据备份。For example, the data can be backed up by remote replication, snapshot, clone, etc. of the storage array. When the storage array uses the backup mode for data backup, the state of the database needs to be judged, and it is determined that the dirty data has been submitted to the corresponding data. When the storage device freezes the database IO, the data backup for each storage device that holds the database data is started.
S104:管理服务器在确定针对数据库的应用数据备份结束后,向Host Agent发送结束备份保护命令。S104: After determining that the application data backup for the database ends, the management server sends an end backup protection command to the host agent.
S105:Host Agent通知数据库恢复数据库IO。 S105: The host agent notifies the database to restore the database IO.
恢复数据库IO即恢复对数据库的写入操作。Restoring the database IO restores the write operation to the database.
因此,通过上述步骤可以确保备份至容灾站点中的数据满足应用数据一致性的要求,用该份数据进行业务恢复时可以确保业务能够被恢复。Therefore, the above steps can ensure that the data backed up to the disaster recovery site meets the requirements of application data consistency, and the service can be restored when the data is used for service recovery.
但是,由于部署在Linux业务主机上的应用具有多样性的特点,如数据库Oracle、DB2、Sybase、MySQL,大型应用SAP、文件系统EXT3、EXT4、JFS、VXFS、HFS等,因此,需要确保针对每种应用进行应用数据一致性的备份处理,但是对于不同的应用确保其应用数据一致性的方法不同,比如,Oracle确保应用数据一致性的方式为:置数据库为热备模式;SQL Server确保应用数据一致性的方式为:刷数据库缓存、VSS冻结磁盘写IO;DB2确保应用数据一致性的方式为冻结数据库写IO、刷数据库缓存;文件系统确保应用数据一致性的方式为:冻结文件系统写IO,刷文件系统缓存。However, due to the diversity of applications deployed on Linux service hosts, such as database Oracle, DB2, Sybase, MySQL, large-scale application SAP, file system EXT3, EXT4, JFS, VXFS, HFS, etc., therefore, it is necessary to ensure that for each Applications perform application data consistency backup processing, but different methods for ensuring application data consistency are different. For example, Oracle ensures application data consistency by setting the database to hot standby mode; SQL Server ensures application data. The way to be consistent is: brush database cache, VSS freeze disk write IO; DB2 ensures application data consistency is to freeze database write IO, brush database cache; file system to ensure application data consistency is: freeze file system write IO , brush the file system cache.
因此,现有技术中,在备份设备执行对应用的数据备份时,需要考虑每一种应用自身的备份特点,甚至一个应用的不同的版本分别对应的备份特点,导致对系统中的各个应用进行数据备份时复杂度较高。Therefore, in the prior art, when the backup device performs data backup of the application, it is necessary to consider the backup features of each application itself, and even the backup features corresponding to different versions of one application respectively, resulting in performing various applications in the system. Data backup is more complicated.
发明内容Summary of the invention
本发明实施例的目的是提供一种数据备份方法及装置,以解决备份设备对系统中的各个应用进行数据备份时复杂度较高的问题。The purpose of the embodiments of the present invention is to provide a data backup method and device, which solves the problem of high complexity when the backup device performs data backup for each application in the system.
本发明实施例的目的是通过以下技术方案实现的:The purpose of the embodiment of the present invention is achieved by the following technical solutions:
一种数据备份方法,包括:A data backup method, including:
确定需要进行数据备份的应用,以及存储所述应用的数据的至少一个存储设备;Determining an application requiring data backup, and at least one storage device storing data of the application;
冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;Freeing the disk IO corresponding to each of the at least one storage device;
通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;Notifying the backup device to perform a data backup for the storage device for each of the at least one storage device;
在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。After determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored.
因此,通过冻结磁盘IO,以确保应用数据一致性,备份设备无需关心上层应用的具体备份前置处理与备份后置处理,只需通过标准南向接口与对Host Agent对接,降低了备份复杂度,提高了备份效率。Therefore, by freezing the disk IO to ensure application data consistency, the backup device does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application, and only needs to connect to the host agent through the standard southbound interface, thereby reducing the backup complexity. , improve backup efficiency.
在一种可能的实现方式中,确定需要进行数据备份的应用,包括:In a possible implementation, the application that needs to perform data backup is determined, including:
接收第三方系统发送的应用注册消息,所述应用注册消息用于指示本次需要进行数据备份的应用。Receiving an application registration message sent by a third-party system, where the application registration message is used to indicate an application that needs to perform data backup.
在一种可能的实现方式中,在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,还包括;In a possible implementation, after determining at least one storage device storing data of the application, before freezing the disk IO corresponding to each of the at least one storage device, further comprising:
接收第三方系统发送的启动数据备份消息。Receive a startup data backup message sent by a third-party system.
在一种可能的实现方式中,在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,还包括;In a possible implementation, after determining at least one storage device storing data of the application, before freezing the disk IO corresponding to each of the at least one storage device, further comprising:
通知所述应用执行备份前置处理,所述备份前置处理为通知所述应用将缓存的脏数据存储至对应的存储设备和/或通知所述应用处理正在执行的事务。Notifying the application to perform backup pre-processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or to notify the application to process the transaction being executed.
在一种可能的实现方式中,冻结所述至少一个存储设备中每个存储设备对应的磁盘IO, 包括:In a possible implementation, the disk IO corresponding to each of the at least one storage device is frozen, include:
将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中;或者Cache the received IO command for each storage device to the IO queue of the corresponding storage device; or
将接收到的针对每个存储设备的IO命令丢弃。The received IO command for each storage device is discarded.
因此,本发明实施例提出了冻结磁盘IO的多种方式,增加了冻结磁盘IO的灵活性。Therefore, the embodiments of the present invention propose various ways of freezing the disk IO, which increases the flexibility of freezing the disk IO.
在一种可能的实现方式中,在通知备份设备对所述至少一个存储设备中每个存储设备执行针对所述应用的数据备份之后,还包括:In a possible implementation, after the backup device is notified to perform data backup for the application for each of the at least one storage device, the method further includes:
启动数据备份定时器;Start the data backup timer;
在确定所述备份设备完成针对所述应用的数据备份之后,还包括:After determining that the backup device completes the data backup for the application, the method further includes:
确定所述数据备份定时器未超时时,将所述数据备份定时器清零。When it is determined that the data backup timer has not timed out, the data backup timer is cleared.
因此,通过数据备份定时器可以磁盘IO冻结时间过久,对系统运行造成影响。Therefore, the data backup timer can freeze the disk IO for too long, which affects the system operation.
在一种可能的实现方式中,在恢复每个存储设备对应的磁盘IO之后,还包括:In a possible implementation, after recovering the disk IO corresponding to each storage device, the method further includes:
将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备;或者,The IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or,
停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。Stop dropping IO commands for each storage device and restore the initial settings for the corresponding storage device.
因此,在恢复磁盘IO时,需要根据不同的冻结磁盘IO方式进行恢复。Therefore, when recovering disk IO, it is necessary to recover according to different frozen disk IO modes.
在一种可能的实现方式中,在恢复每个存储设备对应的磁盘IO之后,还包括:In a possible implementation, after recovering the disk IO corresponding to each storage device, the method further includes:
发送备份结束通知消息至所述第三方系统,所述备份结束通知消息用于通知所述第三方系统针对所述应用的数据备份是否成功。Sending a backup end notification message to the third-party system, the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
第二方面,一种数据备份装置,包括:In a second aspect, a data backup device includes:
备份控制模块,用于确定需要进行数据备份的应用;a backup control module for determining an application that needs to perform data backup;
应用驱动模块,用于确定存储所述应用的数据的至少一个存储设备;An application driver module, configured to determine at least one storage device that stores data of the application;
磁盘驱动模块,用于冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;a disk drive module, configured to freeze a disk IO corresponding to each of the at least one storage device;
备份驱动模块,用于通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;a backup driver module, configured to notify the backup device to perform a data backup for the storage device for each of the at least one storage device;
所述磁盘驱动模块,还用于在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。The disk drive module is further configured to restore the disk IO corresponding to each storage device after determining that the backup device completes the data backup for the application.
在一种可能的实现方式中,确定需要进行数据备份的应用时,所述备份控制模块,具体用于:In a possible implementation, when determining an application that needs to perform data backup, the backup control module is specifically configured to:
接收第三方系统发送的应用注册消息,所述应用注册消息用于指示本次需要进行数据备份的应用。Receiving an application registration message sent by a third-party system, where the application registration message is used to indicate an application that needs to perform data backup.
在一种可能的实现方式中,所述备份控制模块,还用于:In a possible implementation manner, the backup control module is further configured to:
在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,接收第三方系统发送的启动数据备份消息。After determining the at least one storage device storing the data of the application, receiving a startup data backup message sent by the third-party system before freezing the disk IO corresponding to each of the at least one storage device.
在一种可能的实现方式中,所述应用驱动模块,还用于In a possible implementation manner, the application driving module is further used to
在所述分析单元确定存储所述应用的数据的至少一个存储设备之后,在所述冻结单元冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,通知所述应用执行备份前置处理,所述备份前置处理为通知所述应用将缓存的脏数据存储至对应的存储设备和/或通知所述应用处理正在执行的事务。After the analyzing unit determines the at least one storage device storing the data of the application, before the freezing unit freezes the disk IO corresponding to each of the at least one storage device, notifying the application to perform a backup front Processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application to process the transaction being executed.
在一种可能的实现方式中,冻结所述至少一个存储设备中每个存储设备对应的磁盘IO时,所述磁盘驱动模块,具体用于: In a possible implementation, when the disk IO corresponding to each of the at least one storage device is frozen, the disk drive module is specifically configured to:
将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中;或者Cache the received IO command for each storage device to the IO queue of the corresponding storage device; or
将接收到的针对每个存储设备的IO命令丢弃。The received IO command for each storage device is discarded.
在一种可能的实现方式中,所述磁盘驱动模块,还用于:In a possible implementation, the disk drive module is further configured to:
在通知备份设备对所述至少一个存储设备中每个存储设备执行针对所述应用的数据备份之后,启动数据备份定时器;After the backup device is notified to perform data backup for the application for each of the at least one storage device, start a data backup timer;
所述磁盘驱动模块,还用于:The disk drive module is further configured to:
在确定所述备份设备完成针对所述应用的数据备份之后,确定所述数据备份定时器未超时时,将所述数据备份定时器清零。After determining that the backup device completes the data backup for the application, determining that the data backup timer has not timed out, the data backup timer is cleared.
在一种可能的实现方式中,所述磁盘驱动模块,还用于:In a possible implementation, the disk drive module is further configured to:
在恢复每个存储设备对应的磁盘IO之后,将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备;或者,After recovering the disk IO corresponding to each storage device, the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or
在恢复每个存储设备对应的磁盘IO之后,停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。After restoring the disk IO corresponding to each storage device, stop dropping the IO command for each storage device and restore the initial settings for the corresponding storage device.
在一种可能的实现方式中,所述备份控制模块,还用于:In a possible implementation manner, the backup control module is further configured to:
在恢复每个存储设备对应的磁盘IO之后,发送备份结束通知消息至所述第三方系统,所述备份结束通知消息用于通知所述第三方系统针对所述应用的数据备份是否成功。After the disk IO corresponding to each storage device is restored, a backup end notification message is sent to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
第三方面,本发明实施例提供一种数据备份设备,包括:In a third aspect, an embodiment of the present invention provides a data backup device, including:
收发器;transceiver;
存储器,用于存储指令;和a memory for storing instructions; and
处理器,与所述存储器和所述收发器分别相连,用于执行所述指令,以在执行所述指令时执行如下步骤:a processor, coupled to the memory and the transceiver, for executing the instructions to perform the following steps when executing the instructions:
确定需要进行数据备份的应用,以及存储所述应用的数据的至少一个存储设备;Determining an application requiring data backup, and at least one storage device storing data of the application;
冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;Freeing the disk IO corresponding to each of the at least one storage device;
通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;Notifying the backup device to perform a data backup for the storage device for each of the at least one storage device;
在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。After determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored.
本发明实施例提供了一种数据备份方法,该方法包括:确定需要进行数据备份的应用,以及存储应用的数据的至少一个存储设备;冻结至少一个存储设备中每个存储设备对应的磁盘IO,以确保应用数据一致性;通知备份设备对至少一个存储设备中每个存储设备执行针对应用的数据备份,备份设备此时无需关心上层应用的具体备份前置处理与备份后置处理,只需通过标准南向接口与对Host Agent对接;在确定所述备份设备完成针对应用的数据备份后,恢复每个存储设备对应的磁盘IO。因此,降低了备份复杂度,提高了备份效率。The embodiment of the present invention provides a data backup method, the method includes: determining an application that needs to perform data backup, and storing at least one storage device of the application data; and freezing the disk IO corresponding to each storage device in the at least one storage device, To ensure that the application data is consistent; the backup device is configured to perform data backup for the application for each storage device in the at least one storage device, and the backup device does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application at this time, and only needs to pass The standard southbound interface is connected to the host agent; after determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored. Therefore, the backup complexity is reduced and the backup efficiency is improved.
附图说明DRAWINGS
图1为本发明背景技术中应用数据备份的典型过程;1 is a typical process of applying data backup in the background art of the present invention;
图2为本发明实施例中数据备份的概述流程图;2 is a flowchart of an overview of data backup in an embodiment of the present invention;
图3为本发明实施例中Host agent的结构示意图;3 is a schematic structural diagram of a Host agent according to an embodiment of the present invention;
图4为本发明实施例中针对应用Oracle和DB2的数据备份具体过程; 4 is a specific process of data backup for applying Oracle and DB2 according to an embodiment of the present invention;
图5为本发明实施例中一种数据备份装置的结构示意图;FIG. 5 is a schematic structural diagram of a data backup apparatus according to an embodiment of the present invention; FIG.
图6为本发明实施例中一种数据备份设备的结构示意图。FIG. 6 is a schematic structural diagram of a data backup device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,并不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参阅图2所示,本发明实施例提供一种数据备份方法,包括:Referring to FIG. 2, an embodiment of the present invention provides a data backup method, including:
S200:Host agent确定需要进行数据备份的应用,以及存储应用的数据的至少一个存储设备。S200: The Host agent determines an application that needs to perform data backup, and at least one storage device that stores data of the application.
S210:Host agent冻结至少一个存储设备中每个存储设备对应的磁盘IO。S210: The Host agent freezes the disk IO corresponding to each storage device in at least one storage device.
S220:Host agent通知备份设备对至少一个存储设备中的每个存储设备执行针对应用的数据备份。S220: The host agent notifies the backup device to perform data backup for the application for each of the at least one storage device.
S230:Host agent在确定备份设备完成针对应用的数据备份后,恢复每个存储设备对应的磁盘IO。S230: After determining that the backup device completes the data backup for the application, the host agent restores the disk IO corresponding to each storage device.
这里的备份设备可以为存储阵列或备份服务器。The backup device here can be a storage array or a backup server.
具体的,针对S200,Host agent接收第三方系统发送的应用注册消息,应用注册消息用于指示本次需要进行数据备份的应用。例如,应用注册消息中包含数据库实例名和密码等。这里的第三方系统可以为图1中的管理服务器。Specifically, for S200, the Host agent receives an application registration message sent by a third-party system, and the application registration message is used to indicate an application that needs to perform data backup. For example, the application registration message contains the database instance name and password. The third party system here can be the management server in FIG.
当Host agent确定需要进行数据备份的应用后,开始执行针对该应用的环境准备,即进一步确定存储应用的数据的至少一个存储设备。例如,一个数据库应用具有多种类型的数据,各种不同类型的数据存储在不同的存储设备中。After the Host agent determines the application that needs to perform data backup, it begins to perform environment preparation for the application, that is, further determines at least one storage device that stores data of the application. For example, a database application has multiple types of data, and various types of data are stored in different storage devices.
可选地,在执行S200之后,在执行S210之前,即在确定存储应用的数据的至少一个存储设备之后,在冻结至少一个存储设备中每个存储设备对应的磁盘IO之前,Host agent接收第三方系统发送的启动数据备份消息,该消息用于触发Host agent向存储设备发送执行针对应用的数据备份的指令。Optionally, after executing S200, before performing S210, that is, after determining at least one storage device storing data of the application, the Host agent receives the third party before freezing the disk IO corresponding to each storage device in the at least one storage device. A startup data backup message sent by the system, the message is used to trigger the host agent to send an instruction to the storage device to perform data backup for the application.
可选地,在执行S200之后,在执行S210之前,Host agent通知应用执行备份前置处理,备份前置处理为通知应用将缓存的脏数据存储至对应的存储设备和/或通知应用处理正在执行的事务。Optionally, after executing S200, before executing S210, the Host agent notifies the application to perform backup pre-processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application that the processing is being executed. Business.
针对不同应用,备份前置处理的内容不同,有的应用只需将缓存的脏数据存储至对应的存储设备,有的应用需要处理正在执行的事务,包括结束当前正在执行的事务或等待当前正在执行的事务完成等。这里的备份前置处理由Host agent触发,备份设备无需关心各个应用的备份前置处理内容。For different applications, the content of the backup pre-processing is different. Some applications only need to store the cached dirty data to the corresponding storage device. Some applications need to process the transaction being executed, including ending the currently executing transaction or waiting for the current The executed transaction is completed, etc. The backup pre-processing here is triggered by the Host agent, and the backup device does not need to care about the backup pre-processing content of each application.
具体的,针对S210,Host agent冻结至少一个存储设备中每个存储设备对应的磁盘IO可以采用但不限于以下两种方式:Specifically, for S210, the host agent freezes the disk IO corresponding to each storage device in the at least one storage device, but is not limited to the following two methods:
第一种方式:Host agent将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中。The first way: the host agent caches the received IO command for each storage device to the IO queue of the corresponding storage device.
采用上述方式在恢复每个存储设备对应的磁盘IO之后,Host agent将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备。 After recovering the disk IO corresponding to each storage device in the above manner, the host agent sequentially takes out the IO commands cached in the IO queue of each storage device and submits them to the corresponding storage device.
第二种方式:Host agent将接收到的针对每个存储设备的IO命令丢弃。The second way: The host agent discards the received IO commands for each storage device.
采用上述方式在恢复每个存储设备对应的磁盘IO之后,停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。After the disk 10 corresponding to each storage device is restored in the above manner, the IO command for each storage device is stopped and the initial setting for the corresponding storage device is restored.
针对S220,在备份设备接收到针对应用的数据备份指令时,备份设备将针对应用的数据备份至容灾站点。例如,当备份设备为存储阵列时,存储阵列可以通过远程复制任务、或创建快照、或启动克隆、或特定的备份软件等方式对数据进行备份。For S220, when the backup device receives the data backup instruction for the application, the backup device backs up the data for the application to the disaster recovery site. For example, when the backup device is a storage array, the storage array can back up the data by remote copying tasks, or by creating snapshots, or by launching clones, or by specific backup software.
进一步地,在执行S220之后,即在通知备份设备对至少一个存储设备中的每个存储设备执行针对应用的数据备份之后,Host agent启动数据备份定时器。Further, after performing S220, that is, after notifying the backup device to perform data backup for the application for each of the at least one storage device, the Host agent starts a data backup timer.
若Host agent确定备份设备完成针对应用的数据备份,且此时数据备份定时器未超时,将数据备份定时器清零。If the host agent determines that the backup device completes the data backup for the application, and the data backup timer has not timed out, the data backup timer is cleared.
若数据备份定时器超时时,Host agent确定至少一个存储设备中存在未完成针对应用的数据备份的存储设备时,则恢复每个存储设备对应的磁盘IO,以免冻结磁盘IO时间过长对系统运行产生影响。If the data backup timer expires, the host agent determines that there is a storage device that does not complete the data backup for the application in at least one storage device, and then restores the disk IO corresponding to each storage device, so as to prevent the disk IO from being frozen for a long time to run on the system. Have an impact.
可选地,在执行S230之后,Host agent通知应用执行备份后置处理,备份后置处理与备份前置处理相对应。与备份前置处理不同,针对不同应用,备份后置处理的内容也不同。例如,若该应用执行的备份前置处理为将缓存的脏数据存储至对应的存储设备,则不需进行备份后置处理。若该应用执行的备份前置处理为阻止提交事务,则应用执行的备份后置处理为恢复事务提交。Optionally, after executing S230, the Host agent notifies the application to perform backup post processing, and the backup post processing corresponds to the backup preprocessing. Unlike backup pre-processing, the content of backup post-processing is different for different applications. For example, if the backup pre-processing performed by the application is to store the cached dirty data to the corresponding storage device, the backup post-processing is not required. If the backup pre-processing performed by the application is to block the commit transaction, the backup post-processing performed by the application is the resume transaction commit.
可选地,在恢复每个存储设备对应的磁盘IO之后,Host agent发送备份结束通知消息至第三方系统,备份结束通知消息用于通知第三方系统针对应用的数据备份是否成功。Optionally, after recovering the disk IO corresponding to each storage device, the host agent sends a backup end notification message to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
参阅图3和图4所示,图3中将Host agent划分为四个模块,分别为备份控制模块(BackupController)通过标准北向接口与第三方系统对接,用于与第三方系统通信,应用驱动模块(AppDriver)用于确定存储应用的数据的至少一个存储设备,以及通知各个应用执行备份前置处理(例如,图4中所示通知OracleDriver和DB2Driver分别执行备份前置处理),磁盘驱动模块(DiskDriver)用于冻结磁盘IO和恢复磁盘IO,备份驱动模块(BackupDriver)用于通过标准南向接口与备份设备对接。图4为针对应用Oracle和DB2的数据备份具体过程,包括:Referring to FIG. 3 and FIG. 4, the host agent is divided into four modules in FIG. 3, and the backup control module (BackupController) interfaces with a third-party system through a standard northbound interface, and is used for communication with a third-party system, and the application driver module is used. (AppDriver) for determining at least one storage device storing data of the application, and notifying each application to perform backup pre-processing (for example, notifying that OracleDriver and DB2Driver respectively perform backup pre-processing as shown in FIG. 4), disk drive module (DiskDriver) ) Used to freeze disk IO and recover disk IO. The backup driver module (BackupDriver) is used to interface with the backup device through the standard southbound interface. Figure 4 shows the specific process of data backup for Oracle and DB2, including:
S401:第三方系统向Host agent发送应用注册消息,该消息中包含应用名称Oracle和Oracle的密码以及应用名称DB2和DB2的密码。S401: The third-party system sends an application registration message to the Host agent, where the password includes the application name of Oracle and Oracle and the passwords of the application names DB2 and DB2.
这里第三方系统通过标准北向接口向BackupController注册需要进行数据备份的应用消息。Here, the third-party system registers the application message that needs to be backed up by the standard to the BackupController through the standard northbound interface.
S402:Host agent接收应用注册消息,并根据应用注册消息确定本次需要进行数据备份的应用为Oracle和DB2。S402: The Host agent receives the application registration message, and determines, according to the application registration message, that the application that needs to perform data backup is Oracle and DB2.
S403:Host agent针对Oracle和DB2进行应用环境准备,确定Oracle对应的至少一个存储设备和DB2对应的至少一个存储设备。S403: The host agent prepares an application environment for the Oracle and the DB2, and determines at least one storage device corresponding to the Oracle and at least one storage device corresponding to the DB2.
例如,Host agent根据应用注册消息向Oracle获取Oracle对应的至少一个存储设备。For example, the host agent obtains at least one storage device corresponding to Oracle from the Oracle according to the application registration message.
S404:第三方系统向Host agent发送启动数据备份消息。S404: The third-party system sends a startup data backup message to the host agent.
S405:Host agent接收启动数据备份消息,分别通知Oracle和DB2进行备份前置处理。S405: The Host agent receives the startup data backup message, and notifies Oracle and DB2 to perform backup pre-processing.
即通过AppDriver通知Oracle和DB2进行备份前置处理。 That is, through AppDriver, Oracle and DB2 are notified to perform backup pre-processing.
S406:Oracle和DB2分别进行备份前置处理。S406: Oracle and DB2 perform backup pre-processing separately.
例如,Oracle需要置数据库为热备模式。For example, Oracle needs to set the database to hot standby mode.
S407:Host agent冻结Oracle对应的至少一个存储设备中每个存储设备对应的磁盘IO,以及DB2对应的至少一个存储设备中每个存储设备对应的磁盘IO。S407: The host agent freezes the disk IO corresponding to each storage device in the at least one storage device corresponding to the Oracle device, and the disk IO corresponding to each storage device in the at least one storage device corresponding to the DB2.
即通过DiskDriver冻结磁盘IO。That is, the disk IO is frozen by DiskDriver.
S408:Host agent通知备份设备将Oracle对应的至少一个存储设备分别执行针对Oracle的数据备份,以及通知备份设备将DB2对应的至少一个存储设备分别执行针对DB2的数据备份。S408: The host agent notifies the backup device to perform data backup for Oracle corresponding to at least one storage device corresponding to the Oracle, and notifies the backup device to perform data backup for the DB2 by using at least one storage device corresponding to the DB2.
即BackupDriver通过标准南向接口通知备份设备执行数据备份,无需关心上层应用的具体备份前置处理与备份后置处理。这里的备份设备为存储阵列或备份服务器。That is, BackupDriver notifies the backup device to perform data backup through the standard southbound interface, and does not need to care about the specific backup pre-processing and backup post-processing of the upper-layer application. The backup device here is a storage array or a backup server.
S409:备份服务器对Oracle对应的至少一个存储设备分别执行针对Oracle的数据备份,以及对DB2对应的至少一个存储设备分别执行针对DB2的数据备份。S409: The backup server performs data backup for Oracle for at least one storage device corresponding to Oracle, and performs data backup for DB2 for at least one storage device corresponding to DB2.
S410:Host agent确定针对Oracle的数据备份完成时,恢复Oracle对应的至少一个存储设备中每个存储设备对应的磁盘IO,以及确定针对DB2的数据备份完成时,恢复Oracle对应的至少一个存储设备中每个存储设备对应的磁盘IO。S410: The host agent determines, when the data backup for Oracle is completed, restores the disk IO corresponding to each storage device in the at least one storage device corresponding to the Oracle, and determines that at least one storage device corresponding to the Oracle is restored when the data backup for the DB2 is completed. Disk IO corresponding to each storage device.
即通过DiskDriver恢复磁盘IO。That is to restore disk IO through DiskDriver.
S411:Host agent分别通知Oracle和DB2数据备份完成。S411: The Host agent notifies the Oracle and DB2 data backups to complete.
S412:Oracle和DB2分别进行备份后置处理。S412: Oracle and DB2 perform backup post processing separately.
S413:Host agent向第三方系统发送备份结束通知消息,通知第三方系统针对Oracle和DB2的数据备份成功。S413: The Host agent sends a backup end notification message to the third-party system to notify the third-party system that the data backup for Oracle and DB2 is successful.
基于同一发明构思,本发明实施例中还提供了一种数据备份装置,该装置包含图2所示实施例中的Host agent,可以用于执行上述图2对应的方法实施例,因此本发明实施例提供的数据备份装置的实施方式可以参见该方法的实施方式,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present invention further provides a data backup device, which includes the host agent in the embodiment shown in FIG. 2, which can be used to execute the method embodiment corresponding to FIG. 2, and thus the present invention is implemented. For the implementation of the data backup device provided in the example, refer to the implementation manner of the method, and the repeated description is not repeated.
参阅图5所示,本发明实施例提供一种数据备份装置50,包括:Referring to FIG. 5, an embodiment of the present invention provides a data backup device 50, including:
备份控制模块51,用于确定需要进行数据备份的应用;The backup control module 51 is configured to determine an application that needs to perform data backup;
应用驱动模块52,用于确定存储所述应用的数据的至少一个存储设备;An application driver module 52, configured to determine at least one storage device that stores data of the application;
磁盘驱动模块53,用于冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;The disk drive module 53 is configured to freeze the disk IO corresponding to each of the at least one storage device;
备份驱动模块54,用于通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;The backup driver module 54 is configured to notify the backup device to perform data backup for the storage device for each of the at least one storage device;
所述磁盘驱动模块53,还用于在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。The disk drive module 53 is further configured to restore the disk IO corresponding to each storage device after determining that the backup device completes the data backup for the application.
在一种可能的实现方式中,确定需要进行数据备份的应用时,所述备份控制模块51,具体用于:In a possible implementation manner, when determining an application that needs to perform data backup, the backup control module 51 is specifically configured to:
接收第三方系统发送的应用注册消息,所述应用注册消息用于指示本次需要进行数据备份的应用。Receiving an application registration message sent by a third-party system, where the application registration message is used to indicate an application that needs to perform data backup.
在一种可能的实现方式中,所述备份控制模块51,还用于:In a possible implementation, the backup control module 51 is further configured to:
在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,接收第三方系统发送的启动数据备份消息。After determining the at least one storage device storing the data of the application, receiving a startup data backup message sent by the third-party system before freezing the disk IO corresponding to each of the at least one storage device.
在一种可能的实现方式中,所述应用驱动模块52,还用于 In a possible implementation manner, the application driving module 52 is further used to
在所述分析单元确定存储所述应用的数据的至少一个存储设备之后,在所述冻结单元冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,通知所述应用执行备份前置处理,所述备份前置处理为通知所述应用将缓存的脏数据存储至对应的存储设备和/或通知所述应用处理正在执行的事务。After the analyzing unit determines the at least one storage device storing the data of the application, before the freezing unit freezes the disk IO corresponding to each of the at least one storage device, notifying the application to perform a backup front Processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application to process the transaction being executed.
在一种可能的实现方式中,冻结所述至少一个存储设备中每个存储设备对应的磁盘IO时,所述磁盘驱动模块53,具体用于:In a possible implementation, when the disk IO corresponding to each of the at least one storage device is frozen, the disk drive module 53 is specifically configured to:
将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中;或者Cache the received IO command for each storage device to the IO queue of the corresponding storage device; or
将接收到的针对每个存储设备的IO命令丢弃。The received IO command for each storage device is discarded.
在一种可能的实现方式中,所述磁盘驱动模块53,还用于:In a possible implementation, the disk drive module 53 is further configured to:
在通知备份设备对所述至少一个存储设备中每个存储设备执行针对所述应用的数据备份之后,启动数据备份定时器;After the backup device is notified to perform data backup for the application for each of the at least one storage device, start a data backup timer;
所述磁盘驱动模块53,还用于:The disk drive module 53 is further configured to:
在确定所述备份设备完成针对所述应用的数据备份之后,确定所述数据备份定时器未超时时,将所述数据备份定时器清零。After determining that the backup device completes the data backup for the application, determining that the data backup timer has not timed out, the data backup timer is cleared.
在一种可能的实现方式中,所述磁盘驱动模块53,还用于:In a possible implementation, the disk drive module 53 is further configured to:
在恢复每个存储设备对应的磁盘IO之后,将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备;或者,After recovering the disk IO corresponding to each storage device, the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or
在恢复每个存储设备对应的磁盘IO之后,停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。After restoring the disk IO corresponding to each storage device, stop dropping the IO command for each storage device and restore the initial settings for the corresponding storage device.
在一种可能的实现方式中,所述备份控制模块51,还用于:In a possible implementation, the backup control module 51 is further configured to:
在恢复每个存储设备对应的磁盘IO之后,发送备份结束通知消息至所述第三方系统,所述备份结束通知消息用于通知所述第三方系统针对所述应用的数据备份是否成功。After the disk IO corresponding to each storage device is restored, a backup end notification message is sent to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
基于同一发明构思,本发明实施例中还提供了一种数据备份设备,该设备可以用于执行上述图2对应的方法实施例,因此本发明实施例提供的数据备份设备的实施方式可以参见该方法的实施方式,重复之处不再赘述。Based on the same inventive concept, the data backup device is also provided in the embodiment of the present invention, and the device can be used to perform the method embodiment corresponding to the foregoing FIG. 2, and therefore, the implementation manner of the data backup device provided by the embodiment of the present invention can be referred to The implementation of the method, the repetition will not be repeated.
参阅图6所示,本发明实施例提供一种数据备份设备,包括:Referring to FIG. 6, an embodiment of the present invention provides a data backup device, including:
收发器61; Transceiver 61;
存储器62,用于存储指令;和a memory 62 for storing instructions; and
处理器63,与所述存储器62和所述收发器61分别相连,用于执行所述指令,以在执行所述指令时执行如下步骤:The processor 63 is respectively connected to the memory 62 and the transceiver 61 for executing the instructions to perform the following steps when executing the instructions:
确定需要进行数据备份的应用,以及存储所述应用的数据的至少一个存储设备;Determining an application requiring data backup, and at least one storage device storing data of the application;
冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;Freeing the disk IO corresponding to each of the at least one storage device;
通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;Notifying the backup device to perform a data backup for the storage device for each of the at least one storage device;
在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。After determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored.
需要说明的是图6所示的各部分之间的连接方式仅为一种可能的示例,也可以是,收发器61与存储器63均与处理器62连接,且收发器61与存储器63之间没有连接,或者,也可以是其他可能的连接方式。 It should be noted that the connection manner between the parts shown in FIG. 6 is only one possible example. It may also be that the transceiver 61 and the memory 63 are both connected to the processor 62, and between the transceiver 61 and the memory 63. There is no connection, or it can be other possible connections.
综上所述,采用本发明实施例提供的方法,在Linux业务主机上,Host agent通过冻结磁盘IO方式保证应用数据一致性,备份设备只需要通过标准南向接口与对Host Agent对接,不需要关心上层应用的具体备份前置处理与备份后置处理,降低了备份复杂度,提高了备份效率。In summary, the method provided by the embodiment of the present invention, on the Linux service host, the host agent ensures the application data consistency by freezing the disk IO mode, and the backup device only needs to connect to the host agent through the standard southbound interface. Pay attention to the specific backup pre-processing and backup post-processing of the upper application, which reduces the backup complexity and improves the backup efficiency.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the embodiments of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.

Claims (16)

  1. 一种数据备份方法,其特征在于,包括:A data backup method, comprising:
    确定需要进行数据备份的应用,以及存储所述应用的数据的至少一个存储设备;Determining an application requiring data backup, and at least one storage device storing data of the application;
    冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;Freeing the disk IO corresponding to each of the at least one storage device;
    通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;Notifying the backup device to perform a data backup for the storage device for each of the at least one storage device;
    在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。After determining that the backup device completes the data backup for the application, the disk IO corresponding to each storage device is restored.
  2. 如权利要求1所述的方法,其特征在于,确定需要进行数据备份的应用,包括:The method of claim 1 wherein the determining the application for data backup comprises:
    接收第三方系统发送的应用注册消息,所述应用注册消息用于指示本次需要进行数据备份的应用。Receiving an application registration message sent by a third-party system, where the application registration message is used to indicate an application that needs to perform data backup.
  3. 如权利要求1或2所述的方法,其特征在于,在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,还包括;The method according to claim 1 or 2, wherein after determining at least one storage device storing data of the application, before freezing the disk IO corresponding to each of the at least one storage device, include;
    接收第三方系统发送的启动数据备份消息。Receive a startup data backup message sent by a third-party system.
  4. 如权利要求1-3任一项所述的方法,其特征在于,在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,还包括;The method according to any one of claims 1 to 3, wherein, after determining at least one storage device storing data of the application, freezing a disk IO corresponding to each of the at least one storage device Previously, including;
    通知所述应用执行备份前置处理,所述备份前置处理为通知所述应用将缓存的脏数据存储至对应的存储设备和/或通知所述应用处理正在执行的事务。Notifying the application to perform backup pre-processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or to notify the application to process the transaction being executed.
  5. 如权利要求1-4任一项所述的方法,其特征在于,冻结所述至少一个存储设备中每个存储设备对应的磁盘IO,包括:The method of any one of the preceding claims, wherein the freezing of the disk IO corresponding to each of the at least one storage device comprises:
    将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中;或者Cache the received IO command for each storage device to the IO queue of the corresponding storage device; or
    将接收到的针对每个存储设备的IO命令丢弃。The received IO command for each storage device is discarded.
  6. 如权利要求1-5任一项所述的方法,其特征在于,在通知备份设备对所述至少一个存储设备中每个存储设备执行针对所述应用的数据备份之后,还包括:The method of any one of the preceding claims, further comprising: after notifying the backup device to perform data backup for the application for each of the at least one storage device, further comprising:
    启动数据备份定时器;Start the data backup timer;
    在确定所述备份设备完成针对所述应用的数据备份之后,还包括:After determining that the backup device completes the data backup for the application, the method further includes:
    确定所述数据备份定时器未超时时,将所述数据备份定时器清零。When it is determined that the data backup timer has not timed out, the data backup timer is cleared.
  7. 如权利要求5所述的方法,其特征在于,在恢复每个存储设备对应的磁盘IO之后,还包括:The method of claim 5, further comprising: after restoring the disk IO corresponding to each storage device,
    将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备;或者,The IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or,
    停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。Stop dropping IO commands for each storage device and restore the initial settings for the corresponding storage device.
  8. 如权利要求2-7任一项所述的方法,其特征在于,在恢复每个存储设备对应的磁盘IO之后,还包括:The method according to any one of claims 2-7, further comprising: after restoring the disk IO corresponding to each storage device, further comprising:
    发送备份结束通知消息至所述第三方系统,所述备份结束通知消息用于通知所述第三方系统针对所述应用的数据备份是否成功。Sending a backup end notification message to the third-party system, the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
  9. 一种数据备份装置,其特征在于,包括:A data backup device, comprising:
    备份控制模块,用于确定需要进行数据备份的应用; a backup control module for determining an application that needs to perform data backup;
    应用驱动模块,用于确定存储所述应用的数据的至少一个存储设备;An application driver module, configured to determine at least one storage device that stores data of the application;
    磁盘驱动模块,用于冻结所述至少一个存储设备中每个存储设备对应的磁盘IO;a disk drive module, configured to freeze a disk IO corresponding to each of the at least one storage device;
    备份驱动模块,用于通知备份设备对所述至少一个存储设备中的每个存储设备执行针对所述应用的数据备份;a backup driver module, configured to notify the backup device to perform a data backup for the storage device for each of the at least one storage device;
    所述磁盘驱动模块,还用于在确定所述备份设备完成针对所述应用的数据备份后,恢复每个存储设备对应的磁盘IO。The disk drive module is further configured to restore the disk IO corresponding to each storage device after determining that the backup device completes the data backup for the application.
  10. 如权利要求9所述的装置,其特征在于,确定需要进行数据备份的应用时,所述备份控制模块,具体用于:The device according to claim 9, wherein when the application for data backup is determined, the backup control module is specifically configured to:
    接收第三方系统发送的应用注册消息,所述应用注册消息用于指示本次需要进行数据备份的应用。Receiving an application registration message sent by a third-party system, where the application registration message is used to indicate an application that needs to perform data backup.
  11. 如权利要求9或10所述的装置,其特征在于,所述备份控制模块,还用于:The device of claim 9 or 10, wherein the backup control module is further configured to:
    在确定存储所述应用的数据的至少一个存储设备之后,在冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,接收第三方系统发送的启动数据备份消息。After determining the at least one storage device storing the data of the application, receiving a startup data backup message sent by the third-party system before freezing the disk IO corresponding to each of the at least one storage device.
  12. 如权利要求9-11任一项所述的装置,其特征在于,所述应用驱动模块,还用于The device according to any one of claims 9 to 11, wherein the application driving module is further used for
    在所述分析单元确定存储所述应用的数据的至少一个存储设备之后,在所述冻结单元冻结所述至少一个存储设备中每个存储设备对应的磁盘IO之前,通知所述应用执行备份前置处理,所述备份前置处理为通知所述应用将缓存的脏数据存储至对应的存储设备和/或通知所述应用处理正在执行的事务。After the analyzing unit determines the at least one storage device storing the data of the application, before the freezing unit freezes the disk IO corresponding to each of the at least one storage device, notifying the application to perform a backup front Processing, the backup pre-processing is to notify the application to store the cached dirty data to the corresponding storage device and/or notify the application to process the transaction being executed.
  13. 如权利要求9-12任一项所述的装置,其特征在于,冻结所述至少一个存储设备中每个存储设备对应的磁盘IO时,所述磁盘驱动模块,具体用于:The device according to any one of claims 9 to 12, wherein, when the disk IO corresponding to each of the at least one storage device is frozen, the disk drive module is specifically configured to:
    将接收到的针对每个存储设备的IO命令缓存至相应存储设备的IO队列中;或者Cache the received IO command for each storage device to the IO queue of the corresponding storage device; or
    将接收到的针对每个存储设备的IO命令丢弃。The received IO command for each storage device is discarded.
  14. 如权利要求9-13任一项所述的装置,其特征在于,所述磁盘驱动模块,还用于:The device according to any one of claims 9 to 13, wherein the disk drive module is further configured to:
    在通知备份设备对所述至少一个存储设备中每个存储设备执行针对所述应用的数据备份之后,启动数据备份定时器;After the backup device is notified to perform data backup for the application for each of the at least one storage device, start a data backup timer;
    所述磁盘驱动模块,还用于:The disk drive module is further configured to:
    在确定所述备份设备完成针对所述应用的数据备份之后,确定所述数据备份定时器未超时时,将所述数据备份定时器清零。After determining that the backup device completes the data backup for the application, determining that the data backup timer has not timed out, the data backup timer is cleared.
  15. 如权利要求13所述的装置,其特征在于,所述磁盘驱动模块,还用于:The device of claim 13, wherein the disk drive module is further configured to:
    在恢复每个存储设备对应的磁盘IO之后,将每个存储设备的IO队列中缓存的IO命令依次取出并提交至相应的存储设备;或者,After recovering the disk IO corresponding to each storage device, the IO commands cached in the IO queue of each storage device are sequentially taken out and submitted to the corresponding storage device; or
    在恢复每个存储设备对应的磁盘IO之后,停止丢弃针对每个存储设备的IO命令,恢复针对相应存储设备的初始设置。After restoring the disk IO corresponding to each storage device, stop dropping the IO command for each storage device and restore the initial settings for the corresponding storage device.
  16. 如权利要求10-15任一项所述的装置,其特征在于,所述备份控制模块,还用于:The device according to any one of claims 10-15, wherein the backup control module is further configured to:
    在恢复每个存储设备对应的磁盘IO之后,发送备份结束通知消息至所述第三方系统,所述备份结束通知消息用于通知所述第三方系统针对所述应用的数据备份是否成功。 After the disk IO corresponding to each storage device is restored, a backup end notification message is sent to the third-party system, and the backup end notification message is used to notify the third-party system whether the data backup for the application is successful.
PCT/CN2017/075489 2016-06-06 2017-03-02 Data backup method and apparatus WO2017211099A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610394932.8A CN106055433B (en) 2016-06-06 2016-06-06 A kind of data back up method and device
CN201610394932.8 2016-06-06

Publications (1)

Publication Number Publication Date
WO2017211099A1 true WO2017211099A1 (en) 2017-12-14

Family

ID=57170537

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/075489 WO2017211099A1 (en) 2016-06-06 2017-03-02 Data backup method and apparatus

Country Status (2)

Country Link
CN (1) CN106055433B (en)
WO (1) WO2017211099A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284205A (en) * 2018-09-21 2019-01-29 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium
CN109376033A (en) * 2018-09-21 2019-02-22 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055433B (en) * 2016-06-06 2019-02-26 华为技术有限公司 A kind of data back up method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873622A (en) * 2006-04-20 2006-12-06 北京艾德斯科技有限公司 Method and equipment for backing up, replicating and recovering data under environment
CN101256528A (en) * 2008-03-20 2008-09-03 中国科学院计算技术研究所 Magnetic disk data backup system and method supporting nought backup window
CN101414277A (en) * 2008-11-06 2009-04-22 清华大学 Need-based increment recovery disaster-containing system and method based on virtual machine
CN102402471A (en) * 2011-12-23 2012-04-04 创新科软件技术(深圳)有限公司 Method and system for backing up data in real time based on snapshot function of memory array
CN106055433A (en) * 2016-06-06 2016-10-26 华为技术有限公司 Data backup method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7844577B2 (en) * 2002-07-15 2010-11-30 Symantec Corporation System and method for maintaining a backup storage system for a computer system
US8930527B2 (en) * 2009-05-26 2015-01-06 Oracle International Corporation High availability enabler
JP5521816B2 (en) * 2010-06-18 2014-06-18 富士通株式会社 Storage device, control device, and control method of storage device
US9317375B1 (en) * 2012-03-30 2016-04-19 Lenovoemc Limited Managing cache backup and restore for continuous data replication and protection
US9276838B2 (en) * 2012-10-05 2016-03-01 Futurewei Technologies, Inc. Software defined network virtualization utilizing service specific topology abstraction and interface
KR20170073691A (en) * 2014-11-06 2017-06-28 후아웨이 테크놀러지 컴퍼니 리미티드 Information sending method, managed system, and managing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873622A (en) * 2006-04-20 2006-12-06 北京艾德斯科技有限公司 Method and equipment for backing up, replicating and recovering data under environment
CN101256528A (en) * 2008-03-20 2008-09-03 中国科学院计算技术研究所 Magnetic disk data backup system and method supporting nought backup window
CN101414277A (en) * 2008-11-06 2009-04-22 清华大学 Need-based increment recovery disaster-containing system and method based on virtual machine
CN102402471A (en) * 2011-12-23 2012-04-04 创新科软件技术(深圳)有限公司 Method and system for backing up data in real time based on snapshot function of memory array
CN106055433A (en) * 2016-06-06 2016-10-26 华为技术有限公司 Data backup method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284205A (en) * 2018-09-21 2019-01-29 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium
CN109376033A (en) * 2018-09-21 2019-02-22 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium
CN109284205B (en) * 2018-09-21 2023-04-07 平安科技(深圳)有限公司 Snapshot backup method and device, computer equipment and storage medium
CN109376033B (en) * 2018-09-21 2023-04-07 平安科技(深圳)有限公司 Snapshot backup method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN106055433A (en) 2016-10-26
CN106055433B (en) 2019-02-26

Similar Documents

Publication Publication Date Title
US11243847B2 (en) Managing remote data replication
US11068370B2 (en) Systems and methods for instantiation of virtual machines from backups
US7594138B2 (en) System and method of error recovery for backup applications
US8566281B2 (en) Method for implementing multi-array consistency groups using a write queuing mechanism
US9940067B2 (en) Performing a data write on a storage device
US9563655B2 (en) Zero and near-zero data loss database backup and recovery
US8874508B1 (en) Systems and methods for enabling database disaster recovery using replicated volumes
US8407435B2 (en) Efficiently creating a snapshot of a large consistency group using multiple commands including a snapshot preparation command
US20120226877A1 (en) Maintaining mirror and storage system copies of volumes at multiple remote sites
WO2017211099A1 (en) Data backup method and apparatus
WO2012059393A1 (en) Remote recovery with checkpoints and intention logs
US20140201149A1 (en) Consistent bookmark
US8677088B1 (en) Systems and methods for recovering primary sites after failovers to remote secondary sites
US20240095021A1 (en) Quiescent operation of non-disruptive update of a data management system
CN114253765A (en) Data recovery method and related equipment
CN112486729A (en) Adjustment of secure data commit scan based on operation verification of non-volatile memory

Legal Events

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

Ref document number: 17809540

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17809540

Country of ref document: EP

Kind code of ref document: A1