CN101118509A - Method, device and system for remote disaster recovery of memory database - Google Patents
Method, device and system for remote disaster recovery of memory database Download PDFInfo
- Publication number
- CN101118509A CN101118509A CNA200710149582XA CN200710149582A CN101118509A CN 101118509 A CN101118509 A CN 101118509A CN A200710149582X A CNA200710149582X A CN A200710149582XA CN 200710149582 A CN200710149582 A CN 200710149582A CN 101118509 A CN101118509 A CN 101118509A
- Authority
- CN
- China
- Prior art keywords
- disaster recovery
- module
- memory database
- logical
- logical log
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种内存数据库远程容灾的方法,该方法包括:接收主内存数据库执行业务操作后生成的逻辑日志并备份;执行所述逻辑日志,更新容灾内存数据库中的数据,将容灾内存数据库中的数据备份;主内存数据库故障时,如果容灾数据库正常,使用容灾内存数据库,如果容灾数据库故障,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾数据库。本发明还公开了一种内存数据库远程容灾的异地侧装置、一种内存数据库远程容灾的本地侧装置和一种内存数据库远程容灾的系统。应用本发明,能够以内存作为数据存储主体,实现内存数据库的远程容灾。
The invention discloses a method for remote disaster recovery of an in-memory database. The method comprises: receiving and backing up a logical log generated after the main in-memory database executes business operations; executing the logical log to update data in the in-memory database for disaster recovery, and Data backup in the disaster recovery memory database; when the main memory database fails, if the disaster recovery database is normal, use the disaster recovery memory database; if the disaster recovery database fails, use the backup data and logical logs to restore the disaster recovery memory database, and then use the disaster recovery database . The invention also discloses a remote disaster recovery device for the memory database, a local device for the remote disaster recovery of the memory database and a remote disaster recovery system for the memory database. By applying the present invention, the memory can be used as the main body of data storage to realize the remote disaster recovery of the memory database.
Description
技术领域 technical field
本发明涉及内存数据库技术,特别涉及内存数据库远程容灾的方法、装置和系统。The invention relates to memory database technology, in particular to a method, device and system for remote disaster recovery of memory databases.
背景技术 Background technique
数据库容灾建立在数据库基础上,通过逻辑的方式建立一个和主数据库相同的容灾数据库并实时更新,用于主数据库发生灾难时,及时接管业务系统,保证业务的持续性。Database disaster recovery is based on the database. It establishes a disaster recovery database that is the same as the main database in a logical way and updates it in real time. It is used to take over the business system in time to ensure business continuity when a disaster occurs in the main database.
灾难的原因是多方面的,可以由数据库所在的计算机系统的因素导致,例如存储介质的损坏,或者由非计算机系统的因素导致,例如自然灾害。采用远程容灾,将地理位置划分为本地和异地,在本地建立主数据库,而在异地建立容灾数据库,相当于在地理上将主数据库和容灾数据库分离,已经成为保证业务持续性的一种重要手段。There are many reasons for the disaster, which can be caused by factors of the computer system where the database is located, such as damage to the storage medium, or by factors other than the computer system, such as natural disasters. Using remote disaster recovery, the geographical location is divided into local and remote, and the main database is established locally, while the disaster recovery database is established in other places, which is equivalent to geographically separating the main database and the disaster recovery database. an important means.
目前应用广泛的物理数据库远程容灾,主要通过数据库产品自带的复制工具或第三方工具实现,这些工具通过将本地主数据库中记录业务操作的日志文件传输到异地容灾数据库,并在异地容灾数据库中执行日志文件,实时更新异地容灾数据库中的数据,以实现异地容灾数据库与本地数据库的数据同步,从而在本地数据库出现灾难时,异地容灾数据库能够及时接管业务系统。Remote disaster recovery of physical databases, which is widely used at present, is mainly realized through the replication tools of database products or third-party tools. These tools transmit the log files recording business operations in the local master database to remote disaster recovery Log files are executed in the disaster database, and the data in the remote disaster recovery database is updated in real time to realize data synchronization between the remote disaster recovery database and the local database, so that when a disaster occurs in the local database, the remote disaster recovery database can take over the business system in time.
随着运营商运营水平的不断提高,对数据库操作的实时性也提出了更高的要求,物理数据库的数据存储主体为磁盘,而磁盘中的数据存取必须涉及到输入/输出(I/O)接口,因此物理数据库在操作执行方面存在延迟,成为物理数据库在实时性方面的性能瓶颈,也同样影响物理数据库远程容灾时,主数据库和容灾数据库的数据同步效果。基于上述问题,内存数据库应运而生,希望业务系统对数据库的操作只针对内存,由于内存的数据存取无需涉及I/O接口,因此在实时性方面具备很大的优势。现有内存数据库的应用多是以内存作为快速查询的缓存,从而在数据存取方面满足实时性的要求,而数据存储的主体依然为磁盘,因此目前针对内存数据库提出的远程容灾方案,也是基于物理数据库实现的。With the continuous improvement of the operation level of operators, higher requirements are put forward for the real-time performance of database operations. The main body of data storage in physical databases is disks, and data access in disks must involve input/output (I/O ) interface, so the physical database has a delay in operation execution, which becomes the real-time performance bottleneck of the physical database, and also affects the data synchronization effect of the primary database and the disaster recovery database when the physical database is remote disaster recovery. Based on the above problems, an in-memory database came into being. It is hoped that the operation of the business system on the database is only for the memory. Since the data access of the memory does not need to involve the I/O interface, it has a great advantage in real-time performance. Most of the existing in-memory database applications use memory as a fast query cache, so as to meet the real-time requirements in terms of data access, while the main body of data storage is still the disk, so the remote disaster recovery solution currently proposed for in-memory databases is also a Realized based on physical database.
随着应用需求和性能要求的提高,内存数据库的数据存储主体将由磁盘逐渐转换为内存本身,但是,由于内存的数据易失性,如果内存数据库所在的系统出现故障,内存中的数据将会全部丢失无法恢复,因此以内存作为数据存储主体的内存数据库的远程容灾能力显得尤为重要。With the improvement of application requirements and performance requirements, the data storage body of the memory database will be gradually converted from the disk to the memory itself. However, due to the data volatility of the memory, if the system where the memory database is located fails, all the data in the memory will be lost. The loss cannot be recovered, so the remote disaster recovery capability of the memory database with memory as the main data storage is particularly important.
目前还未出现以内存作为数据存储主体的内存数据库远程容灾方案。At present, there is no remote disaster recovery scheme for in-memory databases that uses memory as the main body of data storage.
发明内容 Contents of the invention
本发明实施例提供一种内存数据库的远程容灾方法,该方法能够以内存作为数据存储主体,实现内存数据库的远程容灾。An embodiment of the present invention provides a remote disaster recovery method for an in-memory database. The method can use a memory as a data storage body to implement remote disaster recovery for an in-memory database.
本发明实施例提供一种内存数据库的远程容灾异地侧装置,该装置能够以内存作为数据存储主体,实现内存数据库的远程容灾。An embodiment of the present invention provides a remote disaster recovery remote-side device for an in-memory database. The device can use a memory as a data storage body to implement remote disaster recovery for an in-memory database.
本发明实施例提供一种内存数据库的远程容灾本地侧装置,该装置能够以内存作为数据存储主体,实现内存数据库的远程容灾。An embodiment of the present invention provides a local device for remote disaster recovery of an in-memory database. The device can use a memory as a data storage body to implement remote disaster recovery for an in-memory database.
本发明实施例提供一种内存数据库的远程容灾系统,该系统能够以内存作为数据存储主体,实现内存数据库的远程容灾。An embodiment of the present invention provides a remote disaster recovery system for an in-memory database. The system can use memory as a data storage body to implement remote disaster recovery for an in-memory database.
本发明实施例提供一种内存数据库的远程容灾方法,在本地建立主内存数据库,在异地建立容灾内存数据库,该方法还包括:An embodiment of the present invention provides a remote disaster recovery method for an in-memory database. The main in-memory database is established locally, and the in-memory database for disaster recovery is established in a different place. The method also includes:
接收主内存数据库执行业务操作后生成的逻辑日志并备份;Receive and back up the logical log generated after the main memory database performs business operations;
执行所述逻辑日志,更新容灾内存数据库中的数据,将容灾内存数据库中的数据备份;Execute the logical log, update the data in the disaster recovery memory database, and back up the data in the disaster recovery memory database;
主内存数据库故障时,如果容灾数据库正常,使用容灾内存数据库,如果容灾数据库故障,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾数据库。When the main memory database fails, if the disaster recovery database is normal, use the disaster recovery memory database; if the disaster recovery database fails, use the backup data and logical logs to restore the disaster recovery memory database, and then use the disaster recovery database.
本发明实施例提供一种内存数据库的远程容灾异地侧装置,该装置包括:An embodiment of the present invention provides a remote disaster recovery remote side device for an in-memory database, the device comprising:
逻辑日志处理模块,用于接收来自本地侧装置的逻辑日志并备份;执行接收的逻辑日志,更新容灾内存数据库模块中的数据;The logical log processing module is used to receive and back up the logical log from the local device; execute the received logical log and update the data in the disaster recovery memory database module;
容灾内存数据库模块,用于存储数据;Disaster recovery memory database module, used to store data;
磁盘镜像模块,用于将所述容灾内存数据库模块中的数据备份;在所述容灾内存数据库模块出现故障时,使用所述备份的数据和逻辑日志恢复所述容灾内存数据库模块中的数据。The disk mirroring module is used to back up the data in the disaster recovery memory database module; when the disaster recovery memory database module fails, use the backup data and logical logs to restore the data in the disaster recovery memory database module data.
本发明实施例提供一种内存数据库远程容灾本地侧装置,该装置包括:An embodiment of the present invention provides a local side device for remote disaster recovery of an in-memory database, the device comprising:
主内存数据库模块,用于存储数据;Main memory database module for storing data;
逻辑日志生成模块,用于生成针对所述主内存数据库模块的业务操作的逻辑日志;A logical log generation module, configured to generate a logical log for business operations of the main memory database module;
逻辑日志处理模块,用于从所述逻辑日志生成模块中读取逻辑日志,将逻辑日志发送到异地侧装置。The logical log processing module is configured to read the logical log from the logical log generation module, and send the logical log to the remote device.
本发明实施例提供一种内存数据库远程容灾的系统,该系统包括:本地侧装置和异地侧装置;所述本地侧装置中包括存储数据的主内存数据库,异地侧装置中包括存储数据的容灾内存数据库;An embodiment of the present invention provides a remote disaster recovery system for a memory database. The system includes: a local device and a remote device; the local device includes a main memory database for storing data, and the remote device includes a storage device for storing data In-memory database;
所述本地侧装置,用于生成针对所述主内存数据库的业务操作的逻辑日志,将所述逻辑日志发送到异地侧装置;The local side device is configured to generate a logical log for business operations of the main memory database, and send the logical log to the remote side device;
所述异地侧装置,用于接收来自所述本地侧装置的逻辑日志并备份;执行接收的逻辑日志,更新所述容灾内存数据库中的数据,将所述容灾内存数据库中的数据备份;在所述容灾内存数据库出现故障时,使用所述备份的数据和逻辑日志恢复所述容灾内存数据库中的数据。The remote side device is used to receive and back up the logical log from the local side device; execute the received logical log, update the data in the disaster recovery memory database, and back up the data in the disaster recovery memory database; When the disaster recovery memory database fails, use the backup data and logical logs to restore the data in the disaster recovery memory database.
可见,本发明实施例内存数据库远程容灾的方法、装置和系统,使用逻辑日志同步主内存数据库和容灾内存数据库中的数据,在主内存数据库出现故障时,使用容灾内存数据库及时接管业务系统;又由于数据存储的主体为内存,具有数据易失性的特点,将来自主内存数据库的逻辑日志和容灾内存数据库中的数据再进行备份,在容灾内存数据库出现故障时,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾内存数据库及时接管业务系统。It can be seen that the method, device and system for remote disaster recovery of memory databases in the embodiments of the present invention use logical logs to synchronize the data in the main memory database and the disaster recovery memory database, and use the disaster recovery memory database to take over business in time when the main memory database fails system; and because the main body of data storage is memory, which has the characteristics of data volatility, the logical log of the main memory database and the data in the disaster recovery memory database are backed up. When the disaster recovery memory database fails, the backup data is used. Data and logical logs restore the disaster recovery memory database, and then use the disaster recovery memory database to take over the business system in time.
附图说明 Description of drawings
图1为本发明实施例内存数据库远程容灾的异地侧装置结构示意图;FIG. 1 is a schematic structural diagram of a device on the remote side of an in-memory database for remote disaster recovery according to an embodiment of the present invention;
图2为本发明实施例内存数据库远程容灾的本地侧装置结构示意图;2 is a schematic structural diagram of a local side device for remote disaster recovery of an in-memory database according to an embodiment of the present invention;
图3为本发明实施例内存数据库远程容灾的方法流程图;3 is a flowchart of a method for remote disaster recovery of an in-memory database according to an embodiment of the present invention;
图4为本发明实施例内存数据库远程容灾的方法中的日志同步流程图;Fig. 4 is the flow chart of log synchronization in the method for remote disaster recovery of in-memory database according to the embodiment of the present invention;
图5为本发明实施例内存数据库远程容灾的方法中的日志接收流程图;FIG. 5 is a flow chart of log reception in the method for remote disaster recovery of an in-memory database according to an embodiment of the present invention;
图6为本发明实施例内存数据库远程容灾的方法中的磁盘镜像流程图;6 is a flow chart of disk mirroring in the method for remote disaster recovery of an in-memory database according to an embodiment of the present invention;
图7为本发明实施例内存数据库远程容灾的方法中的恢复流程图。FIG. 7 is a recovery flowchart in the method for remote disaster recovery of an in-memory database according to an embodiment of the present invention.
具体实施方式 Detailed ways
为使本发明实施例的目的和优点更清楚,下面结合附图对本发明实施例作进一步的详细说明。In order to make the purpose and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.
首先,介绍本发明实施例内存数据库远程容灾的装置,包括本地侧装置和异地侧装置。First, the device for remote disaster recovery of an in-memory database according to the embodiment of the present invention is introduced, including a local device and a remote device.
图1为本发明实施例内存数据库远程容灾的异地侧装置结构示意图,该异地侧装置包括:Figure 1 is a schematic structural diagram of a device on the remote side of an in-memory database for remote disaster recovery according to an embodiment of the present invention. The device on the remote side includes:
逻辑日志处理模块,用于接收来自本地侧装置的逻辑日志并备份;执行接收的逻辑日志,更新容灾内存数据库模块中的数据。The logical log processing module is used for receiving and backing up the logical log from the local device; executing the received logical log and updating the data in the disaster recovery memory database module.
容灾内存数据库模块,用于存储数据。The disaster recovery memory database module is used to store data.
磁盘镜像模块,用于将所述容灾内存数据库模块中的数据备份;在所述容灾内存数据块出现故障时,使用所述备份的数据和逻辑日志恢复所述容灾内存数据库模块中的数据。The disk mirroring module is used to back up the data in the disaster recovery memory database module; when the disaster recovery memory data block fails, use the backup data and logical logs to restore the data in the disaster recovery memory database module data.
本发明实施例提供的内存数据库远程容灾的异地侧装置,接收本地侧装置发送的逻辑日志,将逻辑日志备份并执行逻辑日志,从而更新容灾内存数据库中的数据;又由于数据存储的主体为内存,将容灾内存数据库中的数据也进行备份,在主内存数据库出现故障时,使用容灾内存数据库及时接管业务系统,处理业务请求,在容灾内存数据库出现故障时,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾内存数据库及时接管业务系统,处理业务请求,从而保证了以内存数据库为数据主体的远程容灾能力。The remote disaster recovery device of the memory database provided by the embodiment of the present invention receives the logical log sent by the local device, backs up the logical log and executes the logical log, thereby updating the data in the disaster recovery memory database; and because the main body of the data storage For memory, the data in the disaster recovery memory database is also backed up. When the main memory database fails, the disaster recovery memory database is used to take over the business system in time to process business requests. When the disaster recovery memory database fails, the backup data is used The disaster recovery in-memory database can be restored with the logic log, and then the disaster recovery in-memory database can be used to take over the business system in time to process business requests, thereby ensuring the remote disaster recovery capability with the in-memory database as the data subject.
上述本发明实施例提供的内存数据库远程容灾的异地侧装置,在装置内部可以包括镜像磁盘,或者该装置可以直连有位于装置外部的镜像磁盘,镜像磁盘的作用为存储所述备份的逻辑日志和容灾内存数据库中的数据,图1示出的是异地侧装置直连有镜像磁盘的情况。基于这种情况,该异地侧装置中还可以进一步包括心跳消息处理模块,用于接收来自本地侧装置的心跳消息,向本地侧装置返回心跳响应消息。The remote side device for remote disaster recovery of the memory database provided by the above-mentioned embodiments of the present invention may include a mirrored disk inside the device, or the device may be directly connected to a mirrored disk located outside the device, and the function of the mirrored disk is to store the backup logic For logs and data in the disaster recovery memory database, Figure 1 shows the situation where the remote device is directly connected to a mirrored disk. Based on this situation, the remote side device may further include a heartbeat message processing module, configured to receive a heartbeat message from the local side device, and return a heartbeat response message to the local side device.
装置中的磁盘镜像模块还可以包括:执行模块和标志位设置模块。其中,执行模块用于将容灾内存数据库模块中的数据存储到镜像磁盘;使用镜像磁盘中的数据和逻辑日志恢复容灾内存数据库模块中的数据。标志位设置模块,用于根据执行模块当前是否将容灾内存数据库模块中的数据存储到镜像磁盘,设置标识执行模块操作的标志位。The disk image module in the device may also include: an execution module and a flag bit setting module. Wherein, the execution module is used to store the data in the disaster recovery memory database module to the mirror disk; use the data in the mirror disk and the logic log to recover the data in the disaster recovery memory database module. The flag bit setting module is used to set the flag bit for identifying the operation of the execution module according to whether the execution module currently stores the data in the disaster recovery memory database module to the mirror disk.
装置中的逻辑日志处理模块还可以包括:收发模块、缓存模块、判定模块和数据同步模块。The logical log processing module in the device may also include: a transceiver module, a buffer module, a judgment module and a data synchronization module.
收发模块,用于接收来自本地侧装置的逻辑日志,根据判定模块的判定结果输出到所述镜像磁盘,并输出到所述缓存模块;向本地侧装置返回逻辑日志正确接收的确认消息。The transceiver module is used to receive the logic log from the local side device, output it to the mirror disk according to the judgment result of the judgment module, and output it to the cache module; return a confirmation message that the logic log is correctly received to the local side device.
缓存模块,用于缓存来自本地的逻辑日志。The cache module is used to cache logical logs from the local.
数据同步模块,用于从所述缓存模块中读出逻辑日志并执行,根据执行结果更新所述容灾内存数据库模块中存储的数据。The data synchronization module is used to read the logic log from the cache module and execute it, and update the data stored in the disaster recovery memory database module according to the execution result.
判定模块,用于根据磁盘镜像模块中的标志位,得出当前是否正在进行将容灾数据库中的数据存储到镜像磁盘的判定结果。The judging module is configured to obtain a judging result whether the data in the disaster recovery database is currently being stored to the mirror disk according to the flag bits in the disk mirroring module.
图2为本发明实施例内存数据库远程容灾的本地侧装置的结构示意图,该装置中包括:FIG. 2 is a schematic structural diagram of a local-side device for remote disaster recovery of an in-memory database according to an embodiment of the present invention. The device includes:
主内存数据库模块,用于存储数据。The main memory database module is used to store data.
逻辑日志生成模块,用于生成针对所述主内存数据库模块的业务操作的逻辑日志。A logical log generation module, configured to generate a logical log for business operations of the main memory database module.
逻辑日志处理模块,用于从所述逻辑日志生成模块中读取逻辑日志,将逻辑日志发送到异地侧装置。The logical log processing module is configured to read the logical log from the logical log generation module, and send the logical log to the remote device.
本发明实施例提供的内存数据库远程容灾的本地侧装置,将对应主内存数据库业务操作的逻辑日志发送到异地侧装置,使异地侧装置能够根据该逻辑日志将容灾内存数据库中的数据与本地侧主内存数据库中的数据同步,实现远程容灾。The local side device for remote disaster recovery of the memory database provided by the embodiment of the present invention sends the logic log corresponding to the business operation of the main memory database to the remote side device, so that the remote side device can compare the data in the disaster recovery memory database with the logical log. The data in the main memory database on the local side is synchronized to realize remote disaster recovery.
上述本地侧装置还可以包括逻辑日志缓存磁盘,或该本地侧装置可以直连一个逻辑日志缓存磁盘,用于接收所述逻辑日志读取模块备份的逻辑日志存储,图2示出的是本地侧装置直连逻辑日志缓存磁盘的情况。基于这种情况,本发明实施例提供的内存数据库远程容灾的本地侧装置中可以进一步包括心跳消息处理模块,装置中的逻辑日志处理模块可以包括:逻辑日志读取模块、缓存模块、收发模块和逻辑日志删除模块。The above-mentioned local side device may also include a logical log cache disk, or the local side device may be directly connected to a logical log cache disk for receiving the logical log storage backed up by the logical log reading module. Figure 2 shows the local side The case where the device is directly connected to the logical log cache disk. Based on this situation, the local side device of the memory database remote disaster recovery provided by the embodiment of the present invention may further include a heartbeat message processing module, and the logical log processing module in the device may include: a logical log reading module, a cache module, and a transceiver module and logical log deletion modules.
逻辑日志读取模块,用于从所述逻辑日志生成模块中读取逻辑日志,根据所述心跳消息处理模块接收的心跳响应消息,在和异地侧装置间通信正常时,传输给缓存模块,在和异地侧装置间通信不正常时备份。The logical log reading module is used to read the logical log from the logical log generation module, and transmit the heartbeat response message received by the heartbeat message processing module to the cache module when the communication with the remote side device is normal, Backup when the communication with the remote device is not normal.
缓存模块,用于缓存所述逻辑日志读取模块读取的逻辑日志。A caching module, configured to cache the logical logs read by the logical log reading module.
收发模块,用于将缓存模块中或者备份存储的逻辑日志向异地侧装置发送,接收异地侧装置返回的逻辑日志正确接收的确认消息,所述确认消息中包括正确接收的逻辑日志对应的标识。The transceiver module is used to send the logical log stored in the cache module or backed up to the remote device, and receive the confirmation message of correct reception of the logical log returned by the remote device, and the confirmation message includes the identifier corresponding to the correctly received logical log.
逻辑日志删除模块,用于将所述收发模块接收的确认消息中包括的标识,在所述缓存模块或逻辑日志缓存磁盘中对应的逻辑日志删除。The logical log deletion module is configured to delete the identifier included in the confirmation message received by the transceiver module and the corresponding logical log in the cache module or the logical log cache disk.
心跳消息处理模块,用于向异地侧装置发送心跳消息,接收异地侧装置返回的心跳响应消息。The heartbeat message processing module is configured to send a heartbeat message to the remote device, and receive a heartbeat response message returned by the remote device.
上述本发明实施例内存数据库远程容灾的异地侧装置和本地侧装置,可以组成本发明实施例内存数据库远程容灾的系统。The remote-side device and the local-side device for remote disaster recovery of the in-memory database in the above-mentioned embodiment of the present invention may constitute a system for remote disaster recovery of the in-memory database in the embodiment of the present invention.
其次,详细介绍本发明实施例内存数据库远程容灾的方法,图3示出了该方法的流程。在图3所示流程开始之前,首先在本地建立主内存数据库,在异地建立容灾内存数据库。上述主内存数据库对应已介绍的本地侧装置中的主内存数据库模块,而容灾内存数据库对应异地侧装置中的容灾内存数据库模块。Next, the method for remote disaster recovery of an in-memory database according to the embodiment of the present invention is introduced in detail, and FIG. 3 shows the flow of the method. Before the process shown in Figure 3 starts, the main memory database is firstly established locally, and the disaster recovery memory database is established remotely. The above-mentioned main memory database corresponds to the main memory database module in the local side device already introduced, and the disaster recovery memory database corresponds to the disaster recovery memory database module in the remote side device.
图3所示流程包括:The process shown in Figure 3 includes:
步骤301:接收主内存数据库执行业务操作后生成的逻辑日志并备份。Step 301: Receive and back up the logical log generated after the main memory database executes the business operation.
本步骤中,本地侧装置中的逻辑日志生成模块,在主内存数据库执行业务操作后,生成记录已执行的业务操作的逻辑日志,异地侧装置中的逻辑日志处理模块首先接收上述逻辑日志,再对接收到的逻辑日志进行备份。In this step, the logical log generation module in the local side device generates a logical log that records the executed business operations after the main memory database executes the business operation, and the logical log processing module in the remote side device first receives the above logical log, and then Back up the received logical logs.
步骤302:执行接收的逻辑日志,更新容灾内存数据库中的数据,将容灾内存数据库中的数据备份。Step 302: Execute the received logic log, update the data in the disaster recovery memory database, and back up the data in the disaster recovery memory database.
本步骤中,异地侧装置中的逻辑日志处理模块执行接收到的逻辑日志,即可根据执行结果获知主内存数据库进行的业务操作,对容灾内存数据库中的数据进行更新,以实现容灾内存数据库和主内存数据库中的数据同步,在主内存数据库故障时能够及时接管业务系统。将更新后的数据备份的操作,由异地侧装置中的磁盘镜像模块完成,可以与上述更新容灾内存数据库中的数据异步操作,即不必每次数据更新后都立即备份,例如可以设置镜像磁盘间隔,定期将容灾内存数据库中的数据备份。In this step, the logical log processing module in the remote device executes the received logical log, and can know the business operations performed by the main memory database according to the execution result, and update the data in the disaster recovery memory database to realize the disaster recovery memory The data in the database and the main memory database are synchronized, and the business system can be taken over in time when the main memory database fails. The operation of backing up the updated data is completed by the disk mirroring module in the off-site device, which can operate asynchronously with the data in the above-mentioned update disaster recovery memory database, that is, it is not necessary to back up immediately after each data update, for example, a mirror disk can be set Regularly back up the data in the disaster recovery memory database.
步骤303:主内存数据库故障时,如果容灾数据库正常,使用容灾内存数据库,如果容灾数据库故障,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾数据库。Step 303: When the main memory database fails, if the disaster recovery database is normal, use the disaster recovery memory database; if the disaster recovery database fails, restore the disaster recovery memory database using the backup data and logical logs, and then use the disaster recovery database.
本步骤中,当容灾内存数据库也出现故障时,异地侧装置中的磁盘镜像模块可以使用备份的数据来恢复容灾内存数据库,但如步骤302所述,由于将容灾数据库中的数据备份与容灾内存数据库中的数据更新可以为异步操作,因此备份的数据可能与容灾内存数据库出现故障时数据的状态并不一致,这时就需要使用备份的逻辑日志,对备份的数据进行更新,使这些数据与容灾内存数据库出现故障时的状态同步,从而实现将容灾内存数据库恢复到故障出现前的状态。In this step, when the disaster recovery memory database also fails, the disk mirroring module in the remote device can use the backup data to restore the disaster recovery memory database, but as described in
本发明实施例内存数据库远程容灾的方法,使用逻辑日志同步主内存数据库和容灾内存数据库中的数据,在主内存数据库出现故障时,使用容灾内存数据库及时接管业务系统,处理业务请求;又由于数据存储的主体为内存,具有数据易失性的特点,将来自主内存数据库的逻辑日志和容灾内存数据库中的数据再进行备份,在容灾内存数据库出现故障时,使用备份的数据和逻辑日志恢复容灾内存数据库,再使用容灾内存数据库及时接管业务系统,从而保证了以内存数据库为数据主体的远程容灾能力。The method for remote disaster recovery of the memory database in the embodiment of the present invention uses logical logs to synchronize the data in the main memory database and the disaster recovery memory database, and when the main memory database fails, the disaster recovery memory database is used to take over the business system in time and process business requests; And because the main body of data storage is memory, which has the characteristics of data volatility, the logical log of the main memory database and the data in the disaster recovery memory database are backed up. When the disaster recovery memory database fails, the backup data and the data in the disaster recovery memory database are used. The logical log restores the disaster recovery memory database, and then uses the disaster recovery memory database to take over the business system in time, thus ensuring the remote disaster recovery capability with the memory database as the data subject.
本发明实施例提供的内存数据库远程容灾的方法中,在异地可以进一步设置一个镜像磁盘,对应于已介绍过的异地侧装置中的镜像磁盘,或者直连于异地侧装置的镜像磁盘,步骤301备份的逻辑日志和步骤302中备份的容灾内存数据库中的数据可以为:异地侧装置中的逻辑日志处理模块将逻辑日志输出到镜像磁盘存储,以及异地侧装置中的磁盘镜像模块将容灾内存数据库中的数据输出到镜像磁盘中存储。In the method for remote disaster recovery of an in-memory database provided by the embodiment of the present invention, a mirror disk can be further set in a different place, corresponding to the mirror disk in the remote side device that has been introduced, or directly connected to the mirror disk of the remote side device, the steps The logical log backed up in 301 and the data in the disaster recovery memory database backed up in
本发明实施例提供的内存数据库远程容灾的方法,可以具体划分为几个实施流程,包括:日志同步流程、日志接收流程、磁盘镜像流程和容灾内存数据库恢复流程。The method for remote disaster recovery of an in-memory database provided by the embodiment of the present invention can be specifically divided into several implementation processes, including: a log synchronization process, a log receiving process, a disk mirroring process, and a disaster recovery in-memory database recovery process.
在介绍上述各个具体流程之前,先介绍本发明实施例中逻辑日志存储的较佳实施方式。Before introducing each of the above specific processes, a preferred implementation manner of logical log storage in the embodiment of the present invention will be introduced first.
逻辑日志可以存放在共享内存的系统日志表中,通过增加记录形成缓冲(Buffer)组,每个逻辑日志是系统日志表中的一条记录,该记录的结构如表一所示。The logical log can be stored in the system log table of the shared memory, and a buffer (Buffer) group is formed by adding records. Each logical log is a record in the system log table. The structure of the record is shown in Table 1.
表一Table I
表一中所示的Bufier头的结构如表二所示。The structure of the Bufier header shown in Table 1 is shown in Table 2.
表二Table II
表二中所示的logid代表进行业务数据操作时,申请的对应该业务操作的逻辑日志的唯一值,当logid大于0xffffffff时从1开始重新分配。表二中所示的flag表示本条记录剩余的空间,当剩余的空间不足以存储逻辑日志时,可以将flag的值设为full。表二中所示的bufsize代表本条记录的大小。The logid shown in Table 2 represents the unique value of the logic log corresponding to the business operation applied for when performing business data operations. When the logid is greater than 0xffffffff, it is reassigned from 1. The flag shown in Table 2 indicates the remaining space of this record. When the remaining space is not enough to store the logical log, the value of flag can be set to full. The bufsize shown in Table 2 represents the size of this record.
图4为本发明实施例内存数据库远程容灾的方法中的日志同步流程图,该流程主要描述在本地如何读取生成的逻辑日志,并发送到异地实现日志同步。在本地设置缓存区和逻辑日志缓存磁盘,其中缓存区可以是上述介绍过的共享内存中的系统日志表,存储结构也可以如表一和表二所示,缓存区和逻辑日志缓存磁盘,对应已介绍过的本地侧装置中的缓存模块和逻辑日志缓存磁盘。图4所示流程包括:FIG. 4 is a flow chart of log synchronization in the method for remote disaster recovery of in-memory database according to the embodiment of the present invention. The flow mainly describes how to read the generated logical log locally and send it to a different place to realize log synchronization. Set the cache area and logical log cache disk locally. The cache area can be the system log table in the shared memory introduced above. The storage structure can also be shown in Table 1 and Table 2. The cache area and logical log cache disk correspond to The cache module and logical log cache disk in the local device have been introduced. The process shown in Figure 4 includes:
步骤401:从缓存区中读取逻辑日志。Step 401: Read the logical log from the cache.
本步骤中,缓存区中的存储结构可以如表一和表二所示,本地侧装置中的逻辑日志读取模块,读取执行业务操作后由逻辑日志生成模块生成的逻辑日志,存储到缓存区中。上述读取逻辑日志的方法可以为:从flag标识为full的bufier中读取逻辑日志。In this step, the storage structure in the buffer area can be shown in Table 1 and Table 2. The logical log reading module in the local device reads the logical log generated by the logical log generation module after the business operation is executed, and stores it in the cache in the district. The method for reading the logical log above may be: read the logical log from the bufier whose flag is full.
步骤402:监测当前本地和异地间的通信是否正常,在不正常时执行步骤403,在正常时执行步骤405。Step 402: Monitor whether the current local and remote communication is normal, execute
本步骤中,监测的方法可以具体为:由本地侧装置中的心跳消息处理模块,定期向异地侧装置发送心跳消息,如果能够接收到异地侧装置返回的心跳响应,认为本地和异地间的通信正常,否则认为不正常。In this step, the monitoring method can be specifically as follows: the heartbeat message processing module in the local side device periodically sends heartbeat messages to the remote side device, and if the heartbeat response returned by the remote side device can be received, it is considered that the communication between the local side and the remote side normal, otherwise considered abnormal.
步骤403:将读取的逻辑日志写入逻辑日志缓存磁盘,并继续监测本地和异地间的通信。Step 403: Write the read logical log to the logical log cache disk, and continue to monitor the communication between the local and remote locations.
本步骤中,已在步骤402中判断本地和异地间的通信不正常,则无法将从缓存中读取的逻辑日志直接发送到异地侧,这时本地侧装置中的逻辑日志读取模块可以将读取的逻辑日志,发送到逻辑日志缓存磁盘存储,逻辑日志在逻辑日志缓存磁盘中的存储结构可以与在缓存区中的存储结构相同。可以由本地侧装置中的心跳消息处理模块继续检测本地和异地间的通信是否正常。In this step, if it has been judged in
步骤404:本地和异地间的通信恢复正常时,发送逻辑日志缓存磁盘中的逻辑日志。Step 404: When the communication between the local and remote places returns to normal, send the logical logs in the logical log cache disk.
本步骤中,在本地和异地间的通信恢复正常后,本地侧装置中的收发模块首先把通信不正常时,写入逻辑日志缓存磁盘的逻辑日志发送到异地侧,在此发送的过程中,本地侧装置中的逻辑日志读取模块将新读取的逻辑日志继续写入逻辑日志缓存磁盘,直到将逻辑日志缓存磁盘上的最后一个逻辑日志发送到异地侧,新读取的逻辑日志就不在写入,而是直接发送到异地侧。除了上述发送逻辑日志的方式之外,本地侧装置中的收发模块对缓存区和逻辑日志缓存磁盘上的逻辑日志,也可以按照任意顺序发送,异地侧装置根据逻辑日志标识,自主将接收到的逻辑日志进行排序。In this step, after the communication between the local and remote locations returns to normal, the transceiver module in the local device first sends the logical logs written to the logical log cache disk to the remote side when the communication is abnormal. During the sending process, The logical log reading module in the local device continues to write the newly read logical log to the logical log cache disk until the last logical log on the logical log cache disk is sent to the remote side, and the newly read logical log is no longer there. written, but sent directly to the offsite side. In addition to the above-mentioned method of sending logical logs, the transceiver module in the local device can also send the logical logs in the buffer area and the logical log cache disk in any order, and the remote device automatically sends the received logical logs according to the logical log identifier. Logical logs are sorted.
步骤405:发送读取的逻辑日志。Step 405: Send the read logical log.
本步骤中,已在步骤402中判断本地和异地间的通信正常,则可以直接由本地侧装置中的收发模块从缓存区中读取逻辑日志,发送到异地侧装置。In this step, if it is determined in
为了防止逻辑日志占用的存储空间过大,当接收到异地侧装置返回的确认消息时,上述图4所示流程还可以包括:In order to prevent the storage space occupied by the logical log from being too large, when receiving the confirmation message returned by the device on the remote side, the above process shown in Figure 4 may also include:
步骤406:接收返回的确认消息,删除已正确发送的逻辑日志。Step 406: Receive the returned confirmation message, and delete the logical log that has been sent correctly.
本步骤中,由本地侧装置中的收发模块接收异地侧装置返回的确认消息,该确认消息中可以包括已正确接收的逻辑日志的标识,例如已经介绍过的逻辑日志的logid,本地侧装置中的逻辑日志删除模块,根据所述标识,将缓存区或逻辑日志缓存磁盘中对应的逻辑日志删除。如果发送到异地侧装置的逻辑日志仅包括从缓存区发送的,则只需删除缓存区中的逻辑日志,如果发送到异地侧装置的逻辑日志还包括从逻辑日志缓存磁盘发送的,还需删除逻辑日志缓存磁盘中的逻辑日志。删除的方法具体可以为:异地侧装置返回的确认消息中包括代表逻辑日志的logid,遍历系统日志表,将buffer的头部中的flag为full,并且其中保存的最大logid小于确认消息中携带的logid的记录删除。In this step, the transceiver module in the local side device receives the confirmation message returned by the remote side device, which may include the identifier of the logical log that has been correctly received, such as the logid of the logical log that has been introduced, in the local side device The logical log deletion module deletes the corresponding logical log in the cache area or the logical log cache disk according to the identification. If the logical logs sent to the off-site device only include those sent from the cache area, you only need to delete the logical logs in the cache area; if the logical logs sent to the off-site device also include those sent from the logical log cache disk, you also need to delete them Logical logs cache logical logs on disk. The specific deletion method can be as follows: the confirmation message returned by the remote side device includes the logid representing the logical log, traverses the system log table, sets the flag in the buffer header to full, and the maximum logid stored in it is smaller than the one carried in the confirmation message The record of logid is deleted.
以上步骤401~步骤406描述了在本地,逻辑日志的发送流程,如果从系统程序层面来看,可以创建一个容灾通信进程,由该容灾通信进程完成步骤401~步骤406。The
图5为本发明实施例内存数据库远程容灾的方法中的日志接收流程图,该流程主要描述在异地,如何接收并存储接收到的逻辑日志。图5所示流程包括:FIG. 5 is a flow chart of log receiving in the method for remote disaster recovery of in-memory database according to the embodiment of the present invention. The flow mainly describes how to receive and store the received logical logs in different places. The process shown in Figure 5 includes:
步骤501:接收逻辑日志。Step 501: Receive logical logs.
本步骤中,异地侧装置中的收发模块接收来自本地侧装置的逻辑日志。In this step, the transceiver module in the remote device receives the logic log from the local device.
步骤502:判断当前是否正在进行将容灾内存数据库中的数据存储到镜像磁盘,如果不是,则执行步骤503,否则执行步骤504。Step 502: Determine whether the data in the disaster recovery memory database is currently being stored to the mirror disk, if not, execute
本步骤中,异地侧装置中的磁盘镜像模块内部,标志位设置模块,根据执行模块当前是否将容灾内存数据库模块中的数据存储到镜像磁盘,设置标识执行模块操作的标志位。本步骤中的判断由异地侧装置中的判定模块,根据上述磁盘镜像模块中的标志位,得出当前是否正在进行将容灾内存数据库中的数据存储到镜像磁盘的判定结果。In this step, inside the disk mirroring module in the remote side device, the flag bit setting module sets the flag bit identifying the operation of the execution module according to whether the execution module currently stores the data in the disaster recovery memory database module to the mirror disk. The judgment in this step is determined by the judging module in the off-site device, according to the flags in the above-mentioned disk mirroring module, to obtain the judging result whether the data in the disaster recovery memory database is currently being stored to the mirror disk.
步骤503:将逻辑日志写入镜像磁盘中当前正常通信时的逻辑日志文件中,然后执行步骤505。Step 503: Write the logical log into the current logical log file in normal communication in the mirror disk, and then execute
本步骤中,异地侧装置中的收发模块将逻辑日志写入镜像磁盘中,当前正常通信时的逻辑日志文件中,并将逻辑日志写入缓存模块中。In this step, the transceiver module in the remote device writes the logical log into the mirror disk, the logical log file in the current normal communication, and writes the logical log into the cache module.
步骤504:将逻辑日志写入镜像磁盘中当前磁盘镜像进行中的逻辑日志文件中。Step 504: Write the logical log into the logical log file in the current disk mirroring process in the mirrored disk.
本步骤中,由异地侧装置中的收发模块将逻辑日志写入镜像磁盘中当前镜像进行中的逻辑日志文件中,并将逻辑日志再写入缓存模块中。In this step, the transceiver module in the remote device writes the logical log into the logical log file currently being mirrored in the mirror disk, and then writes the logical log into the cache module.
上述步骤503和步骤504中,当前正常通信时的逻辑日志文件和当前磁盘镜像进行中的逻辑日志文件,为镜像磁盘中的两个文件,建立的目的是为了区分磁盘镜像进行之前和进行中,逻辑日志在镜像磁盘中的不同存储位置。In the
步骤505:发送逻辑日志正确接收的确认消息,该消息中可以携带已正确接收的逻辑日志的标识,例如logid。本地侧装置接收到该确认消息后,可以将异地侧装置已正确接收的逻辑日志删除,以节省存储空间。Step 505: Send a confirmation message for correct receipt of the logical log, and the message may carry the identifier of the logical log that has been received correctly, such as logid. After receiving the acknowledgment message, the local device may delete the logical logs that have been correctly received by the remote device to save storage space.
本步骤中,异地侧装置中的收发模块,向本地侧装置返回逻辑日志正确接收的确认消息。In this step, the transceiver module in the remote device returns a confirmation message that the logical log is received correctly to the local device.
步骤506:执行逻辑日志,更新容灾内存数据库中的数据。Step 506: Execute the logical log to update the data in the disaster recovery memory database.
本步骤中,异地侧装置中的数据同步模块,从缓存模块中读取逻辑日志并执行,用执行的结果更新容灾内存数据库中的数据。In this step, the data synchronization module in the remote device reads and executes the logical log from the cache module, and updates the data in the disaster recovery memory database with the execution result.
上述步骤501~步骤506描述了异地的逻辑日志接收流程,如果从系统程序层面,可以创建容灾通信进程、数据同步进程和磁盘镜像进程。其中步骤501、步骤503、步骤504和步骤505由容灾通信进程完成;步骤506由数据同步进程完成;而将容灾数据库中的数据存储到镜像磁盘,可以由磁盘镜像完成,因此步骤502中的判断步骤可以由容灾通信进程和磁盘镜像进程共同完成,例如磁盘镜像进程设置一个握手标志位,由容灾通信进程与磁盘镜像进程握手,根据标志位来判断当前是否正在进行将容灾内存数据库中的数据存储到镜像磁盘。The
图6为本发明实施例内存数据库远程容灾的方法中的磁盘镜像流程图,该流程主要描述在异地,如何将容灾内存数据库中的数据存储到镜像磁盘中。6 is a flow chart of disk mirroring in the method for remote disaster recovery of an in-memory database according to an embodiment of the present invention. The process mainly describes how to store data in a disaster-tolerant in-memory database in a mirrored disk in a different place.
步骤601:将容灾内存数据库中的数据形成镜像文件。Step 601: Form a mirror file with data in the disaster recovery memory database.
本步骤中,可以将容灾内存数据库中的数据分别以内存块的身份标识(ID)作为文件名,形成多个镜像文件,上述形成镜像文件,可以是预设镜像时间间隔,按照该镜像时间间隔定期将容灾内存数据库中的数据形成镜像文件,由异地侧装置中的磁盘镜像模块完成。In this step, the data in the disaster recovery memory database can be used as the file name of the memory block respectively to form a plurality of mirror files. The above-mentioned formation of mirror files can be a preset mirror time interval. The data in the disaster recovery memory database is formed into a mirror file at regular intervals, which is completed by the disk mirroring module in the remote side device.
步骤602:将镜像文件写入镜像磁盘中。Step 602: Write the image file into the image disk.
本步骤中,还可以按照步骤601中设置的镜像时间间隔,在镜像文件形成后,由异地侧装置中的磁盘镜像模块将镜像文件写入镜像磁盘中。在将镜像文件写入镜像磁盘的过程中,将当前正常通信时的逻辑日志文件改名到旧目录下,上述旧目录是为了标识磁盘镜像的时间点而设置,即开始磁盘镜像时,就将当前正常通信时的逻辑日志文件改名到旧目录下,在后续步骤中,如果磁盘镜像成功,则将旧目录下的当前正常通信时的逻辑日志文件删除,如果磁盘镜像失败,可以将旧目录下当前正常通信时的逻辑日志文件恢复。In this step, according to the mirroring time interval set in
步骤603:镜像成功时,将镜像前的逻辑日志文件和镜像文件从镜像磁盘中删除,镜像失败时,将上一次镜像成功的镜像文件作为当前镜像文件。Step 603: When the mirroring is successful, delete the logical log file and the mirroring file before the mirroring from the mirroring disk, and when the mirroring fails, use the mirroring file that was successfully mirrored last time as the current mirroring file.
本步骤中,逻辑日志在镜像磁盘中的存储位置,根据镜像正在进行与否会有所不同,这里的镜像前的逻辑日志文件,指的就是当前正常通信时的逻辑日志文件,而删除指的是将当前正常通信时的逻辑日志文件和已存储的镜像文件从镜像磁盘中删除,也可以将此从镜像磁盘中删除的文件另外备份到单独的磁盘中,而释放镜像磁盘的存储空间。当前镜像磁盘进行中的逻辑日志文件,在下一次写入逻辑日志时,将作为正常通信时的逻辑日志文件存储新写入的逻辑日志文件,当新的磁盘镜像过程又开始时,可以重新建立一个文件作为磁盘镜像进行中的逻辑日志文件,存储磁盘镜像过程中新写入的逻辑日志。In this step, the storage location of the logical log in the mirrored disk will be different depending on whether the mirroring is in progress. It is to delete the logical log files and stored mirror files from the mirror disk during the current normal communication, or back up the files deleted from the mirror disk to a separate disk to release the storage space of the mirror disk. The logical log file in the current mirroring disk will be used as the logical log file during normal communication to store the newly written logical log file when the logical log is written next time. When the new disk mirroring process starts again, a new logical log file can be recreated. The file is used as a logical log file in the process of disk mirroring, and stores the newly written logical log during the disk mirroring process.
上述步骤601~步骤603描述了异地的磁盘镜像流程。从系统程序层面来看,步骤601~步骤603由创建的磁盘镜像进程完成,该磁盘镜像进程与图5所示流程中设置的磁盘镜像进程相同。
图7为本发明实施例内存数据库远程容灾的方法中的容灾内存数据库恢复流程图,主要描述了在异地,当容灾内存数据库出现故障时,如何使用镜像磁盘中存储的数据和逻辑日志恢复容灾内存数据库,使之能够及时恢复并接管业务系统,处理业务请求。图7所示流程均由异地侧装置中的磁盘镜像模块完成,该流程包括:Fig. 7 is the recovery flowchart of the disaster recovery memory database in the method for remote disaster recovery of the memory database according to the embodiment of the present invention, which mainly describes how to use the data and logical logs stored in the mirror disk when the disaster recovery memory database fails in a different place Restore the disaster recovery memory database so that it can recover and take over the business system in time to process business requests. The processes shown in Figure 7 are all completed by the disk mirroring module in the remote device, and the process includes:
步骤701:将镜像磁盘中存储的容灾内存数据库数据直接恢复到容灾内存数据库中。Step 701: directly restore the disaster recovery memory database data stored in the mirror disk to the disaster recovery memory database.
步骤702:根据恢复到容灾内存数据库中的数据重建索引。Step 702: Rebuild the index according to the data restored to the disaster recovery memory database.
步骤703:根据镜像磁盘中存储的逻辑日志,更新恢复后的容灾内存数据库中的数据。Step 703: Update the data in the restored disaster recovery memory database according to the logical log stored in the mirror disk.
本步骤中,当容灾内存数据库也出现故障时,可以使用镜像磁盘中存储的数据来恢复容灾内存数据库,但由于将容灾数据库中的数据存储到镜像磁盘与容灾内存数据库中的数据更新往往为异步操作,因此镜像磁盘中存储的数据可能与容灾内存数据库出现故障时数据的状态并不一致,这时就需要结合镜像磁盘中存储的逻辑日志,对由镜像磁盘恢复的数据进行更新,使这些数据与容灾内存数据库出现故障时的状态同步,从而实现将容灾内存数据库恢复到故障出现前的状态。In this step, when the disaster recovery memory database also fails, the data stored in the mirror disk can be used to restore the disaster recovery memory database, but since the data in the disaster recovery database is stored in the mirror disk and the data in the disaster recovery memory database Updates are often asynchronous, so the data stored in the mirror disk may not be consistent with the state of the data when the disaster recovery memory database fails. In this case, it is necessary to combine the logical logs stored in the mirror disk to update the data restored by the mirror disk , so that these data are synchronized with the state when the disaster recovery memory database fails, so as to restore the disaster recovery memory database to the state before the failure occurs.
步骤701~步骤703描述了容灾内存数据库恢复流程,如果在系统程序层面来看,步骤701~步骤703仍由磁盘镜像进程完成,该磁盘镜像进程与图5和图6所示流程中的磁盘镜像进程相同。
综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。To sum up, the above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (19)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB200710149582XA CN100562858C (en) | 2007-09-12 | 2007-09-12 | Method, device and system for remote disaster recovery of memory database |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB200710149582XA CN100562858C (en) | 2007-09-12 | 2007-09-12 | Method, device and system for remote disaster recovery of memory database |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101118509A true CN101118509A (en) | 2008-02-06 |
| CN100562858C CN100562858C (en) | 2009-11-25 |
Family
ID=39054637
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB200710149582XA Expired - Fee Related CN100562858C (en) | 2007-09-12 | 2007-09-12 | Method, device and system for remote disaster recovery of memory database |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100562858C (en) |
Cited By (37)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101826984A (en) * | 2010-04-08 | 2010-09-08 | 中兴通讯股份有限公司 | Log information processing method and device thereof |
| CN102024051A (en) * | 2010-12-17 | 2011-04-20 | 北京世纪互联工程技术服务有限公司 | Data updating method for distributed memory database |
| CN101414946B (en) * | 2008-11-21 | 2011-11-16 | 上海爱数软件有限公司 | Method and medium server for remote data backup |
| CN102279885A (en) * | 2011-08-16 | 2011-12-14 | 中兴通讯股份有限公司 | Method and device for operating data by memory database |
| CN102385637A (en) * | 2011-12-22 | 2012-03-21 | 山东中创软件商用中间件股份有限公司 | Backup method and system for database information |
| WO2012071920A1 (en) * | 2010-12-02 | 2012-06-07 | 华为技术有限公司 | Method, system, token conreoller and memory database for implementing distribute-type main memory database system |
| CN102541691A (en) * | 2011-12-27 | 2012-07-04 | 北京人大金仓信息技术股份有限公司 | Log check point recovery method applied to memory data base OLTP (online transaction processing) |
| CN102708150A (en) * | 2012-04-12 | 2012-10-03 | 华为技术有限公司 | Method, device and system for asynchronously copying data |
| CN102043686B (en) * | 2009-10-20 | 2012-11-14 | 华为技术有限公司 | Disaster tolerance method, backup server and system of memory database |
| CN102801748A (en) * | 2011-05-23 | 2012-11-28 | 中兴通讯股份有限公司 | Call protection method and device |
| CN103138912A (en) * | 2011-12-05 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Data synchronizing method and data synchronizing system |
| CN103226502A (en) * | 2013-05-21 | 2013-07-31 | 中国工商银行股份有限公司 | Data disaster backup control system and data recovery method |
| CN103345470A (en) * | 2013-05-31 | 2013-10-09 | 深圳市沃信科技有限公司 | Database disaster tolerance method, database disaster tolerance system and server |
| CN103368767A (en) * | 2012-04-02 | 2013-10-23 | 国际商业机器公司 | Method and system for efficient application management in a cloud with failures |
| US8639720B2 (en) | 2010-01-29 | 2014-01-28 | International Business Machines Corporation | Data access method and configuration management database system |
| CN103914359A (en) * | 2012-12-31 | 2014-07-09 | 中国移动通信集团浙江有限公司 | Data recovery method and device |
| CN103929320A (en) * | 2013-01-15 | 2014-07-16 | 中国银联股份有限公司 | An Integrated Platform for IT System Disaster Recovery |
| CN104156360A (en) * | 2013-05-13 | 2014-11-19 | 阿里巴巴集团控股有限公司 | Service data processing method and system |
| CN104216802A (en) * | 2014-09-25 | 2014-12-17 | 北京金山安全软件有限公司 | Memory database recovery method and device |
| CN104993940A (en) * | 2015-05-11 | 2015-10-21 | 广东小天才科技有限公司 | Method and device for reducing data loss in main/standby node fault switching process |
| CN105468475A (en) * | 2015-11-16 | 2016-04-06 | 北京奇虎科技有限公司 | Backup method and backup device of database |
| CN105487940A (en) * | 2015-11-18 | 2016-04-13 | 华为技术有限公司 | Data recovery methods on disaster recovery end, production end and between them |
| WO2016058333A1 (en) * | 2014-10-15 | 2016-04-21 | 中兴通讯股份有限公司 | Data recovery method and device for database, and computer storage medium |
| CN106407039A (en) * | 2016-08-30 | 2017-02-15 | 广州鼎甲计算机科技有限公司 | Method for recovering Domino database to specified time point by different machine |
| CN106484568A (en) * | 2016-09-30 | 2017-03-08 | 郑州云海信息技术有限公司 | A kind of data disaster backup method and its system |
| CN106713393A (en) * | 2015-11-13 | 2017-05-24 | 阿里巴巴集团控股有限公司 | Data write-in method and write-in apparatus |
| CN107153649A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | A kind of data back up method and device |
| CN107391192A (en) * | 2017-07-21 | 2017-11-24 | 郑州云海信息技术有限公司 | A kind of database server upgrade method and device |
| CN107665219A (en) * | 2016-07-28 | 2018-02-06 | 华为技术有限公司 | A kind of blog management method and device |
| CN110162153A (en) * | 2019-04-16 | 2019-08-23 | 上海马小修智能科技有限公司 | A kind of data disaster tolerance switching system |
| CN112506702A (en) * | 2020-12-03 | 2021-03-16 | 平安科技(深圳)有限公司 | Data center disaster tolerance method, device, equipment and storage medium |
| CN112631834A (en) * | 2020-12-27 | 2021-04-09 | 西安和行无限信息科技有限公司 | Method and device for disaster recovery backup data of cluster file system in different places |
| CN113434525A (en) * | 2021-06-24 | 2021-09-24 | 青岛海尔科技有限公司 | Cache data updating method and device, storage medium and electronic device |
| CN113626475A (en) * | 2020-05-07 | 2021-11-09 | 青岛奥利普自动化控制系统有限公司 | Data recovery method and system based on cache server |
| CN113806143A (en) * | 2018-05-11 | 2021-12-17 | 创新先进技术有限公司 | Remote disaster recovery method, system and electronic equipment |
| CN115174596A (en) * | 2022-07-27 | 2022-10-11 | 济南浪潮数据技术有限公司 | Equipment remote copying method, device and medium |
| WO2024119853A1 (en) * | 2022-12-06 | 2024-06-13 | 北京奥星贝斯科技有限公司 | Database disaster recovery system, method and apparatus, and storage medium and electronic device |
-
2007
- 2007-09-12 CN CNB200710149582XA patent/CN100562858C/en not_active Expired - Fee Related
Cited By (52)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101414946B (en) * | 2008-11-21 | 2011-11-16 | 上海爱数软件有限公司 | Method and medium server for remote data backup |
| CN102043686B (en) * | 2009-10-20 | 2012-11-14 | 华为技术有限公司 | Disaster tolerance method, backup server and system of memory database |
| US8639720B2 (en) | 2010-01-29 | 2014-01-28 | International Business Machines Corporation | Data access method and configuration management database system |
| CN101826984A (en) * | 2010-04-08 | 2010-09-08 | 中兴通讯股份有限公司 | Log information processing method and device thereof |
| WO2012071920A1 (en) * | 2010-12-02 | 2012-06-07 | 华为技术有限公司 | Method, system, token conreoller and memory database for implementing distribute-type main memory database system |
| CN102024051A (en) * | 2010-12-17 | 2011-04-20 | 北京世纪互联工程技术服务有限公司 | Data updating method for distributed memory database |
| CN102024051B (en) * | 2010-12-17 | 2012-12-05 | 北京世纪互联工程技术服务有限公司 | Data updating method for distributed memory database |
| CN102801748A (en) * | 2011-05-23 | 2012-11-28 | 中兴通讯股份有限公司 | Call protection method and device |
| CN102279885A (en) * | 2011-08-16 | 2011-12-14 | 中兴通讯股份有限公司 | Method and device for operating data by memory database |
| CN103138912B (en) * | 2011-12-05 | 2016-08-03 | 阿里巴巴集团控股有限公司 | Method of data synchronization and system |
| CN103138912A (en) * | 2011-12-05 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Data synchronizing method and data synchronizing system |
| CN102385637A (en) * | 2011-12-22 | 2012-03-21 | 山东中创软件商用中间件股份有限公司 | Backup method and system for database information |
| CN102541691A (en) * | 2011-12-27 | 2012-07-04 | 北京人大金仓信息技术股份有限公司 | Log check point recovery method applied to memory data base OLTP (online transaction processing) |
| CN102541691B (en) * | 2011-12-27 | 2015-01-28 | 北京人大金仓信息技术股份有限公司 | Log check point recovery method applied to memory data base OLTP (online transaction processing) |
| CN103368767A (en) * | 2012-04-02 | 2013-10-23 | 国际商业机器公司 | Method and system for efficient application management in a cloud with failures |
| CN103368767B (en) * | 2012-04-02 | 2016-08-24 | 国际商业机器公司 | For disposing the method and system of software application in the Internet cloud of fault tolerant |
| CN102708150A (en) * | 2012-04-12 | 2012-10-03 | 华为技术有限公司 | Method, device and system for asynchronously copying data |
| CN103914359B (en) * | 2012-12-31 | 2017-09-26 | 中国移动通信集团浙江有限公司 | A kind of data reconstruction method and device |
| CN103914359A (en) * | 2012-12-31 | 2014-07-09 | 中国移动通信集团浙江有限公司 | Data recovery method and device |
| WO2014110994A1 (en) * | 2013-01-15 | 2014-07-24 | 中国银联股份有限公司 | Integrated platform for disaster recovery of it system |
| CN103929320A (en) * | 2013-01-15 | 2014-07-16 | 中国银联股份有限公司 | An Integrated Platform for IT System Disaster Recovery |
| CN104156360B (en) * | 2013-05-13 | 2018-01-02 | 阿里巴巴集团控股有限公司 | Business data processing method and system |
| CN104156360A (en) * | 2013-05-13 | 2014-11-19 | 阿里巴巴集团控股有限公司 | Service data processing method and system |
| CN103226502B (en) * | 2013-05-21 | 2015-08-19 | 中国工商银行股份有限公司 | A kind of data calamity is for control system and data reconstruction method |
| CN103226502A (en) * | 2013-05-21 | 2013-07-31 | 中国工商银行股份有限公司 | Data disaster backup control system and data recovery method |
| CN103345470A (en) * | 2013-05-31 | 2013-10-09 | 深圳市沃信科技有限公司 | Database disaster tolerance method, database disaster tolerance system and server |
| CN103345470B (en) * | 2013-05-31 | 2016-05-25 | 深圳市沃信科技有限公司 | A kind of database disaster recovery method, system and server |
| CN104216802A (en) * | 2014-09-25 | 2014-12-17 | 北京金山安全软件有限公司 | Memory database recovery method and device |
| CN104216802B (en) * | 2014-09-25 | 2017-05-10 | 北京金山安全软件有限公司 | Memory database recovery method and device |
| WO2016058333A1 (en) * | 2014-10-15 | 2016-04-21 | 中兴通讯股份有限公司 | Data recovery method and device for database, and computer storage medium |
| CN104993940A (en) * | 2015-05-11 | 2015-10-21 | 广东小天才科技有限公司 | Method and device for reducing data loss in main/standby node fault switching process |
| CN106713393A (en) * | 2015-11-13 | 2017-05-24 | 阿里巴巴集团控股有限公司 | Data write-in method and write-in apparatus |
| CN105468475A (en) * | 2015-11-16 | 2016-04-06 | 北京奇虎科技有限公司 | Backup method and backup device of database |
| CN105487940B (en) * | 2015-11-18 | 2019-04-05 | 华为技术有限公司 | Disaster recovery side, production side and data recovery methods between the two |
| CN105487940A (en) * | 2015-11-18 | 2016-04-13 | 华为技术有限公司 | Data recovery methods on disaster recovery end, production end and between them |
| CN107153649A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | A kind of data back up method and device |
| CN107153649B (en) * | 2016-03-02 | 2020-06-30 | 阿里巴巴集团控股有限公司 | Data backup method and device |
| CN107665219A (en) * | 2016-07-28 | 2018-02-06 | 华为技术有限公司 | A kind of blog management method and device |
| CN106407039A (en) * | 2016-08-30 | 2017-02-15 | 广州鼎甲计算机科技有限公司 | Method for recovering Domino database to specified time point by different machine |
| CN106484568A (en) * | 2016-09-30 | 2017-03-08 | 郑州云海信息技术有限公司 | A kind of data disaster backup method and its system |
| CN107391192A (en) * | 2017-07-21 | 2017-11-24 | 郑州云海信息技术有限公司 | A kind of database server upgrade method and device |
| CN113806143A (en) * | 2018-05-11 | 2021-12-17 | 创新先进技术有限公司 | Remote disaster recovery method, system and electronic equipment |
| CN113806143B (en) * | 2018-05-11 | 2024-04-26 | 创新先进技术有限公司 | Remote disaster recovery method, system and electronic equipment |
| CN110162153A (en) * | 2019-04-16 | 2019-08-23 | 上海马小修智能科技有限公司 | A kind of data disaster tolerance switching system |
| CN113626475A (en) * | 2020-05-07 | 2021-11-09 | 青岛奥利普自动化控制系统有限公司 | Data recovery method and system based on cache server |
| CN112506702B (en) * | 2020-12-03 | 2024-02-23 | 平安科技(深圳)有限公司 | Disaster recovery method, device, equipment and storage medium for data center |
| CN112506702A (en) * | 2020-12-03 | 2021-03-16 | 平安科技(深圳)有限公司 | Data center disaster tolerance method, device, equipment and storage medium |
| CN112631834A (en) * | 2020-12-27 | 2021-04-09 | 西安和行无限信息科技有限公司 | Method and device for disaster recovery backup data of cluster file system in different places |
| CN113434525A (en) * | 2021-06-24 | 2021-09-24 | 青岛海尔科技有限公司 | Cache data updating method and device, storage medium and electronic device |
| CN113434525B (en) * | 2021-06-24 | 2023-06-09 | 青岛海尔科技有限公司 | Method and device for updating cached data, storage medium and electronic device |
| CN115174596A (en) * | 2022-07-27 | 2022-10-11 | 济南浪潮数据技术有限公司 | Equipment remote copying method, device and medium |
| WO2024119853A1 (en) * | 2022-12-06 | 2024-06-13 | 北京奥星贝斯科技有限公司 | Database disaster recovery system, method and apparatus, and storage medium and electronic device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN100562858C (en) | 2009-11-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101118509A (en) | Method, device and system for remote disaster recovery of memory database | |
| US7865678B2 (en) | Remote copy system maintaining consistency | |
| US5504861A (en) | Remote data duplexing | |
| US5734818A (en) | Forming consistency groups using self-describing record sets for remote data duplexing | |
| US7225307B2 (en) | Apparatus, system, and method for synchronizing an asynchronous mirror volume using a synchronous mirror volume | |
| US5682513A (en) | Cache queue entry linking for DASD record updates | |
| EP0671686B1 (en) | Synchronous remote data duplexing | |
| JP4833734B2 (en) | Database system, storage device, initial copy method, and log application method | |
| US7487311B2 (en) | System and method for asynchronous backup of virtual disks in a distributed storage array | |
| CN101667181B (en) | Method, device and system for data disaster tolerance | |
| US6701455B1 (en) | Remote copy system with data integrity | |
| US9229970B2 (en) | Methods to minimize communication in a cluster database system | |
| CN103197988A (en) | Data backup and recovery method, device and database system | |
| CN105302667B (en) | High reliability data backup and restoration methods based on aggregated structure | |
| US7490103B2 (en) | Method and system for backing up data | |
| CN102999564B (en) | Write the method for data, device and equipment | |
| CN110188068B (en) | Volume-level backup method and device for guaranteeing consistency of file system data | |
| CN106776130A (en) | A kind of journal recovery method, storage device and memory node | |
| US8762347B1 (en) | Method and apparatus for processing transactional file system operations to enable point in time consistent file data recreation | |
| CN112068992B (en) | Remote data replication method, storage device and storage system | |
| CN102819615A (en) | Database continuous data protection method based on application snapshot | |
| JP6133396B2 (en) | Computer system, server, and data management method | |
| US9087115B1 (en) | Mirror resynchnronization of fixed page length tables for better repair time to high availability in databases | |
| CN101140542A (en) | A Method for Shortening the Write Response Time of Copy-on-Write Snapshots | |
| CN107678892B (en) | Continuous data protection method based on hop recovery chain |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20091125 |