CN117112291A - Data backup method and backup device - Google Patents

Data backup method and backup device Download PDF

Info

Publication number
CN117112291A
CN117112291A CN202210535476.XA CN202210535476A CN117112291A CN 117112291 A CN117112291 A CN 117112291A CN 202210535476 A CN202210535476 A CN 202210535476A CN 117112291 A CN117112291 A CN 117112291A
Authority
CN
China
Prior art keywords
data
backup
writing
reading
backing
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
CN202210535476.XA
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Guizhou Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Guizhou 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 China Mobile Communications Group Co Ltd, China Mobile Group Guizhou Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210535476.XA priority Critical patent/CN117112291A/en
Publication of CN117112291A publication Critical patent/CN117112291A/en
Pending legal-status Critical Current

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
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • 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/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • 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/1458Management of the backup or restore process
    • G06F11/1466Management of the backup or restore process to make the backup process non-disruptive

Landscapes

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

Abstract

The application discloses a data backup method and a backup device, wherein the backup method comprises the following steps: in the process of reading and writing data, detecting whether time delay exists in first data which is read and written; under the condition that the time delay of the first data is determined, a first data source identifier is added to the first data; under the condition that data reading and writing are completed, second data corresponding to the first data source identifier is obtained, wherein the second data are data corresponding to the first data and stored in a source database; and backing up the second data.

Description

Data backup method and backup device
Technical Field
The present application relates to the field of data backup, and in particular, to a data backup method and a data backup device.
Background
At present, in order to ensure the reliability of data and uninterrupted operation of the system when the system fails, a backup technology is generally adopted to backup the key node data of the system. However, when a data file fails, the data is backed up by the technology, so that the data in the system cannot be well backed up, and the problem of poor integrity of the backed up data exists.
Disclosure of Invention
The application discloses a data backup method and a data backup device, which solve the problem of poor data integrity of the backup method in the related art.
In order to solve the problems, the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application discloses a data backup method, including: in the process of reading and writing data, detecting whether time delay exists in first data which is read and written; under the condition that the time delay of the first data is determined, a first data source identifier is added to the first data; under the condition that data reading and writing are completed, second data corresponding to the first data source identifier is obtained, wherein the second data are data corresponding to the first data and stored in a source database; and backing up the second data.
In a second aspect, an embodiment of the present application discloses a data backup device, including: the detection module is used for detecting whether the time delay exists in the first data for reading and writing in the process of reading and writing the data; the adding module is used for adding a first data source identifier to the first data under the condition that the time delay of the first data is determined; the acquisition module is used for acquiring second data corresponding to the first data source identifier under the condition that data reading and writing are completed, wherein the second data is data corresponding to the first data stored in a source database; and the backup module is used for backing up the second data.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect.
The technical scheme adopted by the application can achieve the following beneficial effects:
the embodiment of the application provides a data backup method, which is characterized in that whether delay exists in first data for reading and writing is detected in the process of reading and writing the data, a first data source identifier is added to the first data under the condition that the delay exists in the first data is determined, then second data corresponding to the first data source identifier is acquired under the condition that the reading and writing of the data are completed, and the second data is backed up, so that the problem of data loss caused by delay decision can be effectively solved, and the integrity of the backed up data is improved.
Drawings
Fig. 1 is a schematic flow chart of a data backup method disclosed in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data backup device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. In addition, in the specification and claims, "and/or" means at least one of the electrically connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The data backup method and the backup device disclosed in the embodiments of the present application are described in detail below with reference to the accompanying drawings by specific embodiments and application scenarios thereof.
Fig. 1 is a flowchart of a data backup method disclosed in an embodiment of the present application, where the method may be performed by an electronic device, and the electronic device may include: server and/or terminal device. In other words, the method may be performed by software or hardware installed in an electronic device, the method comprising the steps of:
s120, in the process of reading and writing data, detecting whether time delay exists in the first data which is read and written.
In the step, the data can be read and written separately, the data can be accessed firstly in the process of reading and writing the data, and the user can perform read and write balance according to the needs, specifically, the user can set corresponding read weight for each read-only library according to the hardware resource condition of the read-only library, and simultaneously support to put the main library into the read list, so that partial read requests are shared, and the resources of the read-only library can be fully utilized through the business with more reads and less writes, so that the overall business performance is obviously improved.
Because the data may fail due to the time delay in the process of reading and writing, whether the time delay exists in the first data for reading and writing is detected in the process of reading and writing the data.
And S140, adding a first data source identifier to the first data under the condition that the first data is determined to have time delay.
Under the condition that the time delay exists in the first data, the fact that the first data possibly fails is indicated, and the first data needs to be backed up is indicated, so that under the condition that the time delay exists in the first data, a first data source identifier is added to the first data, query backup is conveniently carried out according to the first data source identifier in the later period, and data reading and writing are continuously carried out.
And S160, under the condition that the reading and writing of the data are completed, acquiring second data corresponding to the first data source identifier, wherein the second data are data corresponding to the first data stored in a source database.
And under the condition that the data reading and writing are completed, acquiring second data corresponding to the first data stored in the source database based on the first data source identifier.
S180, backing up the second data.
The embodiment of the application provides a data backup method, which is characterized in that whether delay exists in first data for reading and writing is detected in the process of reading and writing the data, a first data source identifier is added to the first data under the condition that the delay exists in the first data is determined, then second data corresponding to the first data source identifier is acquired under the condition that the reading and writing of the data are completed, and the second data is backed up, so that the problem of data loss caused by delay decision can be effectively solved, and the integrity of the backed up data is improved.
In an embodiment of the present application, the backing up the second data may include: and backing up the second data based on the data type of the second data. For example, a data file storage name may be created according to the data type of the second data, and the second data may be backed up, so as to implement classified storage of the data. And then, the data types with different classifications can be input through a Data Lake Analytics (DLA) service system to perform data query after backup, so that the query efficiency is improved.
The data backup method disclosed by the application can further comprise the following steps: acquiring memory related parameters of a target database instance, wherein the target database instance is a database instance corresponding to a database containing the first data; performing data analysis on the memory related parameters, and outputting a data analysis result; and determining a diagnosis result corresponding to the target database instance based on the data analysis result. It should be noted that examples are a set of "memory" and "background process". A database is a physical store of data. The instance only exists when the database is in an operation state, and the instance is responsible for realizing various functions of providing network connection, reading and writing data files and the like for users. In general, one instance can be used for one database, and a plurality of instances can be used for one database at the same time, and the relationship between the instance and the database is one-to-many.
For example, after the second data backup is completed, the memory-related parameters of the target database instance may be obtained by querying the memory-related parameters of the target database instance, then the data analysis result corresponding to the memory-related parameters may be determined by performing data analysis on the memory-related parameters, and then the diagnosis result corresponding to the target database instance may be determined based on the data analysis result.
In one implementation, after the obtaining the memory related parameters of the target database instance, the method may further include: analyzing the memory related parameters and outputting an analysis result; and drawing a trend graph based on the analysis result. Based on the analysis results of the memory related parameters, the trend graph is drawn for display, so that a user can clearly and clearly know the analysis results of the memory related parameters, and analysis and adjustment are better performed.
Optionally, when the number of connections of the database instance reaches an upper limit and normal login is impossible, a special connection channel can be provided to help the user to view the trend chart.
In an embodiment of the present application, after the backup of the second data, the method may further include: and encrypting the second data to ensure the security of the backed-up second data storage.
In one implementation manner, after the second data is backed up, query detection can be performed on the second data, an environment for testing is developed, and under the condition that the second data is determined to be abnormal, the abnormal condition of the second data is detected, and the second data is corrected according to the abnormal detection result, so that the accuracy of the backed up data is improved.
According to the data backup method provided by the embodiment of the application, the execution main body can be a data backup device. In the embodiment of the application, the data backup device executes the data backup method as an example, and the device of the data backup method provided by the embodiment of the application is described.
Fig. 2 is a schematic structural diagram of a data backup device according to an embodiment of the present application. As shown in fig. 2, the data backup apparatus 200 includes: the device comprises a detection module 210, an addition module 220, an acquisition module 230 and a backup module 240.
In the present application, the detection module 210 is configured to detect whether a delay exists in the first data that is read and written during the process of reading and writing the data; an adding module 220, configured to add a first data source identifier to the first data if it is determined that the first data has a delay; an obtaining module 230, configured to obtain second data corresponding to the first data source identifier when the reading and writing of the data are completed, where the second data are data corresponding to the first data stored in a source database; and the backup module 240 is configured to backup the second data.
In one implementation, the backup module 240 performs backup on the second data, including: and backing up the second data based on the data type of the second data.
In one implementation, the backup apparatus further includes: the obtaining module 230 is further configured to obtain a memory-related parameter of a target database instance, where the target database instance is a database instance corresponding to a database including the first data; the analysis module is used for carrying out data analysis on the memory related parameters and outputting a data analysis result; and the determining module is used for determining a diagnosis result corresponding to the target database instance based on the data analysis result.
In one implementation, the backup apparatus further includes: the analysis module is further used for analyzing the memory related parameters after the memory related parameters of the target database instance are acquired, and outputting analysis results; and the drawing module is used for drawing a trend chart based on the analysis result.
In one implementation, the backup apparatus further includes: and the encryption module is used for encrypting the second data after the second data is backed up.
The data backup device provided by the embodiment of the application can realize each process realized by the data backup method embodiment, and in order to avoid repetition, the description is omitted here.
Optionally, as shown in fig. 3, the embodiment of the present application further provides an electronic device 300, including a processor 301 and a memory 302, where the memory 302 stores a program or an instruction that can be executed on the processor 301, and the program or the instruction implements each step of the embodiment of the backup method of data when executed by the processor 301, and the steps achieve the same technical effect, so that repetition is avoided and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the data backup method embodiment, and can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The foregoing embodiments of the present application mainly describe differences between the embodiments, and as long as there is no contradiction between different optimization features of the embodiments, the embodiments may be combined to form a better embodiment, and in view of brevity of line text, no further description is provided herein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method of backing up data, comprising:
in the process of reading and writing data, detecting whether time delay exists in first data which is read and written;
under the condition that the time delay of the first data is determined, a first data source identifier is added to the first data;
under the condition that data reading and writing are completed, second data corresponding to the first data source identifier is obtained, wherein the second data are data corresponding to the first data and stored in a source database;
and backing up the second data.
2. The backup method of claim 1, wherein the backing up the second data comprises:
and backing up the second data based on the data type of the second data.
3. The backup method of claim 1, further comprising:
acquiring memory related parameters of a target database instance, wherein the target database instance is a database instance corresponding to a database containing the first data;
performing data analysis on the memory related parameters, and outputting a data analysis result;
and determining a diagnosis result corresponding to the target database instance based on the data analysis result.
4. The backup method of claim 3, further comprising, after said retrieving the memory-related parameters of the target database instance:
analyzing the memory related parameters and outputting an analysis result;
and drawing a trend graph based on the analysis result.
5. The backup method of claim 1, further comprising, after the backing up the second data:
encrypting the second data.
6. A data backup apparatus, comprising:
the detection module is used for detecting whether the time delay exists in the first data for reading and writing in the process of reading and writing the data;
the adding module is used for adding a first data source identifier to the first data under the condition that the time delay of the first data is determined;
the acquisition module is used for acquiring second data corresponding to the first data source identifier under the condition that data reading and writing are completed, wherein the second data is data corresponding to the first data stored in a source database;
and the backup module is used for backing up the second data.
7. The backup apparatus of claim 6, wherein the backup module backs up the second data, comprising:
and backing up the second data based on the data type of the second data.
8. The backup apparatus of claim 6, further comprising:
the acquisition module is further configured to acquire a memory-related parameter of a target database instance, where the target database instance is a database instance corresponding to a database including the first data;
the analysis module is used for carrying out data analysis on the memory related parameters and outputting a data analysis result;
and the determining module is used for determining a diagnosis result corresponding to the target database instance based on the data analysis result.
9. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the data backup method of any one of claims 1-5.
10. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements the steps of the data backup method according to any one of claims 1-5.
CN202210535476.XA 2022-05-17 2022-05-17 Data backup method and backup device Pending CN117112291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210535476.XA CN117112291A (en) 2022-05-17 2022-05-17 Data backup method and backup device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210535476.XA CN117112291A (en) 2022-05-17 2022-05-17 Data backup method and backup device

Publications (1)

Publication Number Publication Date
CN117112291A true CN117112291A (en) 2023-11-24

Family

ID=88802658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210535476.XA Pending CN117112291A (en) 2022-05-17 2022-05-17 Data backup method and backup device

Country Status (1)

Country Link
CN (1) CN117112291A (en)

Similar Documents

Publication Publication Date Title
US20150169431A1 (en) Process for displaying test coverage data during code reviews
CN111475376A (en) Method and device for processing test data, computer equipment and storage medium
CN114201408A (en) Regression testing method, device, computer equipment and storage medium
CN112395157A (en) Audit log obtaining method and device, computer equipment and storage medium
CN116204438A (en) Test case generation method, automatic test method and related device
CN108228611B (en) Document information copying method and device
CN110457279B (en) Data offline scanning method and device, server and readable storage medium
CN114895879B (en) Management system design scheme determining method, device, equipment and storage medium
CN117112291A (en) Data backup method and backup device
CN116126808A (en) Behavior log recording method, device, computer equipment and storage medium
CN116185706A (en) Data backup method and device, computing and storage medium and electronic equipment
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN112231326B (en) Method and server for detecting Ceph object
CN115730016B (en) Data synchronization method, system, device, computer equipment and storage medium
CN112799952A (en) Method and equipment for automatically testing cloud platform account system authority
CN112420168B (en) Method, device, equipment and storage medium for writing data into database
CN115391225A (en) Pressure measurement method and device
CN117271445A (en) Log data processing method, device, server, storage medium and program product
CN118377663A (en) Memory testing method and device and computer equipment
CN111813786A (en) Defect detecting/processing method and device
CN116401161A (en) Interface test method, apparatus, computer device, storage medium, and program product
CN116738097A (en) Multi-system page access method, device, processor and storage medium
CN118426689A (en) Data processing method, system and equipment for solid state disk
CN117215946A (en) Account following test result comparison method and device, processor and storage medium

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