CN116701053B - Method, device, equipment and medium for restoring data backup of production environment database - Google Patents

Method, device, equipment and medium for restoring data backup of production environment database Download PDF

Info

Publication number
CN116701053B
CN116701053B CN202310632383.3A CN202310632383A CN116701053B CN 116701053 B CN116701053 B CN 116701053B CN 202310632383 A CN202310632383 A CN 202310632383A CN 116701053 B CN116701053 B CN 116701053B
Authority
CN
China
Prior art keywords
target
task
backup
data
production environment
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.)
Active
Application number
CN202310632383.3A
Other languages
Chinese (zh)
Other versions
CN116701053A (en
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.)
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Zhengyun Data Technology Co ltd
Original Assignee
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Zhengyun Data Technology 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 Hangzhou New China And Big Polytron Technologies Inc, Hangzhou Zhengyun Data Technology Co ltd filed Critical Hangzhou New China And Big Polytron Technologies Inc
Priority to CN202310632383.3A priority Critical patent/CN116701053B/en
Publication of CN116701053A publication Critical patent/CN116701053A/en
Application granted granted Critical
Publication of CN116701053B publication Critical patent/CN116701053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for restoring data backup of a production environment database. Applied to a data backup and recovery system, the system comprises: a task repeater and at least one task executor, the method comprising: responding to the target backup task through the task relay, and determining a target task executor corresponding to the target backup task; acquiring a user identification of a target user through a target task executor, and creating a backup log record corresponding to a target backup task according to the user identification; acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message; and responding to the target recovery task, unpacking the data message, and recovering to obtain each target data. The scheme of the embodiment of the invention can accurately backup or restore the related data from the production environment database and provides basis for subsequent operation.

Description

Method, device, equipment and medium for restoring data backup of production environment database
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a data backup and recovery method, a device, equipment and a medium for a production environment database.
Background
In business fields such as finance, administration, etc., all business systems are deployed in corresponding user business environments, and developers cannot connect to the user business environments through a network; when a service system fails, a developer cannot locate the failure; at this time, it is necessary to backup or restore the related data from the production environment database to the corresponding location for debugging.
Because the data volume to be backed up is huge, and the association relation between the data is complicated, the backup of the related data is difficult to realize.
How to accurately backup or restore related data from a production environment database and provide basis for subsequent operations is a key problem in the industry.
Disclosure of Invention
The embodiment of the invention provides a data backup and recovery method, device, equipment and medium for a production environment database, which are used for accurately backing up or recovering related data from the production environment database and providing basis for subsequent operation.
According to an aspect of the embodiment of the present invention, there is provided a data backup and restore method for a production environment database, which is applied to a data backup and restore system, the data backup and restore system includes: the task relay is in communication connection with each task executor; the method comprises the following steps:
determining a target task executor corresponding to a target backup task by the task relay in response to the target backup task initiated by a target user and aiming at target data in a production environment database;
acquiring a user identification of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identification;
acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
and responding to a target recovery task initiated by a target user and aiming at target data in a production environment database, unpacking the data message, and recovering to obtain each target data.
According to another aspect of the embodiment of the present invention, there is provided a data backup and restore device for a production environment database, which is applied to a data backup and restore system, the data backup and restore system including: the task relay is in communication connection with each task executor; the device comprises:
the task executor determining module is used for determining a target task executor corresponding to a target backup task initiated by a target user and aiming at target data in a production environment database through the task repeater;
the backup log record creation module is used for acquiring the user identification of the target user through the target task executor and creating a backup log record corresponding to the target backup task according to the user identification;
the backup data message determining module is used for acquiring each target data in the production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
and the target data determining module is used for responding to a target recovery task initiated by a target user and aiming at target data in the production environment database, unpacking the data message and recovering to obtain each target data.
According to another aspect of an embodiment of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method for restoring data backup of a production environment database according to any one of the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is provided a computer readable storage medium storing computer instructions for implementing the method for restoring data backup of a production environment database according to any one of the embodiments of the present invention when executed by a processor.
According to the technical scheme, a target task executor corresponding to a target backup task is determined through a task relay in response to the target backup task which is initiated by a target user and aims at target data in a production environment database; acquiring a user identification of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identification; acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message; and in response to a target recovery task initiated by a target user and aiming at target data in the production environment database, unpacking the data message, recovering to obtain each target data, and accurately backing up or recovering related data from the production environment database to provide basis for subsequent operation.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to be used to limit the scope of the embodiments of the invention. Other features of embodiments of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for restoring backup of data of a production environment database according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for restoring data backup of a production environment database according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a data backup and restore device for a database of a production environment according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a data backup and restore method for a production environment database according to an embodiment of the present invention.
Detailed Description
In order to make the embodiments of the present invention better understood by those skilled in the art, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the embodiments of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the embodiments of the present invention and the above-described drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data backup and restore method for a production environment database according to a first embodiment of the present invention, where the method may be applied to a case of accurately backing up or restoring related data from the production environment database, and the method may be performed by a data backup and restore device for the production environment database, where the data backup and restore device for the production environment database may be implemented in hardware and/or software, and the data backup and restore device for the production environment database may be configured in an electronic device such as a computer, a server, or a tablet computer.
It should be noted that, the data backup and restore method of the production environment database related to the present embodiment may be applied to a data backup and restore system, where the data backup and restore system may include: the task relay is in communication connection with each task executor; for example, in one example of the present embodiment, the data backup and recovery system may include a task repeater and two task executors, where the task repeater is communicatively connected to the two task executors, and the two task executors may perform the data backup task and the data recovery task, respectively.
Specifically, referring to fig. 1, the method specifically includes the following steps:
step 110, determining a target task executor corresponding to a target backup task through the task relay in response to the target backup task initiated by a target user and aiming at target data in a production environment database.
The target user can be any registered user, and can send a target backup task aiming at target data to the data backup and recovery system through the client; the target data may be one data or a plurality of data, or may be one type or a plurality of types of data, which is not limited in this embodiment. By way of example, the target data may be turnover or balance of the first quarter in the financial field, etc.
In an optional implementation manner of this embodiment, after receiving a target backup task initiated by a target user and directed against target data in a production environment database, the data backup recovery system may process the received target backup task through a task relay, so as to determine a target executor corresponding to the target backup task, that is, may estimate, through the task relay, execution time and resource consumption of the received target backup task, so as to distribute the task.
Optionally, in this embodiment, determining, by the task repeater, a target task executor corresponding to the target backup task may include: generating a target task corresponding to the target backup task, and adding the target task to a task queue; acquiring the target task from a task queue, and determining the resource consumption of the target task; and determining the target task executor according to the resource consumption of the target task.
Optionally, in this embodiment, generating a target task corresponding to the target backup task may include: directly generating a target task corresponding to the target backup task according to the target backup task; or intercepting the target backup task, extracting a user access identifier of the target backup task, and performing service access arbitration according to the user access identifier; generating a target task corresponding to the target backup task under the condition that the service access arbitration passes; otherwise, an error is returned.
In an optional implementation manner of this embodiment, after receiving a target backup task initiated by a target user and directed to target data in a production environment database, a target task corresponding to the target backup task may be directly generated, and the generated target task is added to a task queue; further, each task in the task queue can be sequentially acquired, the resource consumption of each task in the task queue is determined, and the task executor of each task is determined according to each resource consumption; in this embodiment, after the target task is obtained from the task queue, the resource consumption of the target task may be determined, and the target task executor of the target task, that is, the target task executor corresponding to the target backup task, may be determined according to the resource consumption of the target task.
In another optional implementation manner of this embodiment, after receiving a target backup task initiated by a target user and directed against target data in a production environment database, the target backup task may be intercepted, a user access identifier of the target backup task is extracted, and service access arbitration is performed according to the user access identifier; generating a target task corresponding to the target backup task under the condition that the service access arbitration passes, and adding the generated target task to a task queue; further, each task in the task queue can be sequentially acquired, the resource consumption of each task in the task queue is determined, and the task executor of each task is determined according to each resource consumption.
Specifically, after receiving a target backup task initiated by a target user and aiming at target data in a production environment database, a service interceptor intercepts the target backup task, extracts a user access identifier, applies for service access arbitration in a task repeater, and if the arbitration result is that access is refused, directly returns a user error. If the arbitration result is passing, the task corresponding to the product. In this embodiment, the data backup and recovery system may also include a service interceptor; the service interceptor can be used for preventing secondary pollution of data and data errors caused if a user performs other data operations of the service when the task is executed.
And 120, acquiring a user identifier of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identifier.
In an optional implementation manner of this embodiment, after determining, by the task repeater, that the target task executor corresponding to the target backup task is obtained, the target task executor may further obtain, by the target task executor, a user identifier of the target user, and create a backup log record corresponding to the target backup task according to the obtained user identifier.
Wherein the backup log record may include at least one of: task identity, version, time, and status fields.
Optionally, in this embodiment, the target task executor may create a global task identifier (i.e., a user identifier) in the log database when receiving the target backup task; further, metadata can be obtained through a metadata base, and scheduling execution is performed according to the task type executed by the user.
And 130, acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message.
In an optional implementation manner of this embodiment, after the target task executor obtains the user identifier of the target user and creates the backup log record corresponding to the target backup task according to the obtained user identifier, the target task executor may further obtain each target data in the production environment database according to the backup log record, and assemble each target data, thereby obtaining the backup data packet.
The target data is data related to the target backup task in the production environment database.
Optionally, in this embodiment, the target task executor may perform data acquisition in the service database according to the "task+node+data identifier+version", that is, according to the backup log record, and perform data assembly to form a data packet in json format.
In an optional implementation manner of this embodiment, after obtaining each target data in the production environment database according to the backup log record, and assembling each target data to obtain a backup data packet, the method may further include: and encrypting and/or compressing the backup message data to obtain backup data corresponding to the target backup task.
Alternatively, in this embodiment, after the data assembly is completed, the data sm3 may be encrypted; further, the ciphertext of the data message can be subjected to data format compression; finally, the data backup file may be output to a storage server for download by the user and update the log database "backup" field.
And 140, unpacking the data message in response to a target recovery task initiated by a target user and aiming at target data in a production environment database, and recovering to obtain each target data.
In an optional implementation manner of this embodiment, if a target recovery task for the production environment database initiated by the target user is continuously received, the target task executor may unpack the obtained backup data packet, so as to recover and obtain each target data.
Optionally, in this embodiment, in response to a target recovery task initiated by a target user for target data in a production environment database, unpacking the data packet, and recovering to obtain each piece of target data, the method may include: reading backup data corresponding to the target backup task, decrypting the backup data to obtain decrypted data files, and dividing the decrypted data files according to task nodes to obtain divided files corresponding to each task node; assembling each divided file to obtain a database statement; and recovering the target data according to each database statement.
In an optional implementation manner of this embodiment, after receiving a target recovery task initiated by a target user for target data in the production environment database, the decryption operation may be reduced for the backup data packet, and the decrypted data file may be output at the server and divided according to the task node. Further, the database data can be deleted according to the user identification, the corresponding restored task node file is obtained according to the metadata task node, the data is loaded, the database statement is automatically assembled, the data restoration is executed, the data restoration is completed, and the following operations are performed on different results: success: prompting the user of the restored version condition; failure: and deleting the current restored data, and returning to the operation of decrypting the backup data.
According to the technical scheme of the embodiment, a target task executor corresponding to a target backup task is determined through a task relay in response to the target backup task which is initiated by a target user and aims at target data in a production environment database; acquiring a user identification of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identification; acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message; and in response to a target recovery task initiated by a target user and aiming at target data in the production environment database, unpacking the data message, recovering to obtain each target data, and accurately backing up or recovering related data from the production environment database to provide basis for subsequent operation.
Example two
Fig. 2 is a flowchart of a data backup and restore method for a production environment database according to a second embodiment of the present invention, where the technical solutions in the present embodiment are further refined, and the technical solutions in the present embodiment may be combined with each of the alternatives in one or more embodiments. As shown in fig. 2, the data backup and restoration method of the production environment database may include the steps of:
and 210, assembling each metadata in the production environment database based on preset rules.
In an alternative implementation of the present embodiment, before responding to the target backup task initiated by the target user for the target data in the production environment database, the method may further include: and assembling each metadata in the production environment database based on preset rules.
The preset rules may be extensible markup language schema document specifications (XML Schema Documentation, XSD), among others.
Optionally, in this embodiment, before responding to the target backup task initiated by the target user for the target data in the production environment database, each metadata in the production environment database may be further assembled based on the XSD specification. That is, a technician may comb according to a user business scenario, configure task metadata based on XSD specifications.
Step 220, determining a target task executor corresponding to a target backup task through the task relay in response to the target backup task initiated by a target user and aiming at target data in a production environment database;
step 230, obtaining a user identifier of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identifier;
step 240, obtaining each target data in the production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
step 250, unpacking the data message in response to a target recovery task initiated by a target user and aiming at target data in a production environment database, and recovering to obtain each target data.
According to the scheme of the embodiment, before responding to the target backup task initiated by the target user and aiming at the target data in the production environment database, all metadata in the production environment database can be assembled based on the preset rule, so that a basis is provided for subsequent backup recovery of the target data.
Example III
Fig. 3 is a schematic structural diagram of a data backup and recovery device for a production environment database according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a task executor determination module 310, a backup log record creation module 320, a backup data message determination module 330, and a target data determination module 340.
A task executor determining module 310, configured to determine, by using the task repeater, a target task executor corresponding to a target backup task initiated by a target user and aiming at target data in a production environment database;
the backup log record creating module 320 is configured to obtain, by using the target task executor, a user identifier of the target user, and create a backup log record corresponding to the target backup task according to the user identifier;
the backup data message determining module 330 is configured to obtain each target data in the production environment database according to the backup log record, and assemble each target data to obtain a backup data message;
the target data determining module 340 is configured to unpack the data packet in response to a target recovery task initiated by a target user for target data in the production environment database, and recover to obtain each target data.
According to the scheme of the embodiment, a task executor determining module is used for determining a target task executor corresponding to a target backup task initiated by a target user and aiming at target data in a production environment database; acquiring a user identification of the target user through a log record creation module, and creating a backup log record corresponding to the target backup task according to the user identification; acquiring each target data in a production environment database according to the backup log record by a data message determining module, and assembling each target data to obtain a backup data message; the data message is unpacked and recovered to obtain each target data by the data determining module in response to a target recovery task initiated by a target user and aiming at the target data in the production environment database, and the related data can be accurately backed up or recovered from the production environment database to provide basis for subsequent operation.
In an optional implementation manner of this embodiment, the data backup and recovery device of the production environment database further includes: the assembly module is used for assembling each metadata in the production environment database based on preset rules;
wherein, the preset rule is: extensible markup language schema document specification XSD.
In an optional implementation manner of this embodiment, the task executor determining module 310 is specifically configured to generate a target task corresponding to the target backup task, and add the target task to a task queue;
acquiring the target task from a task queue, and determining the resource consumption of the target task;
and determining the target task executor according to the resource consumption of the target task.
In an optional implementation manner of this embodiment, the task executor determining module 310 is further specifically configured to directly generate, according to the target backup task, a target task corresponding to the target backup task;
or,
intercepting the target backup task, extracting a user access identifier of the target backup task, and performing service access arbitration according to the user access identifier;
generating a target task corresponding to the target backup task under the condition that the service access arbitration passes;
otherwise, an error is returned.
In an optional implementation manner of this embodiment, the data backup and recovery device of the production environment database further includes: and the encryption module is used for encrypting and/or compressing the backup message data to obtain backup data corresponding to the target backup task.
In an optional implementation manner of this embodiment, the target data determining module 340 is specifically configured to read backup data corresponding to the target backup task, decrypt the backup data to obtain a decrypted data file, and segment the decrypted data file according to task nodes to obtain segmented files corresponding to the task nodes;
assembling each divided file to obtain a database statement;
and recovering the target data according to each database statement.
In an optional implementation manner of this embodiment, the backup log record includes at least one of the following:
task identity, version, time, and status fields.
The data backup and recovery device for the production environment database provided by the embodiment of the invention can execute the data backup and recovery method for the production environment database provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the embodiments of the invention described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data backup restoration method for a production environment database.
In some embodiments, the data backup restoration method of the production environment database may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data backup restoration method of the production environment database described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data backup restoration method of the production environment database in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of embodiments of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the embodiments of the present invention may be performed in parallel, sequentially or in a different order, so long as the desired result of the technical solution of the embodiments of the present invention can be achieved, which is not limited herein.
The above detailed description should not be construed as limiting the scope of the embodiments of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present invention should be included in the scope of the embodiments of the present invention.

Claims (6)

1. A data backup and recovery method of a production environment database is applied to a data backup and recovery system, and the data backup and recovery system comprises the following steps: the task relay is in communication connection with each task executor; characterized in that the method comprises:
determining a target task executor corresponding to a target backup task by the task relay in response to the target backup task initiated by a target user and aiming at target data in a production environment database;
acquiring a user identification of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identification;
acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
unpacking the data message in response to a target recovery task initiated by a target user and aiming at target data in a production environment database, and recovering to obtain each target data;
wherein the determining a target task executor corresponding to the target backup task includes:
generating a target task corresponding to the target backup task, and adding the target task to a task queue;
acquiring the target task from a task queue, and determining the resource consumption of the target task; wherein the resource consumption is estimated by the task repeater;
determining the target task executor according to the resource consumption of the target task;
wherein the backup log record includes:
task identification, version, time, and status fields;
wherein after assembling each of the target data, further comprising: sm3 encrypting the data;
wherein prior to responding to the target backup task initiated by the target user for the target data in the production environment database, the method further comprises:
assembling each metadata in the production environment database based on a preset rule;
the method comprises the steps of obtaining each target data in a production environment database according to the backup log record, assembling each target data to obtain a backup data message, and then further comprising:
encrypting and/or compressing the backup data message to obtain backup data corresponding to the target backup task;
the step of unpacking the data message in response to a target recovery task initiated by a target user and aiming at target data in a production environment database, and recovering to obtain each target data comprises the following steps:
reading backup data corresponding to the target backup task, decrypting the backup data to obtain decrypted data files, and dividing the decrypted data files according to task nodes to obtain divided files corresponding to each task node;
assembling each divided file to obtain a database statement;
recovering the target data according to each database statement;
wherein, the assembling each divided file to obtain a database statement includes:
and according to the metadata task nodes, acquiring the task node files corresponding to the recovery, loading data, and automatically assembling the database statement.
2. The method according to claim 1, wherein the preset rule is: extensible markup language schema document specification XSD.
3. The method of claim 1, wherein the generating a target task corresponding to the target backup task comprises:
directly generating a target task corresponding to the target backup task according to the target backup task;
or,
intercepting the target backup task, extracting a user access identifier of the target backup task, and performing service access arbitration according to the user access identifier;
generating a target task corresponding to the target backup task under the condition that the service access arbitration passes;
otherwise, an error is returned.
4. A data backup and recovery device of a production environment database is applied to a data backup and recovery system, and the data backup and recovery system comprises: the task relay is in communication connection with each task executor; characterized in that the device comprises:
the task executor determining module is used for determining a target task executor corresponding to a target backup task initiated by a target user and aiming at target data in a production environment database through the task repeater;
the backup log record creation module is used for acquiring the user identification of the target user through the target task executor and creating a backup log record corresponding to the target backup task according to the user identification;
the backup data message determining module is used for acquiring each target data in the production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
the target data determining module is used for responding to a target recovery task initiated by a target user and aiming at target data in the production environment database, unpacking the data message and recovering to obtain each target data;
wherein, the task executor confirms the module, is used for:
generating a target task corresponding to the target backup task, and adding the target task to a task queue;
acquiring the target task from a task queue, and determining the resource consumption of the target task; wherein the resource consumption is estimated by the task repeater;
determining the target task executor according to the resource consumption of the target task;
wherein the backup log record includes:
task identification, version, time, and status fields;
the backup data message determining module is further configured to, after assembling each of the target data: sm3 encrypting the data;
wherein the apparatus further comprises:
the assembly module is used for assembling each metadata in the production environment database based on a preset rule before responding to a target backup task initiated by a target user and aiming at target data in the production environment database;
the backup data acquisition module is used for encrypting and/or compressing the backup data message to obtain backup data corresponding to the target backup task;
the target data determining module is specifically configured to read backup data corresponding to the target backup task, decrypt the backup data to obtain a decrypted data file, and segment the decrypted data file according to task nodes to obtain segmented files corresponding to the task nodes; assembling each divided file to obtain a database statement; recovering the target data according to each database statement;
wherein, the assembling each divided file to obtain a database statement includes: and according to the metadata task nodes, acquiring the task node files corresponding to the recovery, loading data, and automatically assembling the database statement.
5. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data backup restoration method of the production environment database of any one of claims 1-3.
6. A computer readable storage medium storing computer instructions for causing a processor to perform the method of recovering data backup of a production environment database according to any one of claims 1-3.
CN202310632383.3A 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database Active CN116701053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310632383.3A CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310632383.3A CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Publications (2)

Publication Number Publication Date
CN116701053A CN116701053A (en) 2023-09-05
CN116701053B true CN116701053B (en) 2024-03-19

Family

ID=87833266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310632383.3A Active CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Country Status (1)

Country Link
CN (1) CN116701053B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369338A (en) * 2023-11-15 2024-01-09 广州飞数工业软件有限公司 Operation and maintenance management system and method for industrial manufacturing equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488546A (en) * 2013-01-29 2014-01-01 中国人民解放军理工大学 Backup and recovery method capable of supporting online concurrency of multi-level data and database
CN108170867A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of metadata service system
US10146629B1 (en) * 2015-03-30 2018-12-04 EMC IP Holding Company LLC Extensible workflow manager for backing up and recovering microsoft shadow copy compatible applications
CN112181948A (en) * 2020-09-30 2021-01-05 中国工商银行股份有限公司 Database operation statement processing method and device, electronic equipment and medium
CN112363871A (en) * 2020-11-23 2021-02-12 腾讯科技(深圳)有限公司 Data file returning method, device and storage medium
CN113946565A (en) * 2021-10-29 2022-01-18 中国建设银行股份有限公司 Method and system for supporting sub-base and sub-table migration of heterogeneous data
CN115599603A (en) * 2022-10-25 2023-01-13 上海安钛飞信息技术有限公司(Cn) Data recovery method and system for distributed database
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system
CN115934414A (en) * 2022-11-09 2023-04-07 上海爱数信息技术股份有限公司 Data backup method, data recovery method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488546A (en) * 2013-01-29 2014-01-01 中国人民解放军理工大学 Backup and recovery method capable of supporting online concurrency of multi-level data and database
US10146629B1 (en) * 2015-03-30 2018-12-04 EMC IP Holding Company LLC Extensible workflow manager for backing up and recovering microsoft shadow copy compatible applications
CN108170867A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of metadata service system
CN112181948A (en) * 2020-09-30 2021-01-05 中国工商银行股份有限公司 Database operation statement processing method and device, electronic equipment and medium
CN112363871A (en) * 2020-11-23 2021-02-12 腾讯科技(深圳)有限公司 Data file returning method, device and storage medium
CN113946565A (en) * 2021-10-29 2022-01-18 中国建设银行股份有限公司 Method and system for supporting sub-base and sub-table migration of heterogeneous data
CN115599603A (en) * 2022-10-25 2023-01-13 上海安钛飞信息技术有限公司(Cn) Data recovery method and system for distributed database
CN115934414A (en) * 2022-11-09 2023-04-07 上海爱数信息技术股份有限公司 Data backup method, data recovery method, device, equipment and storage medium
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李爽等.《红蓝对抗 解密渗透测试与网络安全建设》.李爽等,2022,334. *
薛飞等.《云计算数据中心规划与设计》.北京理工大学出版社,2021,96. *

Also Published As

Publication number Publication date
CN116701053A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
EP3049968B1 (en) Master schema shared across multiple tenants with dynamic update
US20160342666A1 (en) Performance checking component for an etl job
US20140026120A1 (en) Unit testing an enterprise javabeans (ejb) bean class
CN110858172A (en) Automatic test code generation method and device
GB2529246A (en) Method for securing integrity and consistency of a cloud storage service with efficient client operations
US9785507B2 (en) Restoration of consistent regions within a streaming environment
CN116701053B (en) Method, device, equipment and medium for restoring data backup of production environment database
US20160323362A1 (en) Automatic task tracking
CN111338834B (en) Data storage method and device
US10318385B2 (en) Service recovery using snapshots and interservice messages
US20180239749A1 (en) Techniques for asynchronous execution of computationally expensive local spreadsheet tasks
US11416801B2 (en) Analyzing value-related data to identify an error in the value-related data and/or a source of the error
CN112241332B (en) Interface compensation method and device
CN112445860B (en) Method and device for processing distributed transaction
CN116503005A (en) Method, device, system and storage medium for dynamically modifying flow
CN114417070A (en) Method, device and equipment for converging data authority and storage medium
CN112559547A (en) Method and device for determining consistency among multiple storage object copies
CN113326038A (en) Method, apparatus, device, storage medium and program product for providing service
US10671505B2 (en) System and method for monitoring service
US20180302480A1 (en) Method and device for maintaining session of network storage device
CN117131071B (en) Data processing method, device, electronic equipment and computer readable medium
CN113760765B (en) Code testing method and device, electronic equipment and storage medium
US11797388B1 (en) Systems and methods for lossless network restoration and syncing
CN113590447B (en) Buried point processing method and device
US20210286680A1 (en) Method, electronic device and computer program product for storage management

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
GR01 Patent grant
GR01 Patent grant