CN116382974A - Customized data protection processing method - Google Patents

Customized data protection processing method Download PDF

Info

Publication number
CN116382974A
CN116382974A CN202310282691.8A CN202310282691A CN116382974A CN 116382974 A CN116382974 A CN 116382974A CN 202310282691 A CN202310282691 A CN 202310282691A CN 116382974 A CN116382974 A CN 116382974A
Authority
CN
China
Prior art keywords
data
backup
database
recovery
client
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
CN202310282691.8A
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.)
Anxin Wangdun Beijing Technology Co ltd
Original Assignee
Anxin Wangdun Beijing 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 Anxin Wangdun Beijing Technology Co ltd filed Critical Anxin Wangdun Beijing Technology Co ltd
Priority to CN202310282691.8A priority Critical patent/CN116382974A/en
Publication of CN116382974A publication Critical patent/CN116382974A/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
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

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

Abstract

The invention discloses a protection processing method of customized data, which comprises the following steps: receiving a data backup instruction sent by a client, wherein the data backup instruction comprises: business units needing backup; searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database; and sending the packed backup data to a server for storage. The user realizes the backup and recovery of important data according to the service system by the customized data backup and recovery method; meanwhile, the data recovery scenes of different clients are taken into consideration, and two recovery modes of synchronization and asynchronization are provided.

Description

Customized data protection processing method
Technical Field
The invention relates to the technical field of data storage, in particular to a protection processing method of customized data.
Background
Along with the development and change of a service system, the protection of data becomes more and more important, and the backup and recovery of data becomes a common function and means of data security protection at the present stage, and the backup and recovery function of data often becomes the optimal choice of an enterprise system under the condition that a huge and complex backup disaster recovery system cannot be established in a short period. Most of the prior art is a full-scale backup of the entire database, in which there is a large amount of invalid historical data, and users want to be able to selectively backup and restore critical business data. At the same time flexible backup schemes and restoration approaches become more and more important taking into account the limitations of storage space.
The backup and recovery schemes for data in the prior art are not many. First, most of the tables in the whole database are backed up or restored by taking the database as the minimum unit, and the customization needs of users are not considered, for example: the user hopes to only backup the host asset and the data grouped by the user, and historical attack record data is not considered any more; a method for full back-up and full restoration is disclosed in patent application No. 201010233924.8, which does not consider the business needs of the user. Second, the data recovery method only considers the scene of recovering data of the same client, such as the patent with the patent number of CN 110196787A.
Disclosure of Invention
The embodiment of the invention aims to provide a protection processing method for customized data, which solves the problem that a user realizes the backup and recovery of important data according to own service system by using a user customized data backup and recovery method.
In order to solve the above technical problems, a first aspect of an embodiment of the present invention provides a protection processing method for customized data, including the following steps:
receiving a data backup instruction sent by a client, wherein the data backup instruction comprises: business units needing backup;
searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database;
and sending the packed backup data to a server for storage.
Further, after receiving the data backup instruction sent by the client, the method further includes:
and acquiring a distributed lock for data backup, wherein the distributed lock controls the data backup to be performed only once within a preset duration.
Further, before searching the corresponding data table in the database, the method further includes:
detecting whether the database connection is normal;
detecting whether a database record for which data backup is being performed exists;
and detecting whether the login user has the authority of the data backup function.
Further, before searching the corresponding data table in the database, the method further includes:
inserting a record of which the database is being backed up into the database, and modifying the backup state into the data backup in progress;
and modifying the backup state into data backup after the backup data is sent to the server.
Further, backing up the structure and data of the data table and packaging after adding the version information of the database, including:
creating basic information of a backup package, wherein the basic information comprises: server id, database version information, current system information;
when the data table structure is processed, upgrading or rolling back the data table structure according to the current version;
compressing all the backup files and backup information files, and packaging the compressed files and backup information files into one backup data file.
Further, the backup data includes: public configuration and user assets;
the public configuration performs backup of the whole table;
and the user asset backs up the data in the visible range of the user according to the identity information of the user.
Further, after the packaged backup data is sent to the server for storage, the method further includes:
receiving a data recovery instruction sent by a client, wherein the data recovery instruction comprises: a service unit needing to be recovered;
sending data request information to a server and receiving a backup file;
decompressing the backup file, and judging whether the version information of the database in the backup file is consistent with the version of the database of the data to be restored;
if the data tables are consistent, restoring the backup data in the backup file to the corresponding data table in the data of the data to be restored, and deleting other data tables and data in the database of the data to be restored.
Further, after receiving the data recovery instruction sent by the client, the method further includes:
and acquiring a distributed lock for data recovery, wherein the distributed lock controls the data recovery to be carried out only once within a preset duration.
Further, before sending the data request information to the server and receiving the backup file, the method further includes:
detecting whether the database connection of the data to be recovered is normal or not;
detecting whether the versions of the backup package in the file server are consistent or not, and ensuring the integrity of the backup package through md5 verification of the backup package;
and controlling the user in login in the database of the data to be recovered to be offline.
Further, the receiving the data recovery instruction sent by the client further includes:
judging whether the client is an original backup client corresponding to the backed-up file;
if so, adopting a synchronous recovery mode to recover the data, wherein the synchronous recovery mode is to wait for the complete recovery of the data to return to success;
if not, adopting an asynchronous recovery mode to recover the data, wherein the asynchronous recovery mode is realized by using a coroutine created by using Goroutine, and the success can be returned without waiting for the complete recovery of the data.
Accordingly, a second aspect of the embodiments of the present invention provides a data processing apparatus, for backing up data by using any one of the above protection processing methods for customized data, including:
the first instruction receiving module is used for receiving a data backup instruction sent by the client, and the data backup instruction comprises: business units needing backup;
the data backup module is used for searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding the version information of the database;
and the data sending module is used for sending the packaged backup data to the server for storage.
Further, the data processing apparatus further includes:
the first lock control module is used for acquiring a distributed lock of the data backup, and the distributed lock controls the data backup to be carried out only once within a preset duration.
Further, the data backup module includes:
a first connection detection unit for detecting whether the database connection is normal;
a state detection unit for detecting whether there is a database record in which data backup is being performed;
and the permission detection unit is used for detecting whether the login user has the permission of the data backup function.
Further, the data backup module further includes:
a state modifying unit, configured to insert a record that is being backed up by the database into the database, and modify the backup state into data backup in progress;
and modifying the backup state into data backup after the backup data is sent to the server.
Still further, the data backup module further comprises:
a basic information creation unit for creating basic information of a backup package, wherein the basic information comprises an id of a server, version information of a database and current system information;
the table structure processing unit is used for upgrading or rolling back the table structure of the database according to the current version when the data table structure is processed;
and the file compression unit is used for compressing all the backup files and the backup information files and packaging the backup files and the backup information files into one backup data file.
Further, the backup data includes: public configuration and user assets;
the public configuration performs backup of the whole table;
and the user asset backs up the data in the visible range of the user according to the identity information of the user.
Further, the data processing apparatus further includes:
the second instruction receiving module is used for receiving a data recovery instruction sent by the client, and the data recovery instruction comprises: a service unit needing to be recovered;
the backup file receiving module is used for sending data request information to the server and receiving the backup file;
the data decompression module is used for decompressing the backup file and judging whether the version information of the database in the backup file is consistent with the version of the database of the data to be restored;
and the data recovery module is used for recovering the backup data in the backup file to a data table corresponding to the data of the data to be recovered when the database version information in the backup file is consistent with the database version of the data to be recovered, and deleting other data tables and data in the database of the data to be recovered.
Further, the data processing apparatus further includes:
the second lock control module is used for acquiring a distributed lock for data recovery, and the distributed lock controls the data recovery to be carried out only once within a preset duration.
Further, the data decompression module includes:
the second connection detection unit is used for detecting whether the database connection of the data to be recovered is normal or not;
the version detection unit is used for detecting whether the versions of the backup package in the file server are consistent or not, and ensuring the integrity of the backup package through md5 verification of the backup package;
and the user control unit is used for controlling the user in login to be offline in the database of the data to be recovered.
Further, the data processing apparatus further includes: a recovery mode control module, the recovery mode control module comprising:
a client judging unit, configured to judge whether the client is an original backup client corresponding to the backed up file;
the recovery mode control unit is used for carrying out data recovery in a synchronous recovery mode when the client is the same as the original backup client corresponding to the backed-up file, wherein the synchronous recovery mode is to wait for the complete recovery of the data and return the data to success;
the recovery mode control unit is further configured to perform data recovery by adopting an asynchronous recovery mode when the client is an original backup client corresponding to the backed-up file, where the asynchronous recovery mode is implemented by using a protocol created by using golutene, and the success can be returned without waiting for all data recovery.
Accordingly, a third aspect of the embodiment of the present invention provides an electronic device, including: at least one processor; and a memory coupled to the at least one processor; the memory stores instructions executable by the one processor, and the instructions are executed by the one processor, so that the at least one processor executes the protection processing method of the customized data.
Accordingly, a fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the above-described protection processing method for customized data.
The technical scheme provided by the embodiment of the invention has the following beneficial technical effects:
and the service unit is taken as the minimum backup unit, corresponding data is backed up based on the selection of the user on the key service/service, in the recovery mode, the same client adopts a synchronous recovery mode, different clients adopt an asynchronous recovery mode, the user can carry out data backup on the client A, the data recovery function of the client B is realized, and the use experience of the user can be better optimized through asynchronous realization in the recovery process.
Drawings
FIG. 1 is a schematic diagram of a protection processing method for customized data according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for protecting customized data according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a method for protecting customized data according to an embodiment of the present invention;
FIG. 4 is a second logic diagram of a method for protecting customized data according to an embodiment of the present invention;
FIG. 5 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of a data backup module provided by an embodiment of the present invention;
FIG. 7 is a block diagram of a data decompression module provided by an embodiment of the present invention;
fig. 8 is a block diagram of a recovery mode control module according to an embodiment of the present invention.
Reference numerals:
1. the system comprises a first instruction receiving module, 2, a data backup module, 21, a connection detecting unit, 22, a state detecting unit, 23, a right detecting unit, 24, a state modifying unit, 25, a basic information creating unit, 26, a table structure processing unit, 27, a file compressing unit, 3, a data sending module, 4, a first locking module, 5, a second instruction receiving module, 6, a backup file receiving module, 7, a data decompressing module, 71, a second connection detecting unit, 72, a version detecting unit, 73, a user control unit, 8, a data recovering module, 9, a second locking module, 10, a recovering mode control module, 101, a client judging unit, 102 and a recovering mode control unit.
Detailed Description
The objects, technical solutions and advantages of the present invention will become more apparent by the following detailed description of the present invention with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
Referring to fig. 1 and 2, a first aspect of an embodiment of the present invention provides a protection processing method for customized data, including the following steps:
step S110, receiving a data backup instruction sent by a client, where the data backup instruction includes: the backup service units are needed.
Step S130, searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database.
And step S150, the packed backup data is sent to a server for storage.
The present invention relates generally to three components, as shown in fig. 1: the client part, the database part and the server part respectively. The client part is mainly an interactive interface used for backup and restoration by a user, and is mainly logic for processing backup and restoration. The database part is mainly used for storing the original data of the business module, and the server part is mainly used for storing the compressed backup file. The data backup and recovery process is mainly performed for the database part.
Further, in step S110, after receiving the data backup instruction sent by the client, the method further includes:
step S120, a distributed lock for data backup is obtained, and the distributed lock controls the data backup to be performed only once within a preset time period.
Further, referring to fig. 3, in step S130, before searching the corresponding data table in the database, the method further includes:
step S130a, detecting whether the database connection is normal;
in step S130b, it is detected whether there is a database record in which data backup is being performed.
Step S130c, detecting whether the login user has the authority of the data backup function, and ensuring that the function is only opened to the operation and maintenance manager and the system manager.
Further, in step S130, before searching the corresponding data table in the database, the method further includes:
step S130d, inserting a record of the backup of the database into the database, and modifying the backup state into the data backup in progress; the backup state is modified to be the end of data backup after the backup data is sent to the server.
Further, in step S130, the step of backing up the structure and data of the data table and performing the packaging process after adding the version information of the database further includes:
in step S130e, basic information of the backup package is created, where the basic information includes id of the server, version information of the database, and current system information.
In step S130f, when the data table structure is processed, the database table structure is updated or rolled back according to the current version.
Step S130g, compressing all the backup files and backup information files, and packaging into a backup data file.
The backup data mainly comprises: public configuration and user assets. Carrying out backup of the whole table by public configuration; and the user asset backs up the data in the visible range of the user according to the identity information of the user.
Referring to fig. 3, the detailed flow of data backup is as follows:
(1) The distributed lock is acquired, and the same backup operation can only exist once in unit time.
(2) Before backup, firstly checking whether the database connection is normal or not, and ensuring that the database connection is normal is the basis of service backup. It is checked whether there is already a database record in the backup, avoiding the user to send multiple backup requests consecutively.
(3) And inserting a record of a new database backup, and setting the backup state as a backup.
(4) Searching a data table associated with a business unit designated by a user, backing up the table structure and data of the corresponding data table, and storing each table in the form of a backup file.
(5) And finally compressing all the backup files, attaching backup information and database version information, and finally storing in a tar package mode.
(6) And uploading the tar to a file server for storage, and allowing a user to download the tar by himself.
(7) Updating the state of the latest database backup record to finish data backup.
In another real-time manner of the embodiment of the present invention, referring to fig. 4, in step S150, after sending the packaged backup data to the server for storage, the method further includes:
step S210, receiving a data recovery instruction sent by the client, where the data recovery instruction includes: the service element that needs to be restored.
Step S230, sending data request information to the server and receiving the backup file.
Step S250, decompressing the backup file and judging whether the version information of the database in the backup file is consistent with the version of the database of the data to be restored;
and step S270, if the backup data in the backup file are consistent, restoring the backup data in the backup file to a corresponding data table in the data of the data to be restored, and deleting other data tables and data in the database of the data to be restored.
Further, in step S210, after receiving the data recovery instruction sent by the client, the method further includes:
step S221, a distributed lock for data recovery is obtained, and the distributed lock control data recovery can only be carried out once within a preset duration.
Further, referring to fig. 7, in step S230, before sending the data request information to the server and receiving the backup file, the method further includes:
step S222, detecting whether the database connection of the data to be restored is normal.
Step S223, detecting whether the versions of the backup package in the file server are consistent, avoiding the downloaded backup package from being maliciously tampered by other people, and ensuring the integrity of the backup package through md5 verification of the backup package.
Step S224, the user who is logging in is controlled to be off line in the database of the data to be recovered.
Further, in step S210, the receiving the data recovery instruction sent by the client further includes:
step S211, determining whether the client is an original backup client corresponding to the backed up file.
Step S212, if yes, adopting a synchronous recovery mode to recover the data, wherein the synchronous recovery mode is to wait for the complete recovery of the data to return to success.
Step S213, if not, adopting an asynchronous recovery mode to recover the data, wherein the asynchronous recovery mode is realized by using a protocol created by Goroutine, and success can be returned without waiting for complete recovery of the data.
When the user recovers the data, the synchronous or asynchronous recovery mode can be selected, the synchronous recovery mode can ensure that the data can be logged after being completely recovered, and other operations can not be performed during the process, so that the synchronous or asynchronous recovery mode is generally used for recovering the data of the same client; the asynchronous recovery mode is used for recovering data among different clients, a user can check an operation log firstly through the asynchronous recovery mode, and log in the corresponding client after the data recovery is successful, so that the user experience can be optimized.
Referring to fig. 7, the detailed flow of data recovery is as follows:
(1) The distributed lock is acquired, and the same recovery operation can only exist once in unit time.
(2) The check before recovery includes: firstly, whether the database connection is normal or not is checked, and ensuring the database connection is normal is the basis of service recovery. And secondly, checking whether the backup package versions are consistent or not, and finally, forcing other logging-in users to be disconnected.
(3) And downloading the backup files of the corresponding versions from the file server, and performing MD5 verification on the backup files when downloading the data backup files to ensure the integrity of the backup package.
(4) Decompressing the compressed package and checking whether the version information of the contained database is consistent
(5) And restoring the corresponding data table according to the service unit designated by the user, and deleting redundant table and library data in the existing database.
(6) Updating the state of the latest database recovery record to finish the data recovery.
Accordingly, referring to fig. 5, a second aspect of the embodiment of the present invention provides a data processing apparatus for backing up data by any one of the above protection processing methods for customized data, including:
the first instruction receiving module 1 is configured to receive a data backup instruction sent by a client, where the data backup instruction includes: business units needing backup;
the data backup module 2 is used for searching a corresponding data table in the database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database;
and the data sending module 3 is used for sending the packaged backup data to a server for storage.
Further, the data processing apparatus further includes:
the first lock control module 4 is configured to obtain a distributed lock for data backup, where the distributed lock controls the data backup to be performed only once within a preset duration.
Further, referring to fig. 6, the data backup module 2 includes:
a first connection detecting unit 21 for detecting whether the database connection is normal;
a state detection unit 22 that detects whether there is a database record in which data backup is being performed;
and a right detection unit 23 for detecting whether the login user has the right of the data backup function.
Further, the data backup module 2 further includes:
a state modifying unit 24 for inserting a record of which the database is being backed up into the database, and modifying the backup state to be in progress for data backup; the backup state is modified to be the end of data backup after the backup data is sent to the server.
Still further, the data backup module 2 further includes:
a basic information creation unit 25 for creating basic information of the backup package, the basic information including an id of the server, database version information, current system information;
a table structure processing unit 26 for upgrading or rollback of the database table structure according to the current version when performing the data table structure processing;
and a file compression unit 27 for compressing all the backup files and backup information files and packing them into one backup data file.
Further, backing up the data includes: public configuration and user assets;
carrying out backup of the whole table by public configuration;
and the user asset backs up the data in the visible range of the user according to the identity information of the user.
In another implementation manner of the embodiment of the present invention, the data processing apparatus further includes:
a second instruction receiving module 5, configured to receive a data recovery instruction sent by the client, where the data recovery instruction includes: a service unit needing to be recovered;
a backup file receiving module 6 for transmitting data request information to the server and receiving the backup file;
the data decompression module 7 is used for decompressing the backup file and judging whether the version information of the database in the backup file is consistent with the version of the database of the data to be restored;
and the data recovery module 8 is used for recovering the backup data in the backup file to the corresponding data table in the data of the data to be recovered when the database version information in the backup file is consistent with the database version of the data to be recovered, and deleting other data tables and data in the database of the data to be recovered.
Further, the data processing apparatus further includes:
and the second lock control module 9 is used for acquiring the distributed lock for data recovery, and the distributed lock control data recovery can only be carried out once within a preset time period.
Further, referring to fig. 7, the data decompression module 7 includes:
a second connection detecting unit 71 for detecting whether the database connection of the data to be restored is normal;
a version detection unit 72, configured to detect whether the versions of the backup packages in the file server are consistent, and ensure the integrity of the backup packages through md5 verification of the backup packages;
and a user control unit 73 for controlling the user who is logging in to be off-line in the database of the data to be restored.
Further, referring to fig. 8, the data processing apparatus further includes: the recovery mode control module 10, the recovery mode control module 10 includes:
a client determining unit 101, configured to determine whether the client is an original backup client corresponding to the backed up file;
the recovery mode control unit 102 is configured to perform data recovery in a synchronous recovery manner when the client is the same as the original backup client corresponding to the backed-up file, where the synchronous recovery manner is to wait for all data recovery to return to success;
the recovery mode control unit 102 is further configured to perform data recovery by adopting an asynchronous recovery mode when the client is different from the original backup client corresponding to the backed-up file, where the asynchronous recovery mode is implemented by using a protocol created by using gooutamine, and the success can be returned without waiting for the complete recovery of the data.
In the above technical solution, the backup data process of the data processing apparatus mainly includes: the user selects the service units and modules to be backed up through the client, then searches the associated data table from the database according to the service unit module selected by the user, backs up the structure and data of the data table, finally copies the backup information of each table into a compression packet, attaches version information of the database, uploads the compression packet to the file server, records the operation log, and finishes the data backup; the recovery process mainly comprises the following steps: and the user downloads the backup file to be restored from the file server before restoring by selecting the service module to be restored, checks whether the corresponding service module data exists in the backup file, then carries out data restoration on the corresponding table in the database, and records the operation log, so that the data restoration is completed.
Accordingly, a third aspect of the embodiment of the present invention provides an electronic device, including: at least one processor; and a memory coupled to the at least one processor; the memory stores instructions executable by a processor, and the instructions are executed by the processor, so that at least one processor executes the protection processing method of the customized data.
Accordingly, a fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the above-described protection processing method for customized data.
The embodiment of the invention aims to protect a protection processing method of customized data, which comprises the following steps: receiving a data backup instruction sent by a client, wherein the data backup instruction comprises: business units needing backup; searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database; and sending the packed backup data to a server for storage. The technical scheme has the following effects:
and the service unit is taken as the minimum backup unit, corresponding data is backed up based on the selection of the user on the key service/service, in the data recovery mode, the same client adopts a synchronous recovery mode, different clients adopt an asynchronous recovery mode, the user can carry out data backup on the client A, the data recovery function of the client B is realized, and the use experience of the user can be better optimized through asynchronous realization in the recovery process.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention without departing from the spirit and scope of the invention, which is intended to be covered by the claims.

Claims (10)

1. The customized data protection processing method is characterized by comprising the following steps:
receiving a data backup instruction sent by a client, wherein the data backup instruction comprises: business units needing backup;
searching a corresponding data table in a database according to the service unit, backing up the structure and data of the data table, and packaging after adding version information of the database;
and sending the packed backup data to a server for storage.
2. The method for protecting customized data according to claim 1, wherein after receiving the data backup command sent by the client, the method further comprises:
and acquiring a distributed lock for data backup, wherein the distributed lock controls the data backup to be performed only once within a preset duration.
3. The method for protecting customized data according to claim 1, wherein before searching the database for the corresponding data table, the method further comprises:
detecting whether the database connection is normal;
it is detected whether there is a database record in which a data backup is being performed.
And detecting whether the login user has the authority of the data backup function.
4. The method for protecting customized data according to claim 1, wherein before searching the database for the corresponding data table, the method further comprises:
inserting a record of which the database is being backed up into the database, and modifying the backup state into the data backup in progress;
and modifying the backup state into data backup after the backup data is sent to the server.
5. The protection processing method of customized data according to claim 1, wherein the backing up the structure and data of the data table and performing the packaging processing after adding the database version information comprises:
creating basic information of a backup package, wherein the basic information comprises an id of a server, version information of a database and current system information;
when the data table structure is processed, upgrading or rolling back the data table structure according to the current version;
compressing all the backup files and backup information files, and packaging the compressed files and backup information files into one backup data file.
6. The method for protecting customized data as recited in claim 5, wherein,
the backup data includes: public configuration and user assets;
the public configuration performs backup of the whole table;
and the user asset backs up the data in the visible range of the user according to the identity information of the user.
7. The method for protecting customized data according to any one of claims 1-6, wherein after sending the packaged backup data to the server for storage, the method further comprises:
receiving a data recovery instruction sent by a client, wherein the data recovery instruction comprises: a service unit needing to be recovered;
sending data request information to a server and receiving a backup file;
decompressing the backup file, and judging whether the version information of the database in the backup file is consistent with the version of the database of the data to be restored;
if the data tables are consistent, restoring the backup data in the backup file to the corresponding data table in the data of the data to be restored, and deleting other data tables and data in the database of the data to be restored.
8. The method for protecting customized data according to claim 7, wherein after receiving the data recovery instruction sent by the client, the method further comprises:
and acquiring a distributed lock for data recovery, wherein the distributed lock controls the data recovery to be carried out only once within a preset duration.
9. The method for protecting customized data as claimed in claim 7, wherein before sending the data request information to the server and receiving the backup file, the method further comprises:
detecting whether the database connection of the data to be recovered is normal or not;
detecting whether the versions of the backup package in the file server are consistent or not, and ensuring the integrity of the backup package through md5 verification of the backup package;
and controlling the user in login in the database of the data to be recovered to be offline.
10. The method for protecting and processing customized data according to claim 7, wherein the receiving the data recovery command sent by the client further comprises:
judging whether the client is an original backup client corresponding to the backed-up file;
if so, adopting a synchronous recovery mode to recover the data, wherein the synchronous recovery mode is to wait for the complete recovery of the data to return to success;
if not, adopting an asynchronous recovery mode to recover the data, wherein the asynchronous recovery mode is realized by using a coroutine created by using Goroutine, and the success can be returned without waiting for the complete recovery of the data.
CN202310282691.8A 2023-03-21 2023-03-21 Customized data protection processing method Pending CN116382974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310282691.8A CN116382974A (en) 2023-03-21 2023-03-21 Customized data protection processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310282691.8A CN116382974A (en) 2023-03-21 2023-03-21 Customized data protection processing method

Publications (1)

Publication Number Publication Date
CN116382974A true CN116382974A (en) 2023-07-04

Family

ID=86970449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310282691.8A Pending CN116382974A (en) 2023-03-21 2023-03-21 Customized data protection processing method

Country Status (1)

Country Link
CN (1) CN116382974A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467421A (en) * 2010-11-19 2012-05-23 深圳市金蝶友商电子商务服务有限公司 Tenant-data-based processing method and computer
CN104714858A (en) * 2013-12-13 2015-06-17 中国移动通信集团公司 Data backup method, data recovery method and device
CN105740096A (en) * 2016-01-21 2016-07-06 浪潮(北京)电子信息产业有限公司 Method and apparatus for data remote disaster tolerance backup of cluster file system
CN111796969A (en) * 2020-05-29 2020-10-20 湖北工业大学 Data difference compression detection method, computer equipment and storage medium
CN112596951A (en) * 2020-12-24 2021-04-02 深圳市科力锐科技有限公司 NAS data disaster tolerance method, device, equipment and storage medium
CN113568686A (en) * 2020-10-30 2021-10-29 深圳市九九互动科技有限公司 Asynchronous processing method and device of Lua language, computer equipment and storage medium
CN114721873A (en) * 2022-04-13 2022-07-08 山东浪潮科学研究院有限公司 Asynchronous execution data backup and recovery system
CN115659384A (en) * 2022-09-14 2023-01-31 平安银行股份有限公司 Database security management method and device, computer equipment and storage medium
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467421A (en) * 2010-11-19 2012-05-23 深圳市金蝶友商电子商务服务有限公司 Tenant-data-based processing method and computer
CN104714858A (en) * 2013-12-13 2015-06-17 中国移动通信集团公司 Data backup method, data recovery method and device
CN105740096A (en) * 2016-01-21 2016-07-06 浪潮(北京)电子信息产业有限公司 Method and apparatus for data remote disaster tolerance backup of cluster file system
CN111796969A (en) * 2020-05-29 2020-10-20 湖北工业大学 Data difference compression detection method, computer equipment and storage medium
CN113568686A (en) * 2020-10-30 2021-10-29 深圳市九九互动科技有限公司 Asynchronous processing method and device of Lua language, computer equipment and storage medium
CN112596951A (en) * 2020-12-24 2021-04-02 深圳市科力锐科技有限公司 NAS data disaster tolerance method, device, equipment and storage medium
CN114721873A (en) * 2022-04-13 2022-07-08 山东浪潮科学研究院有限公司 Asynchronous execution data backup and recovery system
CN115659384A (en) * 2022-09-14 2023-01-31 平安银行股份有限公司 Database security management method and device, computer equipment and storage medium
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
富亚军编著: "《企业互联网架构原理与实践》", 机械工业出版社, pages: 7 *

Similar Documents

Publication Publication Date Title
US11513926B2 (en) Systems and methods for instantiation of virtual machines from backups
US11169890B2 (en) System, method and program product for backing up data
CN109558215B (en) Backup method, recovery method and device of virtual machine and backup server cluster
JP4446738B2 (en) System and method for efficiently backing up computer files
US7865473B2 (en) Generating and indicating incremental backup copies from virtual copies of a data set
CA2178213C (en) Incremental backup system
US20070208918A1 (en) Method and apparatus for providing virtual machine backup
CN103885806B (en) The implementation method and device of the systems soft ware online upgrading of Set Top Box
US20060015545A1 (en) Backup and sychronization of local data in a network
US8578203B2 (en) Providing a backup service from a remote backup data center to a computer through a network
WO2008092912A1 (en) System and method of error recovery for backup applications
WO2006052869A2 (en) Replicated data validation
US7506116B2 (en) Maintaining and using information on updates to a data group after a logical copy is made of the data group
CN110825562B (en) Data backup method, device, system and storage medium
JPH08254047A (en) Equipment and method of controlling trouble permission key
CN113886143B (en) Virtual machine continuous data protection method and device and data recovery method and device
US20240061749A1 (en) Consolidating snapshots using partitioned patch files
JP2000200208A (en) Method and device for file backup, and program recording medium
CN114328009A (en) Unified disaster recovery backup method and device for heterogeneous database based on virtualization and snapshot
CN112333008B (en) Cloud host complete machine backup and restoration method, device, equipment and storage medium
CN116382974A (en) Customized data protection processing method
US20120303590A1 (en) Management of deduplicated data during restoration in a network archival and retrieval system
CN114443356A (en) Container cluster processing method and system
CN114490176A (en) Disaster recovery system and disaster recovery method for Linux cross-disk volume group
CN114281246B (en) Cloud hard disk online migration method, device and equipment based on cloud management platform

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