CN113448777A - Data recovery method and device - Google Patents

Data recovery method and device Download PDF

Info

Publication number
CN113448777A
CN113448777A CN202110774549.6A CN202110774549A CN113448777A CN 113448777 A CN113448777 A CN 113448777A CN 202110774549 A CN202110774549 A CN 202110774549A CN 113448777 A CN113448777 A CN 113448777A
Authority
CN
China
Prior art keywords
data
target data
relation
target
source
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
Application number
CN202110774549.6A
Other languages
Chinese (zh)
Inventor
李晴阳
姬宁
李柏润
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110774549.6A priority Critical patent/CN113448777A/en
Publication of CN113448777A publication Critical patent/CN113448777A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

The invention provides a data recovery method and a data recovery device, which are used for acquiring a data recovery instruction input by a user; acquiring the temporarily stored target data based on the indication information, wherein the target data is data extracted from a data source and corresponding to the data relationship; the data relation is configured in a database table relation configuration file in advance; updating the specified data indicated by the indication information in the target data; and restoring the updated target data to the target data source. In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.

Description

Data recovery method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data recovery method and apparatus.
Background
With the continuous development of software applications, a large amount of business data replication is involved in the development or updating process of the software applications. At present, data to be copied is often directly written into a program code of another software application, and then a code corresponding to the copied data is adjusted in a manual mode, so that cross-platform recovery of the data is realized. In this way, a lot of time is required for manual work, resulting in a long data recovery time.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data recovery method and apparatus, so as to solve the problem in the prior art that the data recovery time is long.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a first aspect of an embodiment of the present invention shows a data recovery method, where the method includes:
acquiring a data recovery instruction input by a user, wherein the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating data to be recovered and specified data;
acquiring temporarily stored target data based on the indication information, wherein the target data is data extracted from a data source and corresponding to a data relation; the data relation is pre-configured in a database table relation configuration file;
updating the specified data indicated by the indication information in the target data;
and restoring the updated target data to the target data source.
Optionally, the restoring the updated target data to the target data source includes:
determining a dependency sequence corresponding to the dependency relationship of the updated target data;
and according to the dependency sequence, sequentially restoring the updated target data to a target data source.
Optionally, the method further includes:
after target data corresponding to the data relationship is extracted from a data source, whether the data relationship has relationship data loss or is complete or not and whether a preset verification rule is met or not is verified;
and if the target data has no relation data loss and is complete and accords with the preset verification rule, extracting the target data corresponding to the data relation from the data source.
Optionally, the method further includes:
verifying a version corresponding to a data relationship before target data corresponding to the data relationship, which is extracted from a data source;
and if the verification is passed, extracting the target data corresponding to the data relationship from the data source.
A second aspect of the embodiments of the present invention shows a data recovery apparatus, including:
the device comprises:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a data recovery instruction input by a user, the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating data to be recovered and specified data;
a second obtaining unit, configured to obtain, based on the indication information, temporarily stored target data, where the target data is data extracted from a data source and corresponding to a data relationship; the data relation is pre-configured in a database table relation configuration file;
an updating unit, configured to update the specified data indicated by the indication information in the target data;
and the restoring unit is used for restoring the updated target data to the target data source.
Optionally, the recovery unit is specifically configured to:
determining a dependency sequence corresponding to the dependency relationship of the updated target data; and according to the dependency sequence, sequentially restoring the updated target data to a target data source.
Optionally, the method further includes:
the verification unit is used for verifying whether the data relation has relation data loss or not, whether the relation data is complete or not and whether the relation data accords with a preset verification rule or not after target data corresponding to the data relation is extracted from a data source; and if the target data has no relation data loss and is complete and accords with the preset verification rule, extracting the target data corresponding to the data relation from the data source.
Optionally, the method further includes:
the verification unit is used for verifying the version corresponding to the data relation before the target data corresponding to the data relation, which is extracted from the data source; and if the verification is passed, extracting the target data corresponding to the data relationship from the data source.
A third aspect of the embodiment of the present invention shows an electronic device, where the electronic device is configured to run a program, where the program executes the data recovery method shown in the first aspect of the embodiment of the present invention when running.
A fourth aspect of the embodiments of the present invention shows a computer storage medium, where the storage medium includes a storage program, and when the program runs, a device in which the storage medium is located is controlled to execute the data recovery method shown in the first aspect of the embodiments of the present invention.
Based on the above data recovery method and device provided by the embodiments of the present invention, the method includes: acquiring a data recovery instruction input by a user, wherein the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating data to be recovered and specified data; acquiring the temporarily stored target data based on the indication information, wherein the target data is data extracted from a data source and corresponding to the data relationship; the data relation is configured in a database table relation configuration file in advance; updating the specified data indicated by the indication information in the target data; and restoring the updated target data to the target data source. In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is an application architecture diagram of a data recovery system, data sources, and databases provided by embodiments of the present invention;
FIG. 2 is a diagram of data dependency between a data source A, a data source B, and a document-type data source C according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a data recovery method according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of a data extraction process according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating another data extraction process according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a data recovery apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.
Referring to fig. 1, an application architecture diagram of a data recovery system, data sources, and databases is shown for an embodiment of the present invention.
The data recovery system 10 is connected to a database 40.
The data recovery system 10 is connected to the data sources 20 through its own data source adapters 11.
Note that the database 40 stores a database table relationship configuration file.
The number of the data sources 20 is plural, and specifically includes a relational data source 21, a document type data source 22, a file type data source 23, a middleware data source 24, and the like.
The target data source is the data source 20 that specifies data recovery.
If data recovery is performed between two service systems, the data source 20 includes data sources corresponding to different service systems. If data recovery is in a business system, the data source 20 includes the data source of the current system.
It is further noted that the data sources are used for storing different service data.
In the embodiment of the present invention, the business data can be persisted in different data storage tools, for example, the business data is persisted to different data sources. There are different internal dependencies between each data source of the same system, and there are also some complex dependencies between different data sources, as shown in fig. 2, which is a data dependency graph between a data source a, a data source B, and a document-type data source C.
The field 1 of the data table a of the data source B and the field 2 of the data table B of the data source a have a dependency relationship, and can be expressed by a method for describing a data association relationship, for example, the dependency relationship can be expressed as < field 1 of the data table a of the data source B, field 2 of the data table B of the data source a >; the field 2 of the data table A of the data source B and the field 1 of the data table B of the data source B have a dependency relationship; a dependency relationship exists between the field 2 of the document A of the document type data source C and the field 1 of the document B of the document type data source C; the method comprises the following steps that a dependency relationship exists between a field 1 in a document A of a document type data source C and a field 2 of a data table B of the data source A; there is a dependency between field 2 of data source a data table a and field 1 of data source a data table B.
Optionally, the data association relationship may be expressed and then converted into a configuration file for description.
Further, it should be noted that the data source is a data storage technology for storing a database or a database server used by a database application, such as: the system comprises a relational database management system mysql, a relational database management system Oracle, a database Mongodb based on distributed file storage, a distributed and column-oriented open source database hbase, a search server ElasticSearch, a Hadoop distributed file system HDFS, a keyword-value distributed storage system Redis and the like.
With continued reference to fig. 1, the embodiment of the present invention also shows a specific structure of the data recovery system 10.
The data recovery system 10 includes a data source adapter 11, a storage module 12, a front-end interface 13, a configuration reader 14, a data extraction module 15, a data recovery module 16, a data quality inspection module 17, and a customized data processing module 18.
In a specific implementation, the data extraction module 15 is connected to the data source adapter 11, the storage module 12, the front-end interface 13, the configuration reader 14, and the data quality inspection module 17, respectively.
The data recovery module 16 is connected to the storage module 12, the front-end interface 13, and the customized data processing module 18, respectively.
Wherein, the data extraction module 15 is connected with the data source 20 through the data source configurator 11. The data recovery module 16 is connected to the target data source 20 through the data source configurator 11.
It should be noted that the data quality inspection module 17 may be connected to not only the data extraction module 15 but also the data recovery module 16. For example, if the data quality inspection module 17 is connected to the data extraction module 15, the data quality inspection module is used for performing quality inspection, that is, verification, on the data extracted by the data extraction module 15 in the data extraction process; if the data quality inspection module 17 is connected to the data recovery module 16, the data quality inspection module is configured to perform quality inspection, i.e., verification, on the data extracted from the storage module 12 in the data recovery process.
The process of implementing data recovery based on the application architecture shown above includes:
if the front-end interface 13 of the data recovery system 10 reads a data extraction instruction input by a user, executing the data extraction instruction; the configuration reader 14 determines the data relationship corresponding to the data extraction instruction from the database table relationship configuration file of the database 40 and sends the data relationship to the data extraction module 15.
It should be noted that the data relationship may be data in the form of a data source, a library, a table, a document or a file.
The data extraction module 15 extracts target data from the data source 20 through the data source configurator 11 based on the data relationship. The data quality inspection module 17 checks the target data, and when it is determined that the target data passes the check, the data extraction module 15 temporarily stores the target data into the memory 12.
It will be appreciated that the above described manner of staging into memory 12 may be used to immediately recover target data.
Optionally, if data cross-platform recovery needs to be performed on the data, or the data is not immediately recovered, the data extraction module 15 may generate a data file based on the target data, and store the data file into a usb disk, a hard disk, or a cloud database.
If the front-end interface 13 of the data recovery system 10 reads the data recovery command input by the user, the data recovery command is executed.
The data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating the data to be recovered and specifying the data.
The data recovery module 16 obtains the target data temporarily stored in the memory 12 based on the indication information; the customized data processing module 18 updates the specified data indicated by the indication information in the target data; after the data is updated, the data recovery module 16 recovers the updated target data to the target data source through the data source configurator 11, so as to be conveniently used by the system corresponding to the target data source.
Optionally, if the data recovery module 16 is connected to the data quality inspection module 17, before the customized data processing module 18 updates the specified data indicated by the indication information in the target data, the data quality inspection module 17 performs quality inspection, that is, verification, on the target data.
In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.
Based on the application architecture shown in the above embodiment of the present invention, as shown in fig. 3, a flow diagram of a data recovery method shown in the embodiment of the present invention is shown, where the method includes:
s301: and acquiring a data recovery instruction input by a user.
In S301, the data recovery instruction carries at least a target data source and indication information, where the target data source is a data source to be subjected to data recovery, and the indication information is used to indicate data to be recovered and specify data.
Specific contents of S301: and detecting whether a data recovery instruction triggered by a user exists in real time, and acquiring the data recovery instruction carrying a target data source and indication information when detecting the data recovery instruction input by the user.
It should be noted that the data recovery instruction is used to instruct the data recovery of the target data source.
Data recovery refers to recovering data stored in a memory to a data source of another system or another data source of the same system.
S302: and acquiring the temporarily stored target data based on the indication information.
In step S302, the target data is data extracted from the data source corresponding to the data relationship; the data relation is configured in a database table relation configuration file in advance.
In the embodiment of the present invention, the process of generating target data, that is, extracting data, as shown in fig. 4, includes the following steps:
s401: and acquiring a data extraction instruction input by a user.
Specific contents of S401: and detecting whether a data extraction instruction triggered by a user exists in real time, and acquiring the data extraction instruction when the data extraction instruction input by the user is detected.
It should be noted that the data extraction instruction is used to indicate the service data that needs to be extracted.
S402: and determining the data relation from the database table relation configuration file based on the data extraction instruction input by the user.
Specific contents of S402: and the configuration reader determines the data relationship corresponding to the data extraction instruction from the database table relationship configuration file.
The data relationship refers to an association relationship of target data to be extracted.
S403: and extracting target data corresponding to the data relation from the data source.
Specific contents of S403: and reading the corresponding data record from the data source through the data relation, namely extracting the target data.
It should be noted that the target data includes version information, data dependency information, and business data with original dependency values.
Optionally, before executing step S403 to extract target data corresponding to the data relationship from the data source, as shown in fig. 5, the method further includes:
s501: verifying the version corresponding to the data relation; if the verification is passed, executing step S403; if the verification fails, the target data cannot be acquired.
Specific contents of S501: verifying whether the version corresponding to the data relationship is the same as the version of the current business system, and if so, executing the step S403; if not, the target data cannot be acquired.
In S501, the version of the current service system is obtained from the database, and the current service system is a service system corresponding to the data source.
S404: and checking the target data, if the checking is passed, executing the step S405, and if the checking is not passed, discarding the target data and acquiring the target data again.
Specific contents of S404: checking whether the target data has relational data loss or is complete or not and whether the target data accords with a preset checking rule or not; if the target data is not missing, is complete, and meets the preset check rule, step S405 is executed, the target data is discarded, and is acquired again.
It should be noted that, the relational data missing, the data integrity, and the predetermined check rule checking may be performed on the target data, and other types of checks may also be performed, which is not limited in this embodiment of the present invention.
The preset verification rule is preset by a technician according to actual conditions, such as: the preset check rule can be set as the only field designated by the original data, the necessary field and the necessary data can not be null.
Optionally, when the unique field, the necessary field and the necessary data specified by the original data are determined to be null, it is indicated that the target data does not conform to the preset check rule.
Optionally, when it is determined that the relational data is missing or the data is incomplete, and the missing relational data or the incomplete data is non-critical data, the missing relational data or the incomplete data is complemented by using preset data, where the preset data is pre-stored by a technician.
S405: and storing the target data into the memory.
Optionally, the target data may not only be temporarily stored in the memory directly, but also be stored in a storage module such as a usb disk, a hard disk, or a cloud database.
The data file is a local file/cloud file, and the data file comprises service version information, data dependency relationship information and service data with an original dependency relationship value.
S303: and updating the specified data indicated by the indication information in the target data.
Specific contents of S303: and performing customized refreshing on the specified data indicated by the indication information in the target data.
It should be noted that the specified data is customized by the technician in advance according to the actual situation, for example: the relationship may be specified for modifying business names, modifying business rules, modifying business, etc.
It is further noted that the specified data can be imported directly or entered through an interface.
S304: and restoring the updated target data to the target data source.
Specific contents of S304: determining a dependency sequence corresponding to the dependency relationship of the updated target data; and sequentially restoring the updated target data to the target data source according to the dependence sequence. So as to facilitate the system use corresponding to the target data source.
It should be noted that, according to the dependency order, the specific implementation manner of sequentially restoring the updated target data to the target data source is to determine, according to the dependency order, data in the target data that is restored to the first data table in the target data source; traversing the Identification (ID) in the first data table, and generating a unique ID which is different from all IDs in the first data table based on the random number; inserting the data into a first data table in the target data source based on the unique ID, reversely associating the ID to a previous-level data table of the first data table, performing data recovery on the previous-level data table of the target data source, and so on until all the target data finish the data insertion operation, namely realizing the recovery of the full target data source.
Further, it should be noted that, when data is inserted into the first data table in the target data source based on the unique ID, the dependency relationship of the inserted data is updated, such as: and using and storing the unique ID in the dependency relationship and the like, and associating with all the IDs in the first data table.
The unique ID generation method includes, but is not limited to, the following methods: universal Unique Identifier (UUID), self-increment ID, distributed ID generation algorithm snowfly, distributed ID, and the like.
In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.
Corresponding to the data recovery method shown in the above invention, an embodiment of the present invention also discloses a data recovery device correspondingly, which is applied to a data recovery system, as shown in fig. 6, and is a schematic structural diagram of the data recovery device shown in the embodiment of the present invention, where the device includes:
a first obtaining unit 601, configured to obtain a data recovery instruction input by a user, where the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used to indicate data to be recovered and specified data.
A second obtaining unit 602, configured to obtain, based on the indication information, temporarily stored target data, where the target data is data extracted from a data source and corresponding to a data relationship; the data relation is configured in a database table relation configuration file in advance.
An updating unit 603, configured to update the specified data indicated by the indication information in the target data.
A restoring unit 604, configured to restore the updated target data to the target data source.
Optionally, the recovering unit 604 is specifically configured to determine a dependency order corresponding to the dependency relationship of the updated target data; and according to the dependency sequence, sequentially restoring the updated target data to a target data source.
Optionally, the method further includes: the verification unit is used for verifying whether the data relation has relation data loss or not, whether the relation data is complete or not and whether the relation data accords with a preset verification rule or not after target data corresponding to the data relation is extracted from a data source; and if the target data has no relation data loss and is complete and accords with the preset verification rule, extracting the target data corresponding to the data relation from the data source.
Optionally, the method further includes: the verification unit is used for verifying the version corresponding to the data relation before the target data corresponding to the data relation, which is extracted from the data source; and if the verification is passed, extracting the target data corresponding to the data relationship from the data source.
For specific working processes of each module and unit in the data recovery device disclosed in the above embodiment of the present invention, reference may be made to corresponding contents in the data recovery method disclosed in the above embodiment of the present invention, and details are not described here again.
In the embodiment of the invention, manual debugging is not needed, the data relation is determined through the database table relation configuration file so as to extract the target data corresponding to the data relation and temporarily store the target data, and when the data is restored, the temporarily stored target data is obtained based on the data restoration instruction; then, updating the specified data indicated by the indication information in the target data; to restore the updated target data to the target data source. Data recovery can be realized quickly.
The embodiment of the invention also discloses an electronic device, which is used for operating the database storage process, wherein the data recovery method disclosed by the above figure 3, figure 4 and figure 5 is executed when the database storage process is operated.
The embodiment of the invention also discloses a computer storage medium, which comprises a storage database storage process, wherein when the storage database storage process runs, the equipment where the storage medium is located is controlled to execute the data recovery method disclosed in the above figures 3, 4 and 5.
In the context of this disclosure, a computer storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for data recovery, the method comprising:
acquiring a data recovery instruction input by a user, wherein the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating data to be recovered and specified data;
acquiring temporarily stored target data based on the indication information, wherein the target data is data extracted from a data source and corresponding to a data relation; the data relation is pre-configured in a database table relation configuration file;
updating the specified data indicated by the indication information in the target data;
and restoring the updated target data to the target data source.
2. The method of claim 1, wherein restoring the updated target data to the target data source comprises:
determining a dependency sequence corresponding to the dependency relationship of the updated target data;
and according to the dependency sequence, sequentially restoring the updated target data to a target data source.
3. The method of claim 1, further comprising:
after target data corresponding to the data relationship is extracted from a data source, whether the data relationship has relationship data loss or is complete or not and whether a preset verification rule is met or not is verified;
and if the target data has no relation data loss and is complete and accords with the preset verification rule, extracting the target data corresponding to the data relation from the data source.
4. The method of claim 1, further comprising:
verifying a version corresponding to a data relationship before target data corresponding to the data relationship, which is extracted from a data source;
and if the verification is passed, extracting the target data corresponding to the data relationship from the data source.
5. An apparatus for data recovery, the apparatus comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a data recovery instruction input by a user, the data recovery instruction at least carries a target data source and indication information, the target data source is a data source to be subjected to data recovery, and the indication information is used for indicating data to be recovered and specified data;
a second obtaining unit, configured to obtain, based on the indication information, temporarily stored target data, where the target data is data extracted from a data source and corresponding to a data relationship; the data relation is pre-configured in a database table relation configuration file;
an updating unit, configured to update the specified data indicated by the indication information in the target data;
and the restoring unit is used for restoring the updated target data to the target data source.
6. The apparatus according to claim 5, wherein the recovery unit is specifically configured to:
determining a dependency sequence corresponding to the dependency relationship of the updated target data; and according to the dependency sequence, sequentially restoring the updated target data to a target data source.
7. The apparatus of claim 5, further comprising:
the verification unit is used for verifying whether the data relation has relation data loss or not, whether the relation data is complete or not and whether the relation data accords with a preset verification rule or not after target data corresponding to the data relation is extracted from a data source; and if the target data has no relation data loss and is complete and accords with the preset verification rule, extracting the target data corresponding to the data relation from the data source.
8. The apparatus of claim 5, further comprising:
the verification unit is used for verifying the version corresponding to the data relation before the target data corresponding to the data relation, which is extracted from the data source; and if the verification is passed, extracting the target data corresponding to the data relationship from the data source.
9. An electronic device, characterized in that the electronic device is configured to run a program, wherein the program when running performs the data recovery method according to any one of claims 1-4.
10. A computer storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, the device on which the storage medium is located is controlled to execute the data recovery method according to any one of claims 1-4.
CN202110774549.6A 2021-07-08 2021-07-08 Data recovery method and device Pending CN113448777A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110774549.6A CN113448777A (en) 2021-07-08 2021-07-08 Data recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110774549.6A CN113448777A (en) 2021-07-08 2021-07-08 Data recovery method and device

Publications (1)

Publication Number Publication Date
CN113448777A true CN113448777A (en) 2021-09-28

Family

ID=77815549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110774549.6A Pending CN113448777A (en) 2021-07-08 2021-07-08 Data recovery method and device

Country Status (1)

Country Link
CN (1) CN113448777A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179085A1 (en) * 2005-02-04 2006-08-10 International Business Machines Corporation Method, system and computer program product for backing up and recovering a database
US20180157697A1 (en) * 2016-12-07 2018-06-07 International Business Machines Corporation Updating change information for current copy relationships when establishing a new copy relationship having overlapping data with the current copy relationships
US20190005086A1 (en) * 2017-07-02 2019-01-03 Equalum Ltd. System and method for system for determining database relations based on data monitoring
CN109582504A (en) * 2018-12-05 2019-04-05 深圳软牛科技有限公司 A kind of data reconstruction method and device for apple equipment
CN110471994A (en) * 2019-07-22 2019-11-19 北京三快在线科技有限公司 Method, apparatus, storage medium and the electronic equipment of replicate data
CN110781036A (en) * 2019-10-31 2020-02-11 北京东软望海科技有限公司 Data recovery method and device, computer equipment and storage medium
US20200117543A1 (en) * 2018-10-12 2020-04-16 EMC IP Holding Company LLC Method, electronic device and computer readable storage medium for data backup and recovery
WO2021003822A1 (en) * 2019-07-11 2021-01-14 平安科技(深圳)有限公司 Data storage and recovery method and apparatus, and computer device
CN112650797A (en) * 2019-10-10 2021-04-13 杭州歌本企业服务股份有限公司 Isomerous DBMS data exchange method and system applying same

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179085A1 (en) * 2005-02-04 2006-08-10 International Business Machines Corporation Method, system and computer program product for backing up and recovering a database
US20180157697A1 (en) * 2016-12-07 2018-06-07 International Business Machines Corporation Updating change information for current copy relationships when establishing a new copy relationship having overlapping data with the current copy relationships
US20190005086A1 (en) * 2017-07-02 2019-01-03 Equalum Ltd. System and method for system for determining database relations based on data monitoring
US20200117543A1 (en) * 2018-10-12 2020-04-16 EMC IP Holding Company LLC Method, electronic device and computer readable storage medium for data backup and recovery
CN109582504A (en) * 2018-12-05 2019-04-05 深圳软牛科技有限公司 A kind of data reconstruction method and device for apple equipment
WO2021003822A1 (en) * 2019-07-11 2021-01-14 平安科技(深圳)有限公司 Data storage and recovery method and apparatus, and computer device
CN110471994A (en) * 2019-07-22 2019-11-19 北京三快在线科技有限公司 Method, apparatus, storage medium and the electronic equipment of replicate data
CN112650797A (en) * 2019-10-10 2021-04-13 杭州歌本企业服务股份有限公司 Isomerous DBMS data exchange method and system applying same
CN110781036A (en) * 2019-10-31 2020-02-11 北京东软望海科技有限公司 Data recovery method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109271326B (en) Cloud database testing method and device, equipment and storage medium thereof
CN110442371B (en) Method, device and medium for releasing codes and computer equipment
CN109358898B (en) Information processing method and device, electronic equipment and storage medium
CN113434395B (en) Automatic generation method, device, equipment and medium for test cases
CN112487083A (en) Data verification method and equipment
CN115599437B (en) Software version processing method and device, electronic equipment and storage medium
CN111273942A (en) Code generation method, storage medium, electronic device and system
CN103970061A (en) Data creating device and method
CN112307124A (en) Database synchronization verification method, device, equipment and storage medium
CN110737437A (en) compiling method and device based on code integration
CN111984264A (en) Static library generation method and device
CN111258985A (en) Data cluster migration method and device
CN107193619B (en) Method and device for automatically updating compiled version
JP4477531B2 (en) Data import method and data import apparatus
WO2021183382A1 (en) Graph-based method for inductive bug localization
CN113448777A (en) Data recovery method and device
CN109508203B (en) Method, device and system for determining version consistency
CN108304569B (en) Test data accumulation method and device
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN107247904B (en) Safety baseline item synchronization method and device
JP2005276040A (en) Degrade confirming examining method and system, and program for the same
CN115269548A (en) Method and system for generating data warehouse development model and related equipment
CN115167896A (en) Method and device for updating software version, storage medium and electronic equipment
CN111698330B (en) Data recovery method and device of storage cluster and server
CN114237976A (en) Data acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination