CN106168919A - A kind of database backup method, Apparatus and system - Google Patents
A kind of database backup method, Apparatus and system Download PDFInfo
- Publication number
- CN106168919A CN106168919A CN201610529022.6A CN201610529022A CN106168919A CN 106168919 A CN106168919 A CN 106168919A CN 201610529022 A CN201610529022 A CN 201610529022A CN 106168919 A CN106168919 A CN 106168919A
- Authority
- CN
- China
- Prior art keywords
- type
- record information
- database
- source database
- write operation
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Computer Hardware Design (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供了一种数据库备份方法、装置及系统,该方法包括:根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;根据获取的每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;将压缩后的每一类记录信息发送给源数据库对应的目标数据库。目标数据库根据接收到的记录信息,通过执行对应的写操作,可以实现源数据库的备份。与日志文件相比,压缩后的记录信息的占用空间显著减小,故记录信息的发送可以占用较少的网络资源。因此,本方案能够减少对网络资源的占用。
The invention provides a database backup method, device and system, the method comprising: according to the log file of the source database, obtaining the record information corresponding to each write operation; according to the obtained record information corresponding to each write operation , determine at least one type of record information, and each type of record information corresponds to the same type of write operation; according to the type of write operation corresponding to each type of record information, establish a common index for this type of record information, and for this type of record information Perform compression; send the compressed record information of each type to the target database corresponding to the source database. The target database can back up the source database by performing corresponding write operations according to the received record information. Compared with the log file, the occupied space of the compressed record information is significantly reduced, so the sending of the record information can occupy less network resources. Therefore, this solution can reduce the occupation of network resources.
Description
技术领域technical field
本发明涉及计算机技术领域,特别涉及一种数据库备份方法、装置及系统。The invention relates to the field of computer technology, in particular to a database backup method, device and system.
背景技术Background technique
随着计算机在数据分析应用领域的不断深入,数据库使用需求范围逐步扩大,数据库在应用系统中占有的地位和作用愈加重要。因此,在基于数据库系统的开发使用中,需要注重数据库的安全问题。比如,保障数据库安全的最佳方案就是及时做好数据备份。With the deepening of computers in the field of data analysis applications, the scope of database usage requirements has gradually expanded, and the status and role of databases in application systems has become more and more important. Therefore, in the development and use of database-based systems, it is necessary to pay attention to the security of the database. For example, the best solution to ensure database security is to make timely data backups.
目前,对于源数据库中执行的任意操作,均可以记录在源数据库的日志文件中。通过将该日志文件发送给其他数据库,其他数据库可以根据该日志文件执行同样的操作处理,从而与源数据库保持一致,以实现数据库的备份。Currently, any operation performed in the source database can be recorded in the log file of the source database. By sending the log file to other databases, other databases can perform the same operation and processing according to the log file, so as to maintain consistency with the source database, so as to realize database backup.
由于日志文件的占用空间通常较大,故直接发送日志文件的实现方式会占用较多的网络资源。Since the space occupied by the log file is generally large, the implementation of directly sending the log file will occupy more network resources.
发明内容Contents of the invention
本发明提供了一种数据库备份方法、装置及系统,能够减少对网络资源的占用。The invention provides a database backup method, device and system, which can reduce the occupation of network resources.
为了达到上述目的,本发明是通过如下技术方案实现的:In order to achieve the above object, the present invention is achieved through the following technical solutions:
第一方面,本发明提供了一种数据库备份方法,包括:In a first aspect, the present invention provides a database backup method, comprising:
根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;Obtain the record information corresponding to each write operation in the log file of the source database;
根据获取的所述每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;Determine at least one type of record information according to the acquired record information corresponding to each write operation, and each type of record information corresponds to the same type of write operation;
根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;According to the write operation type corresponding to each type of record information, establish a common index of this type of record information, and compress this type of record information;
将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库。Send the compressed record information of each type to the target database corresponding to the source database.
进一步地,所述写操作类型包括:insert(插入)、update(更新)、delete(删除)、for update(更新)中的至少一种。Further, the write operation type includes: at least one of insert (insert), update (update), delete (delete), and for update (update).
进一步地,所述对该类记录信息进行压缩,包括:根据建立的该类记录信息的共用索引,删除该类记录信息中的与所述共用索引相同的内容,以对该类记录信息进行压缩。Further, the compressing this type of record information includes: according to the established common index of this type of record information, deleting the same content as the common index in this type of record information, so as to compress this type of record information .
进一步地,所述将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库,包括:生成具有固定格式的包括压缩后的每一类记录信息的压缩日志文件,并将所述压缩日志文件发送给所述源数据库对应的目标数据库。Further, the sending the compressed record information of each type to the target database corresponding to the source database includes: generating a compressed log file with a fixed format including the compressed record information of each type, and sending the The compressed log file is sent to the target database corresponding to the source database.
第二方面,本发明提供了一种数据库备份装置,包括:In a second aspect, the present invention provides a database backup device, comprising:
获取单元,用于根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;The obtaining unit is used to obtain the record information corresponding to each write operation in the log file of the source database;
确定单元,用于根据获取的所述每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;A determining unit, configured to determine at least one type of record information according to the acquired record information corresponding to each write operation, and each type of record information corresponds to the same type of write operation;
压缩单元,用于根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;A compression unit, configured to establish a common index for each type of record information according to the type of write operation corresponding to the type of record information, and compress the type of record information;
发送单元,用于将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库。The sending unit is configured to send the compressed record information of each type to the target database corresponding to the source database.
进一步地,所述写操作类型包括:insert、update、delete、for update中的至少一种。Further, the write operation type includes: at least one of insert, update, delete, and for update.
进一步地,所述压缩单元,具体用于根据建立的该类记录信息的共用索引,删除该类记录信息中的与所述共用索引相同的内容,以对该类记录信息进行压缩。Further, the compressing unit is specifically configured to, according to the established common index of this type of record information, delete the same content as the common index in this type of record information, so as to compress this type of record information.
进一步地,所述发送单元,具体用于生成具有固定格式的包括压缩后的每一类记录信息的压缩日志文件,并将所述压缩日志文件发送给所述源数据库对应的目标数据库。Further, the sending unit is specifically configured to generate a compressed log file with a fixed format including compressed record information of each type, and send the compressed log file to the target database corresponding to the source database.
第三方面,本发明提供了一种数据库备份系统,包括:In a third aspect, the present invention provides a database backup system, comprising:
源数据库、与所述源数据库对应的目标数据库,以及上述任一所述的数据库备份装置,其中,A source database, a target database corresponding to the source database, and any of the database backup devices described above, wherein,
所述目标数据库,用于接收所述数据库备份装置发来的压缩后的每一类记录信息;根据所述压缩后的每一类记录信息,执行对应的写操作。The target database is configured to receive the compressed record information of each type sent by the database backup device; and perform a corresponding write operation according to the compressed record information of each type.
进一步地,所述目标数据库,还用于根据预先确定的双向心跳探测机制和心跳请求时间间隔,周期性地向所述源数据库发送心跳请求;接收所述源数据库返回的心跳包;判断所述心跳包中包括的信息是否与预先确定的信息相同,若否,确定所述源数据库出现故障。Further, the target database is also configured to periodically send a heartbeat request to the source database according to a predetermined two-way heartbeat detection mechanism and a heartbeat request time interval; receive a heartbeat packet returned by the source database; determine the Whether the information included in the heartbeat packet is the same as the predetermined information, if not, it is determined that the source database is faulty.
进一步地,所述目标数据库,具体用于接收所述源数据库返回的心跳包,且所述心跳包中携带有所述源数据库对应的MAC(Media Access Control,媒体访问控制)地址;根据接收到的所述源数据库对应的MAC地址和自身对应的MAC地址,执行哈希算法,得到当前的哈希值;判断所述当前的哈希值是否与预先确定的标准值相同,若否,确定所述源数据库出现故障。Further, the target database is specifically configured to receive the heartbeat packet returned by the source database, and the heartbeat packet carries the MAC (Media Access Control, Media Access Control) address corresponding to the source database; according to the received The MAC address corresponding to the source database and the MAC address corresponding to itself, execute the hash algorithm to obtain the current hash value; judge whether the current hash value is the same as the predetermined standard value, if not, determine the The source database is down.
进一步地,所述目标数据库,还用于当判断出未接收到所述源数据库返回的心跳包时,确定当前的心跳请求时间间隔,且所述当前的心跳请求时间间隔小于对应的上一个心跳请求时间间隔,基于所述当前的心跳请求时间间隔,向所述源数据库发送心跳请求,并如此循环;在判断出连续至少两次未接收到所述源数据库返回的心跳包时,确定所述源数据库出现故障。Further, the target database is also used to determine the current heartbeat request time interval when it is determined that the heartbeat packet returned by the source database has not been received, and the current heartbeat request time interval is shorter than the corresponding last heartbeat The request time interval, based on the current heartbeat request time interval, sends a heartbeat request to the source database, and loops like this; when it is judged that the heartbeat packet returned by the source database has not been received at least twice in a row, determine the The source database failed.
本发明提供了一种数据库备份方法、装置及系统,根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;根据获取的每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;将压缩后的每一类记录信息发送给源数据库对应的目标数据库。目标数据库根据接收到的记录信息,通过执行对应的写操作,可以实现源数据库的备份。与日志文件相比,压缩后的记录信息的占用空间显著减小,故记录信息的发送可以占用较少的网络资源。因此,本发明能够减少对网络资源的占用。The present invention provides a database backup method, device and system. According to the log file of the source database, the record information corresponding to each write operation is obtained; according to the obtained record information corresponding to each write operation, the At least one type of record information, and each type of record information corresponds to the same type of write operation; according to the type of write operation corresponding to each type of record information, a common index of this type of record information is established, and the type of record information is compressed; The compressed record information of each type is sent to the target database corresponding to the source database. The target database can back up the source database by performing corresponding write operations according to the received record information. Compared with the log file, the occupied space of the compressed record information is significantly reduced, so the sending of the record information can occupy less network resources. Therefore, the present invention can reduce the occupation of network resources.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明一实施例提供的一种数据库备份方法的流程图;Fig. 1 is a flow chart of a database backup method provided by an embodiment of the present invention;
图2是本发明一实施例提供的另一种数据库备份方法的流程图;Fig. 2 is a flowchart of another database backup method provided by an embodiment of the present invention;
图3是本发明一实施例提供的一种数据库备份装置的示意图;Fig. 3 is a schematic diagram of a database backup device provided by an embodiment of the present invention;
图4是本发明一实施例提供的一种数据库备份系统的示意图。Fig. 4 is a schematic diagram of a database backup system provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the protection of the present invention. scope.
如图1所示,本发明实施例提供了一种数据库备份方法,可以包括以下步骤:As shown in Figure 1, the embodiment of the present invention provides a database backup method, which may include the following steps:
步骤101:根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息。Step 101: Obtain record information corresponding to each write operation in the log file of the source database.
步骤102:根据获取的所述每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型。Step 102: Determine at least one type of record information according to the acquired record information corresponding to each item of write operation, and each type of record information corresponds to the same type of write operation.
步骤103:根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩。Step 103: According to the write operation type corresponding to each type of record information, establish a common index of this type of record information, and compress the type of record information.
步骤104:将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库。Step 104: Send the compressed record information of each type to the target database corresponding to the source database.
本发明实施例提供了一种数据库备份方法,根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;根据获取的每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;将压缩后的每一类记录信息发送给源数据库对应的目标数据库。目标数据库根据接收到的记录信息,通过执行对应的写操作,可以实现源数据库的备份。与日志文件相比,压缩后的记录信息的占用空间显著减小,故记录信息的发送可以占用较少的网络资源。因此,本发明能够减少对网络资源的占用。An embodiment of the present invention provides a database backup method. According to the log file of the source database, the record information corresponding to each write operation is obtained; according to the obtained record information corresponding to each write operation, at least one of them is determined. Each type of record information corresponds to the same type of write operation; according to the type of write operation corresponding to each type of record information, a common index of this type of record information is established, and this type of record information is compressed; the compressed Each type of record information is sent to the target database corresponding to the source database. The target database can back up the source database by performing corresponding write operations according to the received record information. Compared with the log file, the occupied space of the compressed record information is significantly reduced, so the sending of the record information can occupy less network resources. Therefore, the present invention can reduce the occupation of network resources.
在本发明的一个实施例中,所述写操作类型包括:insert、update、delete、forupdate中的至少一种。In an embodiment of the present invention, the write operation type includes: at least one of insert, update, delete, and forupdate.
详细地,写操作对应的SQL(Structured Query Language,结构化查询语言)语句中可以包括insert、update、delete、for update中的至少一种关键字,且每一种关键字对应于一种写操作类型。In detail, the SQL (Structured Query Language, Structured Query Language) statement corresponding to the write operation may include at least one keyword among insert, update, delete, and for update, and each keyword corresponds to a write operation Types of.
在本发明的一个实施例中,为了说明一种记录信息的压缩方式,所以,所述对该类记录信息进行压缩,包括:根据建立的该类记录信息的共用索引,删除该类记录信息中的与所述共用索引相同的内容,以对该类记录信息进行压缩。In an embodiment of the present invention, in order to illustrate a compression method of record information, the compressing this type of record information includes: deleting the The same content as the common index, so as to compress this type of record information.
详细地,通过将同一类记录信息中的与相应共用索引相同的内容进行删除,可以释放该部分内容所占用的空间资源,以使该类记录信息的占用空间量减小。Specifically, by deleting the same content in the same type of record information as the corresponding common index, the space resources occupied by this part of the content can be released, so that the occupied space of this type of record information can be reduced.
在本发明的一个实施例中,所述将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库,包括:生成具有固定格式的包括压缩后的每一类记录信息的压缩日志文件,并将所述压缩日志文件发送给所述源数据库对应的目标数据库。In an embodiment of the present invention, the sending the compressed record information of each type to the target database corresponding to the source database includes: generating a compressed log with a fixed format including the compressed record information of each type file, and send the compressed log file to the target database corresponding to the source database.
详细地,在对每一类记录信息进行压缩操作后,可以生成具有固定格式的压缩日志文件,且该压缩日志文件中可以包括每一类压缩后的记录信息。通过将压缩日志文件发送至目标数据库,目标数据库可以根据该压缩日志文件,执行与源数据库相同的每一项写操作,从而完成从源数据库到目标数据库的备份。In detail, after the compression operation is performed on each type of record information, a compressed log file with a fixed format may be generated, and the compressed log file may include each type of compressed record information. By sending the compressed log file to the target database, the target database can perform every write operation the same as the source database according to the compressed log file, thereby completing the backup from the source database to the target database.
如图2所示,本发明一个实施例提供了另一种数据库备份方法,该方法以基于日志的数据库备份及故障检测管理方法为例,具体包括以下步骤:As shown in Fig. 2, an embodiment of the present invention provides another kind of database backup method, and this method takes database backup and fault detection management method based on log as an example, specifically comprises the following steps:
步骤201:在统一的资源管理平台中创建一个资源管理组,且该资源管理组中包括源数据库和目标数据库。Step 201: Create a resource management group on a unified resource management platform, and the resource management group includes a source database and a target database.
详细地,当需要对源数据库进行备份时,可以将该源数据库和待备份的目标数据库设置于同一资源管理平台的同一资源管理组中。In detail, when the source database needs to be backed up, the source database and the target database to be backed up can be set in the same resource management group on the same resource management platform.
本实施例中,源数据库和目标数据库可以为一对一的对应关系。In this embodiment, the source database and the target database may have a one-to-one correspondence.
此外,在本发明一个实施例中,一个目标数据库可以对应于至少一个源数据库,以实现数据备份的聚合,该目标数据库可以作为每一个源数据库的镜像;以及一个源数据库可以对应于至少一个目标数据库,以实现数据备份的广播,每一个目标数据库均可以作为源数据库的镜像。In addition, in an embodiment of the present invention, a target database can correspond to at least one source database, so as to realize the aggregation of data backup, the target database can be used as a mirror image of each source database; and a source database can correspond to at least one target database to realize the broadcast of data backup, and each target database can be used as a mirror image of the source database.
步骤202:在本地主机上创建与源数据库对应的数据库空间,在目的端主机上创建与目标数据库对应的数据库空间。Step 202: Create a database space corresponding to the source database on the local host, and create a database space corresponding to the target database on the destination host.
为了实现目标数据库对源数据库的备份,可以在一个主机上创建源数据库所需的数据库空间,以及在另一主机上创建目标数据库所需的数据库空间。To implement backup of the target database to the source database, you can create the dbspaces required by the source database on one host and the dbspaces required by the target database on another host.
详细地,创建的目标数据库对应的数据库空间可以不小于创建的源数据库对应的数据库空间。通常情况下,可以设置两个数据库空间大小相等,目标数据库可以为源数据库的实时复制的镜像。In detail, the database space corresponding to the created target database may not be smaller than the database space corresponding to the created source database. Usually, the size of the two database spaces can be set to be equal, and the target database can be a mirror image of the real-time replication of the source database.
如上所述,在本发明一个实施例中,当一个目标数据库对应多个源数据库时,目标数据库的数据库空间应不小于该多个源数据库的数据库空间的总和;当一个源数据库对应多个目标数据库时,每一个目标数据库的数据库空间均应不小于源数据库的数据库空间。As mentioned above, in one embodiment of the present invention, when a target database corresponds to multiple source databases, the database space of the target database should not be less than the sum of the database spaces of the multiple source databases; database, the dbspace of each target database should not be smaller than the dbspace of the source database.
步骤203:获取源数据库的日志文件,并获取该日志文件中的每一项写操作对应的记录信息。Step 203: Obtain the log file of the source database, and obtain the record information corresponding to each write operation in the log file.
详细地,写操作类型可以包括:insert、update、delete、for update中的至少一种。In detail, the write operation type may include: at least one of insert, update, delete, and for update.
由于源数据库的日志文件空间占用量大,直接发送日志文件会占用较多的网络资源,故可以仅提取该日志文件中的必要信息,如可以对写操作对应的记录信息进行截取。Since the log file of the source database occupies a large amount of space, sending the log file directly will occupy more network resources, so only the necessary information in the log file can be extracted, for example, the record information corresponding to the write operation can be intercepted.
步骤204:根据获取的每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型。Step 204: Determine at least one type of record information according to the acquired record information corresponding to each write operation, and each type of record information corresponds to the same type of write operation.
由于不同类型的写操作对应的执行方式不同,故可以将获取到的全部写操作对应的记录信息进行分类。Since different types of write operations correspond to different execution modes, the acquired record information corresponding to all write operations may be classified.
步骤205:根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并根据建立的该共用索引,删除该类记录信息中的与该共用索引相同的内容,以对该类记录信息进行压缩。Step 205: According to the write operation type corresponding to each type of record information, establish a common index of this type of record information, and delete the same content as the common index in this type of record information according to the established common index, so as to Class record information is compressed.
对于每一类记录信息,该类记录信息中的每一项记录信息中均包括相同的索引内容。当具有相同索引内容的记录信息的项数较多时,该索引内容会占用较多的日志资源,故可以根据每一类记录信息中包括的索引内容,建立该类记录信息的共用索引,并将该类记录信息中的与该共用索引相同的索引内容进行筛除,以实现该类记录信息的压缩。For each type of record information, each item of record information in this type of record information includes the same index content. When there are many items of record information with the same index content, the index content will occupy more log resources. Therefore, according to the index content included in each type of record information, a common index of this type of record information can be established, and the In this type of record information, the same index content as the shared index is screened out, so as to realize the compression of this type of record information.
步骤206:生成具有固定格式的包括压缩后的每一类记录信息的压缩日志文件,并将压缩日志文件发送给源数据库对应的目标数据库。Step 206: Generate a compressed log file with a fixed format including compressed record information of each type, and send the compressed log file to the target database corresponding to the source database.
为方便源数据库的实时备份,可以生成压缩日志文件,该压缩日志文件包括压缩后的每一类记录信息,且该压缩日志文件具有系统可识别的固定格式。In order to facilitate the real-time backup of the source database, a compressed log file can be generated, which includes each type of recorded information after compression, and the compressed log file has a fixed format recognizable by the system.
与最初获取的源数据库的日志文件相比,生成的压缩日志文件的数据量大大减小。例如,通常情况下,压缩日志文件的数据量可以为原日志文件的1/4左右。由此可见,压缩日志文件的占用空间大大减小,数据备份时,压缩日志文件的联网传输相应的也会占用较少的基础带宽和网络资源。The resulting compressed log file has a significantly reduced data size compared to the log file originally acquired from the source database. For example, under normal circumstances, the data volume of the compressed log file may be about 1/4 of the original log file. It can be seen that the occupied space of the compressed log file is greatly reduced, and the network transmission of the compressed log file will correspondingly occupy less basic bandwidth and network resources during data backup.
详细地,压缩日志文件的发送可以在亚秒一级的数量级上进行。In detail, the sending of compressed log files can be performed on the order of sub-second level.
步骤207:目标数据库在接收到压缩日志文件时,根据该压缩日志文件执行对应的写操作。Step 207: When receiving the compressed log file, the target database executes a corresponding write operation according to the compressed log file.
详细地,目标数据库可以对接收到的压缩日志文件进行解压缩,并根据解压出的日志执行每一项写操作。通过执行每一项写操作,可以使目标数据库执行与源数据库相同的修改,故实现从源数据库到目标数据库的备份。Specifically, the target database can decompress the received compressed log file, and perform each write operation according to the decompressed log. By performing each write operation, the target database can be modified the same as the source database, so the backup from the source database to the target database can be realized.
本发明实施例中,通过对源数据库的日志文件进行压缩,并将压缩后的日志文件传输至目标数据库,以实现从源数据库至目标数据库的实时备份。这一实现方式可以消耗较少的数据库资源,为数据库的实时同步提供便利,故可以为一种高效的数据库备份方法。In the embodiment of the present invention, the log files of the source database are compressed, and the compressed log files are transmitted to the target database, so as to realize real-time backup from the source database to the target database. This implementation method can consume less database resources and provide convenience for real-time synchronization of the database, so it can be an efficient database backup method.
步骤208:目标数据库根据预先确定的双向心跳探测机制和心跳请求时间间隔,周期性地向源数据库发送心跳请求。Step 208: The target database periodically sends a heartbeat request to the source database according to a predetermined two-way heartbeat detection mechanism and a heartbeat request time interval.
本发明实施例中,可以根据实际需求,确定适宜的心跳请求时间间隔,如10s,即每10s进行一次故障检测,以便于源数据库故障时能够及时检测到该故障情况,并执行相应故障处理。In the embodiment of the present invention, an appropriate heartbeat request time interval can be determined according to actual needs, such as 10s, that is, a fault detection is performed every 10s, so that when the source database fails, the fault can be detected in time and corresponding fault handling can be performed.
步骤209:达到心跳请求时间间隔对应的心跳包接收时间时,目标数据库判断其是否接收到源数据库返回的心跳包,若是,执行步骤212,否则,执行步骤210。Step 209: When the heartbeat packet receiving time corresponding to the heartbeat request time interval is reached, the target database judges whether it has received the heartbeat packet returned by the source database, if so, execute step 212, otherwise, execute step 210.
目标数据库每10s接收一次源数据库发来的心跳包,由于判断源数据库故障可以有两种实现方式:一是连续多次未接收到心跳包,二是接收到的心跳包错误,因此在再次达到10s间隔时,目标数据库首先可以判断其是否接收到心跳包。The target database receives the heartbeat packet from the source database every 10s. There are two ways to determine the failure of the source database: one is that the heartbeat packet has not been received for many times in a row, and the other is that the received heartbeat packet is wrong. At an interval of 10s, the target database can first determine whether it has received a heartbeat packet.
在本发明一个实施例中,同时可以由源数据库向目标数据库发送心跳请求,以判断目标数据库是否出现故障。由于与目标数据库的心跳请求可以基于同一实现原理,故在此不作赘述。In an embodiment of the present invention, at the same time, the source database can send a heartbeat request to the target database to determine whether the target database is faulty. Since the heartbeat request with the target database can be based on the same implementation principle, details are not described here.
在本发明一个实施例中,当一端检测到已达到心跳包接收时间,但未接收到另一端发来的心跳包时,如一端在10s内ping不通对端时,就会发出报警,并记录此时故障情况。In one embodiment of the present invention, when one end detects that the heartbeat packet receiving time has been reached, but does not receive the heartbeat packet sent by the other end, if one end fails to ping the opposite end within 10s, an alarm will be sent and recorded Fault condition at this time.
步骤210:判断是否连续三次未接收到源数据库返回的心跳包,若是,确定源数据库出现故障,并结束当前流程,否则,执行步骤211。Step 210: Determine whether the heartbeat packet returned by the source database has not been received for three consecutive times, if yes, determine that the source database is faulty, and end the current process, otherwise, execute step 211.
本实施例中,可以设定连续三次未接收到心跳包时,即可以认为源数据库出现故障。当然,根据不同的实际需求,同样可以确定为其他连续次数。In this embodiment, it can be set that when the heartbeat packet is not received for three consecutive times, it can be considered that the source database is faulty. Of course, according to different actual needs, it can also be determined as other consecutive times.
当目标数据库判断出未接收到心跳包时,可以进一步判断是否连续三次未接收到心跳包,若判断结果为是,则可以直接确定源数据库出现故障,若判断结果为否,则可以再次尝试获取心跳包。When the target database judges that the heartbeat packet has not been received, it can further judge whether it has not received the heartbeat packet for three consecutive times. If the judgment result is yes, it can directly determine that the source database is faulty. If the judgment result is no, it can try to obtain it again. heartbeat packet.
步骤211:确定当前的心跳请求时间间隔,且当前的心跳请求时间间隔小于对应的上一个心跳请求时间间隔,并基于确定的当前的心跳请求时间间隔,向源数据库发送心跳请求,并执行步骤209。Step 211: Determine the current heartbeat request time interval, and the current heartbeat request time interval is less than the corresponding previous heartbeat request time interval, and based on the determined current heartbeat request time interval, send a heartbeat request to the source database, and execute step 209 .
若当前为第一次未接收到心跳包,则可以确定上一个心跳请求时间间隔为10s,并确定当前的心跳请求时间间隔小于10s,比如为5s,并基于确定的5s为间隔,再次获取心跳包。对应地,若达到5s时间间隔时未接收到心跳包,则当前为第二次未接收到心跳包,则可以确定上一个心跳请求时间间隔为5s,并确定当前的心跳请求时间间隔小于5s,比如为2s,并基于确定的2s为间隔,再次获取心跳包。If the current heartbeat packet is not received for the first time, you can determine that the last heartbeat request interval is 10s, and determine that the current heartbeat request interval is less than 10s, such as 5s, and based on the determined 5s interval, obtain the heartbeat again Bag. Correspondingly, if the heartbeat packet is not received when the time interval of 5s is reached, it is currently the second time that the heartbeat packet has not been received, then it can be determined that the last heartbeat request time interval is 5s, and the current heartbeat request time interval is determined to be less than 5s, For example, it is 2s, and based on the determined 2s interval, the heartbeat packet is obtained again.
因此,本实施例中,可以设置三次均未接收到心跳包所对应的心跳请求时间间隔可以依次为10s、5s和2s。即,当达到10s间隔却未接收到心跳包时,以5s间隔再次获取心跳包,若仍未接收到心跳包,再以2s间隔再次获取心跳包,若这三次均未接收到心跳包,则可以直接确定源数据库出现故障。Therefore, in this embodiment, the heartbeat request time intervals corresponding to no heartbeat packets being received three times may be set to be 10s, 5s, and 2s in sequence. That is, when the heartbeat packet is not received at the 10s interval, the heartbeat packet is obtained again at the interval of 5s. If the heartbeat packet is not received yet, the heartbeat packet is obtained again at the interval of 2s. If the heartbeat packet is not received three times, then It is straightforward to determine that the source database is down.
正常情况下,可以设置相对较长的心跳请求时间间隔,以周期性检测源数据库是否处于正常工作状态。但当检测到未接收到源数据库发来的心跳包时,可以通过心跳请求时间间隔依次递减的实现方式,快速验证源数据库是否出现故障,以便于能够及时发现故障并解除故障。Under normal circumstances, you can set a relatively long heartbeat request interval to periodically check whether the source database is in a normal working state. However, when it is detected that the heartbeat packet from the source database has not been received, the heartbeat request time interval can be reduced in order to quickly verify whether the source database is faulty, so that the fault can be found and resolved in time.
步骤212:目标数据库根据源数据库返回的心跳包,判断该心跳包中包括的信息是否与预先确定的信息相同,若是,确定源数据库工作正常,否则,确定源数据库出现故障。Step 212: The target database judges whether the information included in the heartbeat packet is the same as the predetermined information according to the heartbeat packet returned by the source database, and if so, determines that the source database is working normally; otherwise, determines that the source database is faulty.
当目标数据库接收到心跳包时,可以判断心跳包是否错误。When the target database receives the heartbeat packet, it can determine whether the heartbeat packet is wrong.
详细地,本发明实施例中,源数据库发来的心跳包中可以携带有源数据库对应的MAC地址,目标数据库可以根据接收到的源数据库对应的MAC地址和自身对应的MAC地址,执行哈希算法,得到当前的哈希值。然后,判断得到的当前的哈希值是否与预先确定的标准值相同,若是,可以确定源数据库工作正常,否则,可以确定源数据库出现故障。In detail, in the embodiment of the present invention, the heartbeat packet sent by the source database may carry the MAC address corresponding to the source database, and the target database may perform hashing according to the received MAC address corresponding to the source database and its own corresponding MAC address. Algorithm to get the current hash value. Then, it is judged whether the obtained current hash value is the same as the predetermined standard value, if so, it can be determined that the source database is working normally, otherwise, it can be determined that the source database is faulty.
在本发明一个实施例中,目标数据库可以向源数据库发送固定内容的心跳包,源数据库可以根据预先确定的数据更改规则,对该固定内容进行固定更改,并将更改后的心跳包发送给目标数据库,若目标数据库判断出该固定更改正确,则可以确定源数据库工作正常,否则,可以确定源数据库出现故障。In one embodiment of the present invention, the target database can send a heartbeat packet with fixed content to the source database, and the source database can perform fixed changes to the fixed content according to predetermined data modification rules, and send the changed heartbeat packet to the target database, if the target database determines that the fixed change is correct, it can be determined that the source database is working normally; otherwise, it can be determined that the source database is faulty.
详细地,数据库间的数据同步和数据库故障检测,可以基于数据库日志、双向心跳机制和两端间的网络通信得以进行。此外,管理人员还可以通过统一的管理平台对整个同步过程进行监控,以及根据管理平台的日志进行异常问题的及时发现和及时处理。这一实现方式可以实现对本地数据库进行镜像复制、异地容灾的高安全和高可用性等功能。Specifically, data synchronization between databases and database failure detection can be performed based on database logs, bidirectional heartbeat mechanism and network communication between the two ends. In addition, managers can also monitor the entire synchronization process through a unified management platform, and detect and deal with abnormal problems in a timely manner according to the logs of the management platform. This implementation method can realize functions such as mirror replication of local databases, high security and high availability of remote disaster recovery.
基于本发明实施例的实现方式,可以在异构的IT基础结构之间实现大量数据亚秒一级的实时复制,其中,该异构的IT基础结构可以包括几乎所有常用操作系统平台和数据库平台。因此,本发明实施例可以在应急系统、在线报表、实时数据仓库供应、交易跟踪、数据同步、集中/分发、容灾、数据库升级和移植、双业务中心等各种场景下进行应用。此外,还可以实现一对一、一对多、多对一、双向、点对点、级联等多种灵活的拓扑结构。Based on the implementation of the embodiment of the present invention, sub-second level real-time replication of a large amount of data can be realized between heterogeneous IT infrastructures, wherein the heterogeneous IT infrastructures can include almost all commonly used operating system platforms and database platforms . Therefore, the embodiments of the present invention can be applied in various scenarios such as emergency systems, online reports, real-time data warehouse supply, transaction tracking, data synchronization, centralization/distribution, disaster recovery, database upgrade and transplantation, and dual business centers. In addition, various flexible topological structures such as one-to-one, one-to-many, many-to-one, two-way, point-to-point, and cascade can be realized.
如图3所示,本发明一个实施例提供了一种数据库备份装置30,包括:As shown in Figure 3, an embodiment of the present invention provides a database backup device 30, including:
获取单元301,用于根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;An acquisition unit 301, configured to acquire record information corresponding to each write operation in the log file of the source database;
确定单元302,用于根据获取的所述每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;A determining unit 302, configured to determine at least one type of record information according to the acquired record information corresponding to each item of write operation, and each type of record information corresponds to the same type of write operation;
压缩单元303,用于根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;The compression unit 303 is configured to, according to the write operation type corresponding to each type of record information, establish a common index of this type of record information, and compress the type of record information;
发送单元304,用于将压缩后的每一类记录信息发送给所述源数据库对应的目标数据库。The sending unit 304 is configured to send the compressed record information of each type to the target database corresponding to the source database.
在本发明一个实施例中,所述写操作类型包括:insert、update、delete、forupdate中的至少一种。In an embodiment of the present invention, the write operation type includes: at least one of insert, update, delete, and forupdate.
在本发明一个实施例中,所述压缩单元303,具体用于根据建立的该类记录信息的共用索引,删除该类记录信息中的与所述共用索引相同的内容,以对该类记录信息进行压缩。In an embodiment of the present invention, the compression unit 303 is specifically configured to delete the same content as the common index in this type of record information according to the established common index of this type of record information, so as to to compress.
在本发明一个实施例中,所述发送单元304,具体用于生成具有固定格式的包括压缩后的每一类记录信息的压缩日志文件,并将所述压缩日志文件发送给所述源数据库对应的目标数据库。In an embodiment of the present invention, the sending unit 304 is specifically configured to generate a compressed log file with a fixed format including compressed record information of each type, and send the compressed log file to the source database corresponding to target database.
如图4所示,本发明实施例提供了一种数据库备份系统,包括:As shown in Figure 4, the embodiment of the present invention provides a kind of database backup system, comprises:
源数据库40、与所述源数据库40对应的目标数据库50,以及上述任一所述的数据库备份装置30,其中,The source database 40, the target database 50 corresponding to the source database 40, and any of the database backup devices 30 described above, wherein,
所述目标数据库50,用于接收所述数据库备份装置30发来的压缩后的每一类记录信息;根据所述压缩后的每一类记录信息,执行对应的写操作。The target database 50 is configured to receive the compressed record information of each type sent from the database backup device 30 ; and perform corresponding write operations according to the compressed record information of each type.
在本发明一个实施例中,一个所述源数据库40可以对应于至少一个所述目标数据库50;以及一个所述目标数据库50可以对应于至少一个所述源数据库40。此外,所述数据库备份装置30可以对应于至少一组所述源数据库40和所述目标数据库50的组合。In an embodiment of the present invention, one source database 40 may correspond to at least one target database 50 ; and one target database 50 may correspond to at least one source database 40 . In addition, the database backup device 30 may correspond to at least one combination of the source database 40 and the target database 50 .
在本发明一个实施例中,所述目标数据库50,进一步用于根据预先确定的双向心跳探测机制和心跳请求时间间隔,周期性地向所述源数据库发送心跳请求;接收所述源数据库返回的心跳包;判断所述心跳包中包括的信息是否与预先确定的信息相同,若否,确定所述源数据库出现故障。In one embodiment of the present invention, the target database 50 is further configured to periodically send a heartbeat request to the source database according to a predetermined two-way heartbeat detection mechanism and a heartbeat request time interval; A heartbeat packet: judging whether the information included in the heartbeat packet is the same as predetermined information, and if not, determining that the source database is faulty.
在本发明一个实施例中,所述目标数据库50,具体用于接收所述源数据库返回的心跳包,且所述心跳包中携带有所述源数据库对应的MAC地址;根据接收到的所述源数据库对应的MAC地址和自身对应的MAC地址,执行哈希算法,得到当前的哈希值;判断所述当前的哈希值是否与预先确定的标准值相同,若否,确定所述源数据库出现故障。In one embodiment of the present invention, the target database 50 is specifically configured to receive the heartbeat packet returned by the source database, and the heartbeat packet carries the MAC address corresponding to the source database; according to the received The MAC address corresponding to the source database and the MAC address corresponding to itself, execute the hash algorithm to obtain the current hash value; judge whether the current hash value is the same as the predetermined standard value, if not, determine the source database error occured.
在本发明一个实施例中,所述目标数据库50,进一步用于当判断出未接收到所述源数据库返回的心跳包时,确定当前的心跳请求时间间隔,且所述当前的心跳请求时间间隔小于对应的上一个心跳请求时间间隔,基于所述当前的心跳请求时间间隔,向所述源数据库发送心跳请求,并如此循环;在判断出连续至少两次未接收到所述源数据库返回的心跳包时,确定所述源数据库出现故障。In one embodiment of the present invention, the target database 50 is further used to determine the current heartbeat request time interval when it is determined that the heartbeat packet returned by the source database has not been received, and the current heartbeat request time interval is less than the corresponding last heartbeat request time interval, based on the current heartbeat request time interval, send a heartbeat request to the source database, and so on; when it is determined that the heartbeat returned by the source database has not been received at least twice in a row package, it was determined that the source database was down.
上述装置内的各单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。The information exchange and execution process among the units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific content can refer to the description in the method embodiment of the present invention, and will not be repeated here.
综上所述,本发明的各个实施例至少具有如下有益效果:In summary, each embodiment of the present invention has at least the following beneficial effects:
1、本发明实施例中,根据源数据库的日志文件,获取其中的每一项写操作对应的记录信息;根据获取的每一项写操作对应的记录信息,确定其中的至少一类记录信息,且每一类记录信息对应于同一写操作类型;根据每一类记录信息对应的写操作类型,建立该类记录信息的共用索引,并对该类记录信息进行压缩;将压缩后的每一类记录信息发送给源数据库对应的目标数据库。目标数据库根据接收到的记录信息,通过执行对应的写操作,可以实现源数据库的备份。与日志文件相比,压缩后的记录信息的占用空间显著减小,故记录信息的发送可以占用较少的网络资源。因此,本发明能够减少对网络资源的占用。1. In the embodiment of the present invention, according to the log file of the source database, the record information corresponding to each write operation is obtained; according to the record information corresponding to each write operation obtained, at least one type of record information is determined, And each type of record information corresponds to the same write operation type; according to the write operation type corresponding to each type of record information, a common index of this type of record information is established, and this type of record information is compressed; each type of compressed The record information is sent to the target database corresponding to the source database. The target database can back up the source database by performing corresponding write operations according to the received record information. Compared with the log file, the occupied space of the compressed record information is significantly reduced, so the sending of the record information can occupy less network resources. Therefore, the present invention can reduce the occupation of network resources.
2、本发明实施例中,通过对源数据库的日志文件进行压缩,并将压缩后的日志文件传输至目标数据库,以实现从源数据库至目标数据库的实时备份。这一实现方式可以消耗较少的数据库资源,为数据库的实时同步提供便利,故可以为一种高效的数据库备份方法。2. In the embodiment of the present invention, the log files of the source database are compressed, and the compressed log files are transmitted to the target database, so as to realize real-time backup from the source database to the target database. This implementation method can consume less database resources and provide convenience for real-time synchronization of the database, so it can be an efficient database backup method.
3、本发明实施例中,正常情况下,可以设置相对较长的心跳请求时间间隔,以周期性检测源数据库是否处于正常工作状态。但当检测到未接收到源数据库发来的心跳包时,可以通过心跳请求时间间隔依次递减的实现方式,快速验证源数据库是否出现故障,以便于能够及时发现故障并解除故障。3. In the embodiment of the present invention, under normal circumstances, a relatively long time interval for heartbeat requests can be set to periodically check whether the source database is in a normal working state. However, when it is detected that the heartbeat packet from the source database has not been received, the heartbeat request time interval can be reduced in order to quickly verify whether the source database is faulty, so that the fault can be found and resolved in time.
4、本发明实施例中,基于本发明实施例的实现方式,可以在异构的IT基础结构之间实现大量数据亚秒一级的实时复制,其中,该异构的IT基础结构可以包括几乎所有常用操作系统平台和数据库平台。因此,本发明实施例可以在应急系统、在线报表、实时数据仓库供应、交易跟踪、数据同步、集中/分发、容灾、数据库升级和移植、双业务中心等各种场景下进行应用。此外,还可以实现一对一、一对多、多对一、双向、点对点、级联等多种灵活的拓扑结构。4. In the embodiment of the present invention, based on the implementation of the embodiment of the present invention, sub-second level real-time replication of a large amount of data can be realized between heterogeneous IT infrastructures, wherein the heterogeneous IT infrastructures can include almost All common operating system platforms and database platforms. Therefore, the embodiments of the present invention can be applied in various scenarios such as emergency systems, online reports, real-time data warehouse supply, transaction tracking, data synchronization, centralization/distribution, disaster recovery, database upgrade and transplantation, and dual business centers. In addition, various flexible topological structures such as one-to-one, one-to-many, many-to-one, two-way, point-to-point, and cascade can be realized.
需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个〃·····”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同因素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储在计算机可读取的存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质中。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned programs can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后需要说明的是:以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。Finally, it should be noted that: the above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610529022.6A CN106168919A (en) | 2016-07-06 | 2016-07-06 | A kind of database backup method, Apparatus and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610529022.6A CN106168919A (en) | 2016-07-06 | 2016-07-06 | A kind of database backup method, Apparatus and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106168919A true CN106168919A (en) | 2016-11-30 |
Family
ID=58066195
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610529022.6A Pending CN106168919A (en) | 2016-07-06 | 2016-07-06 | A kind of database backup method, Apparatus and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106168919A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107491526A (en) * | 2017-08-18 | 2017-12-19 | 国云科技股份有限公司 | A system and method for realizing database synchronization |
| CN109783276A (en) * | 2018-12-19 | 2019-05-21 | 远光软件股份有限公司 | Data backup and recovery device and method based on dedicated compressing card |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1512729A (en) * | 2002-12-31 | 2004-07-14 | 联想(北京)有限公司 | Method for network equipment self adaption load equalization |
| US20100036863A1 (en) * | 2006-05-31 | 2010-02-11 | Storewize Ltd. | Method and system for transformation of logical data objects for storage |
| CN101694637A (en) * | 2009-11-06 | 2010-04-14 | 金蝶软件(中国)有限公司 | Method and system for restoring database |
| CN102385637A (en) * | 2011-12-22 | 2012-03-21 | 山东中创软件商用中间件股份有限公司 | Backup method and system for database information |
| US20130262412A1 (en) * | 2012-03-28 | 2013-10-03 | Brett Derek Hawton | Method and System For Database Transaction Log Compression On SQL Server |
| US20140280197A1 (en) * | 2013-03-13 | 2014-09-18 | Genesys Telecommunications Laboratories, Inc. | Log file management tool |
| CN104111899A (en) * | 2014-07-03 | 2014-10-22 | 北京思特奇信息技术股份有限公司 | Cache data storage method and system and cache data reading method |
| CN104408174A (en) * | 2014-12-12 | 2015-03-11 | 用友软件股份有限公司 | Database routing device and method |
| CN104424314A (en) * | 2013-09-06 | 2015-03-18 | Sap欧洲公司 | Database operation for columnar table database |
| CN105373607A (en) * | 2015-11-13 | 2016-03-02 | 国网智能电网研究院 | Method for compressing SQL access log of power business system |
-
2016
- 2016-07-06 CN CN201610529022.6A patent/CN106168919A/en active Pending
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1512729A (en) * | 2002-12-31 | 2004-07-14 | 联想(北京)有限公司 | Method for network equipment self adaption load equalization |
| US20100036863A1 (en) * | 2006-05-31 | 2010-02-11 | Storewize Ltd. | Method and system for transformation of logical data objects for storage |
| CN101694637A (en) * | 2009-11-06 | 2010-04-14 | 金蝶软件(中国)有限公司 | Method and system for restoring database |
| CN102385637A (en) * | 2011-12-22 | 2012-03-21 | 山东中创软件商用中间件股份有限公司 | Backup method and system for database information |
| US20130262412A1 (en) * | 2012-03-28 | 2013-10-03 | Brett Derek Hawton | Method and System For Database Transaction Log Compression On SQL Server |
| US20140280197A1 (en) * | 2013-03-13 | 2014-09-18 | Genesys Telecommunications Laboratories, Inc. | Log file management tool |
| CN104424314A (en) * | 2013-09-06 | 2015-03-18 | Sap欧洲公司 | Database operation for columnar table database |
| CN104111899A (en) * | 2014-07-03 | 2014-10-22 | 北京思特奇信息技术股份有限公司 | Cache data storage method and system and cache data reading method |
| CN104408174A (en) * | 2014-12-12 | 2015-03-11 | 用友软件股份有限公司 | Database routing device and method |
| CN105373607A (en) * | 2015-11-13 | 2016-03-02 | 国网智能电网研究院 | Method for compressing SQL access log of power business system |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107491526A (en) * | 2017-08-18 | 2017-12-19 | 国云科技股份有限公司 | A system and method for realizing database synchronization |
| CN109783276A (en) * | 2018-12-19 | 2019-05-21 | 远光软件股份有限公司 | Data backup and recovery device and method based on dedicated compressing card |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11221785B2 (en) | Managing replication state for deleted objects | |
| CN103853634B (en) | Disaster recovery system and disaster recovery method | |
| CN108696595A (en) | Distributed type assemblies method of data synchronization, master node, slave node, system and medium | |
| EP4213038A1 (en) | Data processing method and apparatus based on distributed storage, device, and medium | |
| WO2017177941A1 (en) | Active/standby database switching method and apparatus | |
| CN101449269A (en) | Automatic Priority Recovery | |
| CN108076090A (en) | Data processing method and storage management system | |
| JP6475304B2 (en) | Transaction processing method and apparatus | |
| CN110990335B (en) | Log archiving method, device, equipment and computer-readable storage medium | |
| US10133757B2 (en) | Method for managing data using in-memory database and apparatus thereof | |
| CN104243195A (en) | Remote disaster recovery processing method and device | |
| US20180121531A1 (en) | Data Updating Method, Device, and Related System | |
| US11042454B1 (en) | Restoration of a data source | |
| CN110069670A (en) | Purpose data classifying method, device, equipment and computer readable storage medium | |
| WO2017157111A1 (en) | Method, device and system for preventing memory data loss | |
| CN103473328A (en) | MYSQL (my structured query language)-based database cloud and construction method for same | |
| EP3896571B1 (en) | Data backup method, apparatus and system | |
| US10255341B2 (en) | Mode switching in high availability disaster recovery (HADR) systems | |
| CN112650629B (en) | Blockchain index data recovery method, device, equipment and computer storage medium | |
| CN110620798B (en) | Control method, system, equipment and storage medium for FTP connection | |
| CN106168919A (en) | A kind of database backup method, Apparatus and system | |
| CN115168109A (en) | A data recovery method, device, equipment and storage medium | |
| EP3349416B1 (en) | Relationship chain processing method and system, and storage medium | |
| CN113609199A (en) | Database system, server, and storage medium | |
| CN115686368A (en) | Method, system, device and medium for storage expansion of nodes in blockchain network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161130 |