WO2019109514A1 - 一种数据表备份方法、装置、电子设备及介质 - Google Patents
一种数据表备份方法、装置、电子设备及介质 Download PDFInfo
- Publication number
- WO2019109514A1 WO2019109514A1 PCT/CN2018/074847 CN2018074847W WO2019109514A1 WO 2019109514 A1 WO2019109514 A1 WO 2019109514A1 CN 2018074847 W CN2018074847 W CN 2018074847W WO 2019109514 A1 WO2019109514 A1 WO 2019109514A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- backup
- field
- configuration information
- data
- information
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Definitions
- the present application belongs to the field of data processing technologies, and in particular, to a data table backup method, device, electronic device and medium.
- the existing data analysis system performs the backup of the batch data table
- all the backup parts of the data table to be backed up selected by the user are directly backed up to the corresponding data backup table.
- the traditional data table backup method can achieve normal backup under normal environmental conditions, if the environment in which the backup is in a bad environment, such as a backup environment where power failure may cause device power failure, the backup process At any time, if you use the traditional data table backup method to back up the data table, the user will not be able to know the specific situation of the backup, and cannot determine the data table of the backup success/failure.
- the data table backup method in the prior art cannot guarantee the backup efficiency of the data table in a relatively harsh backup environment.
- the embodiment of the present application provides a data table backup method and an electronic device to solve the problem of low backup efficiency of the data table backup method in the prior art.
- a first aspect of the embodiment of the present application provides a data table backup method, including:
- the field information determines a backup field in the backup source table and a corresponding field to be backed up in the backup target table, and copies data in the backup field to the field to be backed up;
- a second aspect of the embodiments of the present application provides a data table backup apparatus, including:
- the configuration reading module is configured to read out all the second backup configuration information including the backup identifier when receiving the first backup configuration information or the backup instruction input by the user.
- a copying module configured to search, according to the backup source table information and the backup target table information included in the second backup configuration information, a corresponding backup source table and a backup target table from the database, according to the read second
- the backup field information in the backup configuration information determines a backup field in the backup source table and a corresponding field to be backed up in the backup target table, and copies data in the backup field to the to-be-backed field.
- a comparison module configured to compare the backup field with the data to be backed up, and determine whether the backup field is successfully copied.
- an identifier deleting module configured to delete the backup identifier in the second backup configuration information if the result of the determining is that the backup field is successfully copied.
- a third aspect of the embodiments of the present application provides a data table backup electronic device, including a memory, a processor, and the computer storing computer readable instructions executable on the processor, where the processor executes The following steps are implemented when the computer readable instructions are described:
- the field information determines a backup field in the backup source table and a corresponding field to be backed up in the backup target table, and copies data in the backup field to the field to be backed up;
- a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, wherein the computer readable instructions are implemented by at least one processor The following steps:
- the field information determines a backup field in the backup source table and a corresponding field to be backed up in the backup target table, and copies data in the backup field to the field to be backed up;
- the backup is invalid.
- the user only needs to input the re-backup command without resetting the backup configuration information of all the data tables to be backed up, and then complete the re-backup of all the data tables that have not been successfully backed up, so that even in the bad In the backup environment, there is no need to re-back up all the data tables to be backed up every time, which greatly improves the efficiency of data table backup.
- FIG. 1 is a schematic flowchart of an implementation process of a data table backup method according to Embodiment 1 of the present application;
- FIG. 2 is a schematic flowchart of an implementation process of a data table backup method according to Embodiment 2 of the present application;
- FIG. 3 is a schematic flowchart of an implementation process of a data table backup method provided in Embodiment 5 of the present application;
- FIG. 4 is a schematic structural diagram of a data table backup apparatus provided in Embodiment 6 of the present application.
- FIG. 5 is a schematic diagram of a data table backup electronic device provided in Embodiment 7 of the present application.
- FIG. 1 is a flowchart showing an implementation of a data table backup method according to Embodiment 1 of the present application, which is described in detail as follows:
- the backup configuration information includes backup source table information, backup target table information, and backup field information required for backup, and may also include a backup identifier.
- the backup source table information and the backup target table information include information such as a backup source table and a table name of the backup target table, and are used to find a backup source table of the backup and a backup target table of the backup object from the database.
- the backup field information is used to determine the range of fields to be backed up in the backup source table, and also to determine the field of the backup target in the backup target table.
- the backup ID is used to identify whether the backup configuration information needs to be backed up. If the backup ID is included, the backup configuration information needs to be backed up.
- the backup configuration information is deleted only when the backup configuration information is successfully processed.
- the backup ID that is included.
- the user may need to back up multiple data tables in batches at the same time.
- the first backup configuration information may also be included in the data backup table.
- the backup configuration information, that is, the first backup configuration information in the embodiment of the present application is a collective name of the backup configuration information input by the user, rather than a single backup configuration information.
- the user performs data table backup mainly in two cases. 1.
- the user normally performs data table backup. At this time, the user only needs to set the corresponding first backup configuration information and input it into the data analysis system. , to achieve a backup of the specific backup fields of the data tables that need to be backed up. 2.
- the user wants to back up the backup configuration information in the data analysis system that has not been backed up by the history. At this time, the user does not need to input any backup configuration information, and only needs to input a backup instruction to the data analysis system to implement the The backup configuration information that has been processed by the backup is re-processed.
- the data analysis system Upon receiving the first backup configuration information or the re-backup command input by the user, the data analysis system reads out all the second backup configuration information including the backup identifier, as a specific implementation manner of S101, as shown in FIG. 2, include:
- the first backup configuration information should include the backup ID set by the user.
- the first backup configuration information is performed. The backup ID is checked. If there is a backup configuration information that lacks the backup ID, a backup ID is added to the backup configuration information to ensure normal backup of the data table.
- the third backup configuration information refers to the backup configuration information of the historical backup processing in the data analysis system.
- the data analysis system may only store the backup configuration that is not backed up. The information is deleted, and the backup configuration information of the backup processing is deleted. For example, the backup configuration information that has not been backed up due to the device power failure backup is terminated during the storage history backup.
- the backup configuration information in order to help the user re-process the backup configuration information to ensure the reliability of the backup in an unexpected situation, in the first case, in the actual situation, the user may be unaware of the termination of the accident.
- the backup configuration information is backed up
- the backup configuration information that is not backed up in the data analysis system is processed together, that is, the first backup configuration information and the stored third backup configuration information are read out. All the second backup configuration information that contains the backup ID and is not backed up.
- the backup configuration information that is not backed up is not completed in the data analysis system every time the user normally backs up. Therefore, in the embodiment of the present application, all the thirds may appear.
- the backup configuration information is not included in the backup configuration information. If the third backup configuration information is only the backup configuration information that has not been backed up, the third backup configuration information will not exist. In this case, directly in S1011.
- the first backup configuration information may be used as the required second backup configuration information.
- the first backup configuration information and the stored third backup configuration information will have the same backup configuration information including the backup identifier.
- the backup configuration information of the first backup configuration information and the third backup configuration information are checked, and only one of the identical backup configuration information is retained. Second backup configuration information.
- S1012 When receiving the re-backup command input by the user, read, from the third backup configuration information, all the second backup configuration information including the backup identifier.
- the second backup configuration information backup string/and processing form is not limited in consideration of the hardware configuration of the user terminal that runs the data analysis system.
- the backup configuration information included in the second backup configuration information may be sequentially backed up in S102.
- the backup configuration information included in the second backup configuration information may be serially backed up, or the backup configuration information included in the second backup configuration information may be sequentially processed in parallel.
- the sequence of processing sequentially includes, but is not limited to, randomly selecting backup configuration information from the second backup configuration information for processing, or selecting backup configuration information from the second backup configuration information according to a sorting order preset by a technician.
- the backup source table configured in the backup configuration information is the attendance table
- the backup target table is the attendance secondary table
- the backup field is March 1st, 2017.
- the attendance record data of March 31 is taken as an example.
- S102 will copy the attendance record data from March 1st to March 31st of 2017 in the attendance form to the attendance subform.
- the structure of the backup target table should be exactly the same as the structure of the backup source table.
- the structure of the attendance sub-table should be identical to that of the attendance sheet, and the attendance record data of March 1 to March 31, 2017 is performed.
- the backup target table does not include the to-be-backed field corresponding to the backup field, or the included backup field has a difference from the backup field in the backup source table, the backup target table has a difference to be backed up.
- the backup field structure is different or the backup target table does not have a field to be backed up
- the user is issued a field error warning to be backed up, and the specific error reason is prompted to help the user.
- the specific error reason is prompted to help the user.
- the backup source table in the backup is also completed.
- the backup field data is compared with the data of the field to be backed up in the backup target table. Only when the two are completely consistent, the copying of the backup field is considered complete, such as the attendance of the attendance table from March 1 to March 31, 2017. Record the data, and compare the attendance record data from March 1st to March 31st of 2017 corresponding to the attendance deputy table. Only when the two are completely the same, it is considered that the time sheet in 2017 is 3 The attendance record data from January 1 to March 31 was successfully copied.
- the backup field and the field to be backed up have the same structure, if the copy is successful, it means that each data included in the backup field has a corresponding value in the field to be backed up, and the data value Data attributes such as data types are identical. Therefore, in order to determine whether the backup field is successfully copied, in the embodiment of the present application, the data included in the backup field is compared with the data corresponding to the data to be backed up one by one, and each data in the backup field is successfully compared. When it is determined that the backup field is copied successfully.
- the order in which the data is read and compared may be that the data is read and compared according to the order of the backup fields from top to bottom, or may be randomly read and compared, and may be set by a technician according to actual conditions. Make a limit.
- the copy is considered to have a problem, and the process returns to S102 for copying again. Backup until the copy is successful.
- the backup field When the backup field is successfully copied, it indicates that the backup configuration information has been backed up. In this case, the backup identifier included in the backup configuration information of the backup processing is deleted to indicate that the backup configuration information does not need to be backed up. deal with. Because the data analysis system cannot perform the operation to S104 when the backup is terminated due to the interference of the bad backup environment, the backup identifier included in the backup configuration information that has not been backed up before the backup is terminated will always exist. Therefore, the next time the user wants to back up the backup configuration information that has not been backed up, it only needs to be identified and processed by the backup identifier. It is no need to repeat setting and inputting these backup configuration information again, which greatly improves the backup configuration information. Data table backup efficiency in a harsh backup environment.
- the backup identifier is set in the backup configuration information corresponding to the data table that needs to be backed up, and only the backup configuration information with the backup identifier is operated, and the backup identifier is deleted when the backup is completed.
- the user When the backup is terminated due to the poor backup environment, the user only needs to input the re-backup command without resetting the backup configuration information of all the data tables to be backed up, and then complete the re-backup of all the data tables that have not been successfully backed up. Therefore, even in a bad backup environment, there is no need to re-back up all the data tables to be backed up every time, which greatly improves the efficiency of data table backup.
- the following includes:
- the third backup configuration information is the backup configuration information left over during the historical backup processing process, considering that sometimes the user only wants to process the first backup configuration information currently input, and does not need to leave these historical records.
- the backup configuration information is processed. For example, the user wants to perform a large-scale collective backup of all the fields of all the data tables in the database. At this time, the historical backup configuration information has no meaning, but it will add some unnecessary. Backup configuration information comparison judgment work. Therefore, in the embodiment of the present application, the user can perform the backup identifier in the third backup configuration information, in order to enable the user to more conveniently and freely select the backup configuration information of the backup processing, and reduce the unnecessary backup configuration information processing. Settings, such as deleting the backup IDs included in some backup configuration information to improve the efficiency of data table backup.
- the method includes:
- this application creates a backup target table in the database that is identical to the backup source table structure, and sets the information of the created backup target according to the backup target table information in the backup configuration information.
- the method includes:
- the function backup tool is used to copy the data in the backup field to the field to be backed up.
- the function backup tools used by the fields of different field types are different when performing copy backup. Therefore, in order to adapt to the backup backup of the backup field of the different field types, the field type of the backup field is identified in the embodiment of the present application, and the corresponding function backup tool is selected and used to complete the backup backup of the backup field. Since each type of field corresponds to an optional function backup tool, and is a backup tool well known to those skilled in the art, the function backup tool is not described here.
- the user backs up the backup configuration information to perform data table backup, and the user backs up the backup configuration information that has not been processed in the history, and performs corresponding backup configuration information extraction methods respectively, and provides the user with the corresponding backup configuration information extraction method.
- the function of backing up the backup configuration information that has not been backed up by the history is modified, so that the user can freely select the backup configuration information that he or she really needs to backup.
- only the backup configuration information backup identifier of the normal backup is deleted, so that when the user backs up the data table that has not been backed up, the user does not need to set the corresponding backup configuration information every time, and only needs to input a re-backup command.
- FIG. 4 is a structural block diagram of a data table backup apparatus provided by an embodiment of the present application.
- the data table backup device illustrated in FIG. 4 may be the execution body of the data table backup method provided in the foregoing first embodiment.
- the data table backup device includes:
- the configuration reading module 41 is configured to read out all the second backup configuration information including the backup identifier when receiving the first backup configuration information or the backup instruction input by the user.
- the copying module 42 is configured to search, according to the backup source table information and the backup target table information included in the second backup configuration information, the corresponding backup source table and the backup target table from the database, according to the read
- the backup field information in the backup configuration information determines the backup field in the backup source table and the corresponding field to be backed up in the backup target table, and copies the data in the backup field to the field to be backed up.
- the comparison module 43 is configured to compare the backup field with the data to be backed up, and determine whether the backup field is successfully copied.
- the identifier deleting module 44 is configured to delete the backup identifier in the second backup configuration information if the result of the determining is that the backup field is successfully copied.
- configuration reading module 41 includes:
- a first configuration reading submodule configured to read all the included backups from the first backup configuration information and the stored third backup configuration information when receiving the first backup configuration information input by the user The second backup configuration information identified.
- the second configuration reading submodule is configured to read, from the third backup configuration information, all the second backup configuration information including the backup identifier when receiving the re-backup instruction input by the user.
- the data table backup device further includes:
- an identifier modification module configured to receive a backup identifier setting instruction input by the user, and perform setting of the backup identifier on the third backup configuration information according to the backup identifier setting instruction.
- copy module 42 includes:
- a creating module if the backup destination table corresponding to the backup target table information is not included in the database, and searching, according to the backup source table information, the corresponding backup source table from the database, where A data table having the same structure as the backup source table is created in the database, and the data table is used as the backup target table corresponding to the backup target table information.
- copying module 42 further includes:
- a tool matching module is configured to identify a field type of the backup field and find a function backup tool that matches the field type.
- a copying submodule configured to copy data in the backup field to the field to be backed up by using the function backup tool.
- first, second, and the like are used in the text to describe various elements in the embodiments of the present application, these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
- the first contact can be named a second contact, and similarly, the second contact can be named the first contact without departing from the scope of the various described embodiments. Both the first contact and the second contact are contacts, but they are not the same contact.
- FIG. 5 is a schematic diagram of a data table backup electronic device according to an embodiment of the present application.
- the data table backup electronic device 5 of this embodiment includes a processor 50, a memory 51 in which computer readable instructions 52 executable on the processor 50 are stored.
- the processor 50 executes the computer readable instructions 52, the steps in the foregoing various data table backup method embodiments are implemented, such as steps 101 to 106 shown in FIG.
- the processor 50 when executing the computer readable instructions 52, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 41-44 shown in FIG.
- the data table backup electronic device 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the data table backup electronic device may include, but is not limited to, the processor 50 and the memory 51. It will be understood by those skilled in the art that FIG. 5 is only an example of the data table backup electronic device 5, and does not constitute a limitation of the data table backup electronic device 5, and may include more or less components than the illustration, or a combination of certain A component, or a different component, such as the datasheet backup electronic device, may also include an input transmitting device, a network access device, a bus, and the like.
- the so-called processor 50 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the memory 51 may be an internal storage unit of the data table backup electronic device 5, such as a hard disk or a memory of the data table backup electronic device 5.
- the memory 51 may also be an external storage device of the data table backup electronic device 5, for example, a plug-in hard disk equipped with the data table backup electronic device 5, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card (Flash Card) and so on.
- the memory 51 may also include both an internal storage unit of the data table backup electronic device 5 and an external storage device.
- the memory 51 is configured to store the computer readable instructions and other programs and data required by the data table backup electronic device.
- the memory 51 can also be used to temporarily store data that has been sent or is about to be transmitted.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated modules/units if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
- the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium.
- the computer readable instructions when executed by a processor, may implement the steps of the various method embodiments described above.
- the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like.
- the computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM, Random) Access Memory), electrical carrier signals, telecommunications signals, and software distribution media.
- ROM Read Only memory
- RAM Random Access Memory
- electrical carrier signals telecommunications signals
- telecommunications signals and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media Does not include electrical carrier signals and telecommunication signals.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供了一种数据表备份方法、装置、电子设备及介质,适用于数据处理技术领域,该方法包括:当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;根据备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,读取第二备份配置信息中备份字段信息,并将备份源表中备份字段信息对应的数据,复制至备份目标表;判断备份字段复制是否成功;若判断的结果为备份字段复制成功,删除第二备份配置信息中的备份标识。即使在恶劣的备份环境下,也无需每次都所有待备份数据表进行重新备份,极大地提高了对数据表备份的效率。
Description
本申请要求于2017年12月08日提交中国专利局、申请号为201711295722.4、发明名称为“一种数据表备份方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于数据处理技术领域,尤其涉及一种数据表备份方法、装置、电子设备及介质。
现有的数据分析系统在进行批量数据表备份时,都是将用户选定的所有待备份的数据表所需备份的部分直接备份到对应数据备份表中。传统的数据表备份方法虽然可以实现在一般环境情况下的正常备份,但若备份时所处的环境较为恶劣时,如处于电源不稳定导致可能出现设备掉电情况的备份环境时,备份的过程随时可能被终止,此时若使用传统的数据表备份方法来进行数据表备份,会导致用户无法获知备份的具体情况,无法确定备份成功/失败的数据表,此时为了确保备份的成功,用户只能选择从头开始,重新选定所需待备份的数据表以及数据表所需备份的部分并重新进行备份,从而使得备份效率大大降低。
因此,现有技术中的数据表备份方法无法在较为恶劣的备份环境下,保证数据表的备份效率。
有鉴于此,本申请实施例提供了一种数据表备份方法及电子设备,以解决现有技术中的数据表备份方法备份效率低下的问题。
本申请实施例的第一方面提供了一种数据表备份方法,包括:
当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;
根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;
将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;
若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
本申请实施例的第二方面提供了一种数据表备份装置,包括:
配置读取模块,用于当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息。
复制模块,用于根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段。
对比模块,用于将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功。
标识删除模块,用于若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
本申请实施例的第三方面提供了一种数据表备份电子设备,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;
根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;
将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;
若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:
当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;
根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;
将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;
若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
通过预先在所需备份的数据表对应的备份配置信息中设置备份标识,且仅对具有备份标识的备份配置信息进行操作,并在对比确认备份完成时才删除备份标识,使得在因恶劣的备份环境导致备份终止时,用户也只需要输入重新备份指令而无需重新设定输入所有待备份数据表的备份配置信息,即可完成对所有未备份成功的数据表的重新备份,从而使得即使在恶劣的备份环境下,也无需每次都所有待备份数据表进行重新备份,极大地提高了对数据表备份的效率。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例一提供的数据表备份方法的实现流程示意图;
图2是本申请实施例二提供的数据表备份方法的实现流程示意图;
图3是本申请实施例五提供的数据表备份方法的实现流程示意图;
图4是本申请实施例六提供的数据表备份装置的结构示意图;
图5是本申请实施例七提供的数据表备份电子设备的示意图。
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
图1示出了本申请实施例一提供的数据表备份方法的实现流程图,详述如下:
S101,当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息。
本申请实施例中,备份配置信息中包含着备份所需的备份源表信息、备份目标表信息以及备份字段信息,同时还可能包含备份标识。其中,备份源表信息以及备份目标表信息,包含着备份源表以及备份目标表的表名等信息,用于从数据库中找出所需备份的备份源表以及备份对象的备份目标表。备份字段信息用于在备份源表中确定出本次实际要备份的字段范围,还用于在备份目标表中确定出备份目标的字段。备份标识用于标识备份配置信息是否需要进行备份处理,若包含备份标识,则说明该备份配置信息需要进行备份处理,本申请实施例中只有当备份配置信息正常备份处理成功时,才会删除其中包含的备份标识。由于实际应用中,用户可能需要同时批量备份多张数据表,如同时需要备份考勤表、工资表以及公司员工表,因此,在本申请实施例中,第一备份配置信息也可能同时包含着多个备份配置信息,即本申请实施例中的第一备份配置信息是用户输入的备份配置信息的统称,而非单指某一个备份配置信息。
在本申请实施例中,用户进行数据表备份主要分为两种情况,1、用户正常进行数据表备份,此时用户只需设置好相应的第一备份配置信息并将其输入至数据分析系统,即可实现对所需备份的数据表的特定备份字段的备份。2、用户想将数据分析系统中历史未备份处理完成的备份配置信息重新进行备份处理,此时用户无需输入任何备份配置信息,只需要向数据分析系统输入一个重新备份指令,即可实现对未备份处理完成的备份配置信息重新进行备份处理。
在接收到用户输入的第一备份配置信息或者重新备份指令时,数据分析系统会读取出所有包含备份标识的第二备份配置信息,作为S101的一种具体实现方式,如图2所示,包括:
S1011,当接收到用户输入的第一备份配置信息时,从第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的第二备份配置信息。
首先应当说明的是,由于用户是需要进行数据表备份时才会设置备份配置信息并输入数据分析系统,因此接收到的用户输入的第一备份配置信息都是需要进行备份处理,即用户输入的第一备份配置信息中都应当包含用户设置的备份标识。在本申请实施例中,为了防止因用户忘记在第一备份配置信息中设置备份标识而导致备份出错的情况发生,在接收到用户输入的第一备份配置信息,会对第一备份配置信息进行备份标识检查,若其中有缺少备份标识的备份配置信息,则会向这些备份配置信息中添加备份标识,以保证数据表的正常备份。
本申请实施例中,第三备份配置信息是指数据分析系统中历史备份处理的备份配置信息,为了减少数据分析系统的存储负荷,优选地,数据分析系统可以仅存储未备份处理完成的备份配置信息,并对已完成备份处理的备份配置信息进行删除,如存储历史备份过程中由于设备掉电备份终止导致的剩余未备份处理完成的备份配置信息。
考虑到实际情况中可能存在备份因意外情况终止而用户又不知情的情况,本申请实施例中,为了帮助用户重新处理这些备份配置信息,以保证意外情况下备份的可靠性,在对第一备份配置信息进行备份处理的同时,还会对数据分析系统中未备份处理完成的备份配置信息一起进行处理,即会从第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的,未备份处理完成的第二备份配置信息。
由于实际情况中意外情况发生可能性一般较小,即并非每次用户正常备份时数据分析系统中都会有未备份处理完成的备份配置信息,因此,在本申请实施例中,可能出现所有第三备份配置信息中都不包含备份标识的情况,若第三备份配置信息仅为未备份处理完成的备份配置信息,则此时会出现不存在第三备份配置信息的情况,此时,S1011中直接将第一备份配置信息作为所需的第二备份配置信息即可。
作为本申请的优选实施例,考虑到可能存在用户两次需要备份的内容相同,如两次都需要备份考勤表中2017年3月1号到3月31号的考勤记录数据,但前一次备份意外终止的情况,此时,第一备份配置信息以及已存储的第三备份配置信息中会存在完全相同且包含备份标识的备份配置信息,为了减少此类情况造成的重复备份,减小数据分析系统的备份工作量,本申请实施例中,会对第一备份配置信息与第三备份配置信息是否存在完全相同的备份配置信息进行检查,并对完全相同的备份配置信息仅保留其中的一条作为第二备份配置信息。
S1012,当接收到用户输入的重新备份指令时,从第三备份配置信息中,读取出所有包含备份标识的第二备份配置信息。
由上述说明可知,当接收到用户输入的重新备份指令时,说明用户想将数据分析系统中未备份处理完成的备份配置信息重新进行备份处理,此时只需要从第三备份配置信息查找出所需备份处理的第二备份配置信息即可。
S102,根据第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的第二备份配置信息中备份字段信息确定出备份源表中的备份字段以及备份目标表中对应的待备份字段,并将备份字段中的数据复制至待备份字段。
在确定出所需备份处理的第二备份配置信息后,开始对第二备份配置信息进行处理。考虑到运行数据分析系统的用户终端的硬件配置可能有所差异,本申请实施例中,不对第二备份配置信息备份串/并处理形式进行限定。对于只能串行任务处理的用户终端而言,在S102中可以对第二备份配置信息中包含的备份配置信息依次备份处理。对于可以并行任务处理的用户终端而言,既可以选择串行对第二备份配置信息中包含的备份配置信息依次备份处理,也可以并行对第二备份配置信息中包含的备份配置信息依次备份处理。其中,依次处理的顺序包括但不限于从第二备份配置信息随机选取备份配置信息进行处理,或者从第二备份配置信息中按照技术人员预设的排序顺序选取备份配置信息并进行处理。
在对第二备份配置信息中包含的备份配置信息进行备份处理时,以备份配置信息中配置的备份源表为考勤表,备份目标表为考勤副表,备份字段为2017年3月1号到3月31号的考勤记录数据为例进行说明,S102在查找出考勤表以及考勤副表后,会将考勤表中2017年3月1号到3月31号的考勤记录数据复制到考勤副表对应的待备份字段中,以完成数据表备份字段的复制备份。优选地,备份目标表的结构应当与备份源表的结构完全相同,如考勤副表的结构应当与考勤表的完全相同,在进行2017年3月1号到3月31号的考勤记录数据的复制时,应当先在考勤副表中查找对应的待备份字段,即2017年3月1号到3月31号的考勤记录字段,并在查找到该待备份字段且确认该待备份字段的结构与考勤表中对应的备份字段结构完全相同时,再进行备份字段数据的复制,以保证数据表备份的正常。优选地,若识别出备份目标表中不包含与备份字段对应的待备份字段,或者所包含的待备份字段与备份源表中的备份字段有差异时,删除备份目标表中有差异的待备份字段,并在备份目标表中创建与备份源表中备份字段结构相同的待备份字段,如在考勤副表中创建与考勤表2017年3月1号到3月31号的考勤记录字段结构完全相同的待备份字段,并将考勤表中2017年3月1号到3月31号的考勤记录数据复制至该待备份字段中,以完成数据表备份字段的复制备份。
作为本申请的一个优选实施例,可选地,在出现上述备份字段结构不同或者备份目标表不存在待备份字段时,向用户发出待备份字段错误警告,并提示具体的错误原因,以帮助用户更好的了解数据表备份的情况。
S103,将备份字段与待备份字段进行数据对比,判断备份字段复制是否成功。
由于恶劣的备份环境不仅可能导致备份终止,还可能使备份过程受到干扰,从而使得备份的数据出现错误。本申请实施例中,为了减小恶劣的备份环境对备份造成的影响,保证备份的可靠性,在完成备份配置信息设置的数据表备份字段的备份后,还会将备份完成的备份源表中备份字段数据与备份目标表中待备份字段数据进行对比,只有两者完全一致时,才认为对给备份字段的复制完成,如将考勤表中2017年3月1号到3月31号的考勤记录数据,与考勤副表中对应的2017年3月1号到3月31号的考勤记录数据一一进行对比,只用在两者完全相同的情况下,才认为对考勤表中2017年3月1号到3月31号的考勤记录数据复制成功。
作为本申请的一个优选实施例,由于备份字段和待备份字段的结构完全相同,若复制成功,则意味着备份字段中包含的每个数据,在待备份字段都会有着与之对应的,数据值、数据类型等数据属性完全相同数据。因此,为了判断备份字段是否复制成功,本申请实施例中,只需将备份字段中包含的数据逐一与待备份字段中对应的数据进行数据属性对比,并在备份字段中每个数据均对比成功时,判定备份字段复制成功。
例如,读取备份字段中的单个数据,并在待备份字段中查找出与之对应的数据,再将两者的数据值以及数据类型等属性进行对比,若完全相同,再从备份字段提取出下一个数据进行数据属性对比,直至备份字段中所有的数据的数据属性对比均成功时,判定备份字段复制成功。
其中,数据读取对比的顺序既可以是按照备份字段从上到下的顺序来进行数据的读取对比,也可以是随机读取对比,可以有技术人员根据实际情况进行设定,此处不做限定。
对于支持并行处理的设备而言,在进行上述数据对比时,也可以从备份字段中并行读取对比多个数据以提升数据对比的效率。
作为本申请一个优选实施例,若备份字段数据不完全相同,即备份字段与待备份字段中存在数据属性不完全一样的数据时,则认为此次复制存在问题,并重新返回S102中进行再次复制备份,直至复制成功。
S104,若判断的结果为备份字段复制成功,删除第二备份配置信息中的备份标识。
当备份字段复制成功时,说明已经完成对该备份配置信息的备份处理,此时,本申请实施例会删除备份处理完成的备份配置信息中包含的备份标识,以表示该备份配置信息无须再进行备份处理。由于在恶劣的备份环境的干扰下导致备份终止时,数据分析系统是无法进行到S104的操作,因此,对于备份终止前未备份处理完成的备份配置信息,其包含的备份标识也会一直存在,因此下一次用户想对这些未备份处理完成的备份配置信息进行备份处理时,只需通过备份标识将其识别出来并进行处理即可,无需再次重复设置和输入这些备份配置信息,极大地提高了恶劣备份环境中的数据表备份效率。
本申请实施例中,通过预先在所需备份的数据表对应的备份配置信息中设置备份标识,且仅对具有备份标识的备份配置信息进行操作,并在对比确认备份完成时才删除备份标识,使得在因恶劣的备份环境导致备份终止时,用户也只需要输入重新备份指令而无需重新设置输入所有待备份数据表的备份配置信息,即可完成对所有未备份成功的数据表的重新备份,从而使得即使在恶劣的备份环境下,也无需每次都所有待备份数据表进行重新备份,极大地提高了对数据表备份的效率。
作为本申请的优选实施例三,包括:
接收用户输入的备份标识设置指令,并根据备份标识设置指令对第三备份配置信息进行备份标识的设置。
在本申请实施例中,第三备份配置信息均为历史备份处理过程中遗留下来的备份配置信息,考虑到有时用户只希望处理其当前输入的第一备份配置信息,而不需要对这些历史遗留下来的备份配置信息进行处理,如用户希望对数据库中所有的数据表的所有字段进行一次大规模的集体备份,此时历史遗留下来的备份配置信息没有了任何意义,反而会增添一些没必要的备份配置信息对比判断工作。因此,为了使用户能更加方便自由地选择所需备份处理的备份配置信息,减少一些没有必要的备份配置信息处理工作,本申请实施例中,用户可以对第三备份配置信息中的备份标识进行设置,如将一些备份配置信息所包含的备份标识进行删除,以提升数据表备份的效率。
作为S102的一种具体实现,作为本申请实施例四,包括:
S1021,若数据库中不包含备份目标表信息对应的备份目标表,根据备份源表信息从数据库中查找出对应的备份源表,在数据库中创建出与备份源表结构相同的数据表,并将数据表作为备份目标表信息对应的备份目标表。
在对备份源表进行首次备份或者由于恶劣备份环境的影响而丢失了备份目标表时,数据库中都会无法查找到所需的备份目标表,此时,为了保障备份源表的正常备份,本申请实施例会在数据库中创建一个与备份源表结构完全一致的备份目标表,并依照备份配置信息中的备份目标表信息对创建得到的备份目标吧进行信息设定。
作为S102的一种具体实现,作为本申请实施例五,如图3所示,包括:
S1022,识别备份字段的字段类型,并查找出与字段类型匹配的函数备份工具。
S1023,利用函数备份工具将备份字段中的数据复制至待备份字段。
由于数据表可能包含多种不同字段类型的字段,如常见的日期型、字符型以及数值型,而不同字段类型的字段在进行复制备份时,所使用到的函数备份工具也有所不同。因此,为了适应不同字段类型的备份字段的复制备份,本申请实施例中会对备份字段的字段类型进行识别,并选取和利用对应的函数备份工具来完成对备份字段的复制备份。由于每一种字段类型对应可选的函数备份工具种类较多,且均为本领域技术人员所熟知的备份工具,因此,此处不对函数备份工具进行赘述。
在本申请实施例中,对用户正常输入备份配置信息进行数据表备份,以及用户对历史未备份处理完成的备份配置信息进行重新备份处理,分别进行相应的备份配置信息提取方法,并为用户提供对历史未备份处理完成的备份配置信息进行备份标识修改的功能,使得用户可以自由选择自己真正所需备份处理的备份配置信息。同时,仅删除正常备份成功的备份配置信息备份标识,使得用户在对未备份完成的数据表进行重新备份时,无需每次都新设置相应的备份配置信息,只需要输入一个重新备份指令即可实现对未备份完成的数据表的重新备份,极大的提高了对数据表备份的效率。而对备份过程中可能出现意外情况,如备份数据错误、备份字段出错、备份目标表不存在以及备份字段类型多样化等情况,均设置了相应的应对处理方法,保证了备份过程的可靠性,同时也减少了意外情况对备份处理的干扰,提高了备份的效率。
对应于上文实施例的方法,图4示出了本申请实施例提供的数据表备份装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。图4示例的数据表备份装置可以是前述实施例一提供的数据表备份方法的执行主体。
参照图4,该数据表备份装置包括:
配置读取模块41,用于当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息。
复制模块42,用于根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段。
对比模块43,用于将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功。
标识删除模块44,用于若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
进一步地,配置读取模块41包括:
第一配置读取子模块,用于当接收到用户输入的所述第一备份配置信息时,从所述第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
第二配置读取子模块,用于当接收到用户输入的所述重新备份指令时,从所述第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
进一步地,该数据表备份装置还包括:
标识修改模块,用于接收所述用户输入的备份标识设置指令,并根据所述备份标识设置指令对所述第三备份配置信息进行所述备份标识的设置。
进一步地,复制模块42包括:
创建模块,用于若所述数据库中不包含所述备份目标表信息对应的所述备份目标表,根据所述备份源表信息从所述数据库中查找出对应的所述备份源表,在所述数据库中创建出与所述备份源表结构相同的数据表,并将所述数据表作为所述备份目标表信息对应的所述备份目标表。
进一步地,复制模块42还包括:
工具匹配模块,用于识别所述备份字段的字段类型,并查找出与所述字段类型匹配的函数备份工具。
复制子模块,用于利用所述函数备份工具将所述备份字段中的数据复制至所述待备份字段。
本申请实施例提供的数据表备份装置中各模块实现各自功能的过程,具体可参考前述图1所示实施例一的描述,此处不再赘述。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解的是,虽然术语“第一”、“第二”等在文本中在一些本申请实施例中用来描述各种元素,但是这些元素不应该受到这些术语的限制。这些术语只是用来将一个元素与另一元素区分开。例如,第一接触可以被命名为第二接触,并且类似地,第二接触可以被命名为第一接触,而不背离各种所描述的实施例的范围。第一接触和第二接触都是接触,但是它们不是同一接触。
图5是本申请一实施例提供的数据表备份电子设备的示意图。如图5所示,该实施例的数据表备份电子设备5包括:处理器50、存储器51,所述存储器51中存储有可在所述处理器50上运行的计算机可读指令52。所述处理器50执行所述计算机可读指令52时实现上述各个数据表备份方法实施例中的步骤,例如图1所示的步骤101至106。或者,所述处理器50执行所述计算机可读指令52时实现上述各装置实施例中各模块/单元的功能,例如图4所示模块41至44的功能。
所述数据表备份电子设备5可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述数据表备份电子设备可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是数据表备份电子设备5的示例,并不构成对数据表备份电子设备5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述数据表备份电子设备还可以包括输入发送设备、网络接入设备、总线等。
所称处理器50可以是中央处理单元(Central
Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application
Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器51可以是所述数据表备份电子设备5的内部存储单元,例如数据表备份电子设备5的硬盘或内存。所述存储器51也可以是所述数据表备份电子设备5的外部存储设备,例如所述数据表备份电子设备5上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash
Card)等。进一步地,所述存储器51还可以既包括所述数据表备份电子设备5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机可读指令以及所述数据表备份电子设备所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经发送或者将要发送的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only
Memory)、随机存取存储器(RAM,Random
Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使对应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
Claims (20)
- 一种数据表备份方法,其特征在于,包括:当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
- 如权利要求1所述的数据表备份方法,其特征在于,所述当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息,包括:当接收到用户输入的所述第一备份配置信息时,从所述第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息;当接收到用户输入的所述重新备份指令时,从所述第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
- 如权利要求2所述的数据表备份方法,其特征在于,还包括:接收所述用户输入的备份标识设置指令,并根据所述备份标识设置指令对所述第三备份配置信息进行所述备份标识的设置。
- 如权利要求1所述的数据表备份方法,其特征在于,所述根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,还包括:若所述数据库中不包含所述备份目标表信息对应的所述备份目标表,根据所述备份源表信息从所述数据库中查找出对应的所述备份源表,在所述数据库中创建出与所述备份源表结构相同的数据表,并将所述数据表作为所述备份目标表信息对应的所述备份目标表。
- 如权利要求1所述的数据表备份方法,其特征在于,所述根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段,包括:识别所述备份字段的字段类型,并查找出与所述字段类型匹配的函数备份工具;利用所述函数备份工具将所述备份字段中的数据复制至所述待备份字段。
- 一种数据表备份装置,其特征在于,包括:配置读取模块,用于当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息。复制模块,用于根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段。对比模块,用于将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功。标识删除模块,用于若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
- 如权利要求6所述的数据表备份装置,其特征在于,所述配置读取模块,包括:第一配置读取子模块,用于当接收到用户输入的所述第一备份配置信息时,从所述第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。第二配置读取子模块,用于当接收到用户输入的所述重新备份指令时,从所述第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
- 如权利要求7所述的数据表备份装置,其特征在于,还包括:标识修改模块,用于接收所述用户输入的备份标识设置指令,并根据所述备份标识设置指令对所述第三备份配置信息进行所述备份标识的设置。
- 如权利要求6所述的数据表备份装置,其特征在于,所述复制模块,还包括:创建模块,用于若所述数据库中不包含所述备份目标表信息对应的所述备份目标表,根据所述备份源表信息从所述数据库中查找出对应的所述备份源表,在所述数据库中创建出与所述备份源表结构相同的数据表,并将所述数据表作为所述备份目标表信息对应的所述备份目标表。
- 如权利要求6所述的数据表备份装置,其特征在于,还包括:工具匹配模块,用于识别所述备份字段的字段类型,并查找出与所述字段类型匹配的函数备份工具。复制子模块,用于利用所述函数备份工具将所述备份字段中的数据复制至所述待备份字段。
- 一种数据表备份电子设备,其特征在于,所述数据表备份处理电子设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
- 如权利要求11所述的数据表备份电子设备,其特征在于,所述当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息,包括:当接收到用户输入的所述第一备份配置信息时,从所述第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息;当接收到用户输入的所述重新备份指令时,从所述第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
- 如权利要求12所述的数据表备份电子设备,其特征在于,还包括:接收所述用户输入的备份标识设置指令,并根据所述备份标识设置指令对所述第三备份配置信息进行所述备份标识的设置。
- 如权利要求11所述的数据表备份电子设备,其特征在于,所述根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,还包括:若所述数据库中不包含所述备份目标表信息对应的所述备份目标表,根据所述备份源表信息从所述数据库中查找出对应的所述备份源表,在所述数据库中创建出与所述备份源表结构相同的数据表,并将所述数据表作为所述备份目标表信息对应的所述备份目标表。
- 如权利要求11所述的数据表备份电子设备,其特征在于,所述根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段,包括:识别所述备份字段的字段类型,并查找出与所述字段类型匹配的函数备份工具;利用所述函数备份工具将所述备份字段中的数据复制至所述待备份字段。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息;根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段;将所述备份字段与所述待备份字段进行数据对比,判断所述备份字段复制是否成功;若所述判断的结果为所述备份字段复制成功,删除所述第二备份配置信息中的所述备份标识。
- 如权利要求16所述的计算机可读存储介质,其特征在于,所述当接收到用户输入的第一备份配置信息或者重新备份指令时,读取出所有包含备份标识的第二备份配置信息,包括:当接收到用户输入的所述第一备份配置信息时,从所述第一备份配置信息以及已存储的第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息;当接收到用户输入的所述重新备份指令时,从所述第三备份配置信息中,读取出所有包含备份标识的所述第二备份配置信息。
- 如权利要求17所述的计算机可读存储介质,其特征在于,还包括:接收所述用户输入的备份标识设置指令,并根据所述备份标识设置指令对所述第三备份配置信息进行所述备份标识的设置。
- 如权利要求16所述的计算机可读存储介质,其特征在于,所述根据所述第二备份配置信息中包含的备份源表信息以及备份目标表信息,从数据库中查找出对应的备份源表以及备份目标表,还包括:若所述数据库中不包含所述备份目标表信息对应的所述备份目标表,根据所述备份源表信息从所述数据库中查找出对应的所述备份源表,在所述数据库中创建出与所述备份源表结构相同的数据表,并将所述数据表作为所述备份目标表信息对应的所述备份目标表。
- 如权利要求11所述的计算机可读存储介质,其特征在于,所述根据读取出的所述第二备份配置信息中备份字段信息确定出所述备份源表中的备份字段以及所述备份目标表中对应的待备份字段,并将所述备份字段中的数据复制至所述待备份字段,包括:识别所述备份字段的字段类型,并查找出与所述字段类型匹配的函数备份工具;利用所述函数备份工具将所述备份字段中的数据复制至所述待备份字段。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711295722.4A CN108121774B (zh) | 2017-12-08 | 2017-12-08 | 一种数据表备份方法及终端设备 |
CN201711295722.4 | 2017-12-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019109514A1 true WO2019109514A1 (zh) | 2019-06-13 |
Family
ID=62229714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/074847 WO2019109514A1 (zh) | 2017-12-08 | 2018-01-31 | 一种数据表备份方法、装置、电子设备及介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108121774B (zh) |
WO (1) | WO2019109514A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109840160A (zh) * | 2019-01-03 | 2019-06-04 | 深圳壹账通智能科技有限公司 | 一种基于数据迁移的异常供数检测方法、装置及终端设备 |
CN109787835B (zh) * | 2019-01-30 | 2021-11-19 | 新华三技术有限公司 | 一种会话备份方法及装置 |
CN112579344A (zh) * | 2019-09-29 | 2021-03-30 | 北京国双科技有限公司 | 数据处理方法、装置及设备 |
CN112612775B (zh) * | 2020-12-17 | 2023-06-27 | 平安消费金融有限公司 | 一种数据存储方法、装置、计算机设备及存储介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101459503A (zh) * | 2007-12-12 | 2009-06-17 | 华为技术有限公司 | 一种实现数据同步的方法和装置 |
CN103838762A (zh) * | 2012-11-26 | 2014-06-04 | 中国银联股份有限公司 | 基于数据表轮换的不间断数据处理装置及方法 |
CN106569911A (zh) * | 2016-10-14 | 2017-04-19 | 深圳前海微众银行股份有限公司 | 数据备份方法和装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006164162A (ja) * | 2004-12-10 | 2006-06-22 | Fujitsu Ltd | コピー制御装置および方法 |
CN102215268A (zh) * | 2011-07-14 | 2011-10-12 | 北京飞杰信息技术有限公司 | 一种迁移文件数据的方法和装置 |
CN102495906A (zh) * | 2011-12-23 | 2012-06-13 | 天津神舟通用数据技术有限公司 | 一种实现断点续传的增量式数据迁移方法 |
CN105224422B (zh) * | 2015-10-20 | 2019-02-12 | 浙江大华技术股份有限公司 | 一种数据备份方法及设备 |
-
2017
- 2017-12-08 CN CN201711295722.4A patent/CN108121774B/zh active Active
-
2018
- 2018-01-31 WO PCT/CN2018/074847 patent/WO2019109514A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101459503A (zh) * | 2007-12-12 | 2009-06-17 | 华为技术有限公司 | 一种实现数据同步的方法和装置 |
CN103838762A (zh) * | 2012-11-26 | 2014-06-04 | 中国银联股份有限公司 | 基于数据表轮换的不间断数据处理装置及方法 |
CN106569911A (zh) * | 2016-10-14 | 2017-04-19 | 深圳前海微众银行股份有限公司 | 数据备份方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN108121774A (zh) | 2018-06-05 |
CN108121774B (zh) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110704398B (zh) | 从MySQL到Oracle的数据库迁移方法、装置及计算机设备 | |
WO2019109514A1 (zh) | 一种数据表备份方法、装置、电子设备及介质 | |
US9122647B2 (en) | System and method to backup objects on an object storage platform | |
WO2020155740A1 (zh) | 信息查询方法、装置、计算机设备及存储介质 | |
US8099397B2 (en) | Apparatus, system, and method for improved portable document format (“PDF”) document archiving | |
CN109101603B (zh) | 一种数据比对方法、装置、设备及存储介质 | |
CN108334675B (zh) | 数字飞行器工况集批量仿真的人工智能处理方法及系统 | |
CN112115105A (zh) | 一种业务处理方法、装置及设备 | |
EP3108400B1 (en) | Virus signature matching method and apparatus | |
CN113407565A (zh) | 跨库数据查询方法、装置和设备 | |
US9390090B2 (en) | Concurrent long spanning edit sessions using change lists with explicit assumptions | |
CN109034668B (zh) | Etl任务调度方法、装置、计算机设备及存储介质 | |
CN111444208A (zh) | 一种数据更新方法及相关设备 | |
CN114841281A (zh) | 一种数据表的识别方法、装置、设备、介质及程序产品 | |
CN109740027B (zh) | 数据交换方法、装置、服务器和存储介质 | |
CN115098588A (zh) | 跨集群的元数据同步方法、设备及介质 | |
CN112632266B (zh) | 数据写入方法、装置、计算机设备及可读存储介质 | |
CN112559331A (zh) | 测试方法和装置 | |
CN111382222B (zh) | 高精地图图幅数据接边方法和装置 | |
CN111371818B (zh) | 一种数据请求的验证方法、装置及设备 | |
CN110874246A (zh) | 一种模块加载方法、系统及设备 | |
CN111209286A (zh) | 数据调用方法及系统 | |
CN112417012A (zh) | 数据处理方法及系统 | |
CN111241099A (zh) | 一种工业大数据存储方法及装置 | |
US11748354B2 (en) | Data shape confidence |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 06.10.2020) |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18885242 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18885242 Country of ref document: EP Kind code of ref document: A1 |