CN114003439B - Data backup method, device, equipment and storage medium - Google Patents

Data backup method, device, equipment and storage medium Download PDF

Info

Publication number
CN114003439B
CN114003439B CN202111638785.1A CN202111638785A CN114003439B CN 114003439 B CN114003439 B CN 114003439B CN 202111638785 A CN202111638785 A CN 202111638785A CN 114003439 B CN114003439 B CN 114003439B
Authority
CN
China
Prior art keywords
backup
data
cluster
backed
disk
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
CN202111638785.1A
Other languages
Chinese (zh)
Other versions
CN114003439A (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.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware 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 Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Priority to CN202111638785.1A priority Critical patent/CN114003439B/en
Publication of CN114003439A publication Critical patent/CN114003439A/en
Application granted granted Critical
Publication of CN114003439B publication Critical patent/CN114003439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F11/1453Management of the data involved in backup or backup restore using de-duplication of the data

Abstract

The invention belongs to the technical field of data processing, and discloses a data backup method, a data backup device, data backup equipment and a storage medium. According to the method and the device, when the read-write right of the cluster disk in the failover cluster is obtained, the backup recording area in the cluster disk is determined, the corresponding historical backup information in the backup recording area is obtained, the data to be backed up in the cluster disk is determined according to the historical backup information, and incremental backup is carried out on the data to be backed up. Compared with the prior art that only full backup can be performed when the authority of the cluster disk in the failover cluster is acquired, the incremental backup of the cluster disk is realized by determining the data to be backed up in the cluster disk according to the historical backup information in the backup recording area and performing incremental backup on the data to be backed up when the read authority of the cluster disk is acquired, the problem that full backup needs to be performed again after the authority of the cluster disk is transferred is effectively solved, the efficiency of data backup of the cluster disk is improved, and the backup time is effectively saved.

Description

Data backup method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data backup method, apparatus, device, and storage medium.
Background
With the development of science and technology and the progress of society, the security of data becomes more and more important, so the data is generally stored in cluster disks. In the existing cluster disk data management, only one main server has the authority of reading and writing the cluster disk at the same time, so when the main server fails, the reading and writing authority of the main server can be transferred to other standby servers in the failover cluster where the main server is located.
In the prior art, when the backup server takes over the read-write right of the cluster disk, the backup server does not know that the server with the fault writes in the data, so that the backup server can only perform full backup when the cluster disk is backed up, that is, all effective data in the cluster disk is backed up, and therefore, the backup efficiency is extremely low and the backup time is long.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a data backup method, a data backup device, data backup equipment and a data backup storage medium, and aims to solve the technical problem that in the prior art, a backup server can only perform full backup, so that the backup efficiency is low.
In order to achieve the above object, the present invention provides a data backup method, including the steps of:
when the read-write right of a cluster disk in a failover cluster is obtained, determining a backup recording area in the cluster disk;
acquiring corresponding historical backup information in the backup recording area;
and determining the data to be backed up in the cluster disk according to the historical backup information, and performing incremental backup on the data to be backed up.
Optionally, before determining the backup recording area in the cluster disk when the read-write right of the cluster disk in the failover cluster is obtained, the method further includes:
judging whether a file system corresponding to a cluster disk in the failover cluster is an identifiable file system;
and when the file system corresponding to the cluster disk is the unidentifiable file system, creating a backup recording area in the cluster disk according to the file system.
Optionally, after creating a backup recording area in the cluster disk according to the file system when the file system corresponding to the cluster disk is an unidentifiable file system, the method further includes:
when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up;
generating backup information corresponding to the data to be backed up according to the data information;
and saving the backup information to the backup recording area.
Optionally, after determining whether a file system corresponding to a cluster disk in the failover cluster is an identifiable file system, the method further includes:
when the file system corresponding to the cluster disk is an identifiable file system, determining the file system type of the file system;
and creating a backup record file in the cluster disk according to the file system type.
Optionally, after creating the backup recording file in the cluster disk according to the file system type, the method further includes:
when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up;
generating backup information corresponding to the data to be backed up according to the data information;
and saving the backup information to the backup record file.
Optionally, the determining, according to the historical backup information, data to be backed up in the cluster disk, and performing incremental backup on the data to be backed up includes:
determining data to be backed up in the cluster disk according to the historical backup information, and determining data information of the data to be backed up;
performing incremental backup on the data to be backed up to obtain an incremental backup result;
generating backup information corresponding to the data to be backed up according to the incremental backup result and the data information;
and saving the backup information to the backup recording area.
Optionally, before saving the backup information to the backup recording area, the method further includes:
and deleting the historical backup information from the backup recording area.
In addition, to achieve the above object, the present invention further provides a data backup apparatus, including:
the permission acquisition module is used for determining a backup recording area in a cluster disk when the read-write permission of the cluster disk in the failover cluster is acquired;
the backup recording module is used for acquiring corresponding historical backup information in the backup recording area;
and the incremental backup module is used for determining the data to be backed up in the cluster disk according to the historical backup information and carrying out incremental backup on the data to be backed up.
In addition, to achieve the above object, the present invention further provides a data backup device, including: a memory, a processor and a data backup program stored on the memory and executable on the processor, the data backup program configured to implement the steps of the data backup method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having a data backup program stored thereon, wherein the data backup program, when executed by a processor, implements the steps of the data backup method as described above.
When the read-write right of the cluster disk in the failover cluster is acquired, the backup recording area in the cluster disk is determined, the corresponding historical backup information in the backup recording area is acquired, the data to be backed up in the cluster disk is determined according to the historical backup information, and the data to be backed up is subjected to incremental backup. According to the method and the device, the data to be backed up in the cluster disk is determined according to the historical backup information in the backup recording area, and the data to be backed up is subjected to incremental backup, so that the incremental backup of the cluster disk is realized, the problem that full backup needs to be carried out again after the authority of the cluster disk is transferred is effectively solved, the efficiency of data backup of the cluster disk is improved, and the backup time is effectively saved.
Drawings
Fig. 1 is a schematic structural diagram of a data backup device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data backup method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a data backup method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a data backup method according to a third embodiment of the present invention;
fig. 5 is a block diagram of a data backup device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data backup device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the data backup apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the data backup appliance and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a data backup program.
In the data backup apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the data backup device of the present invention may be disposed in the data backup device, and the data backup device calls the data backup program stored in the memory 1005 through the processor 1001 and executes the data backup method provided by the embodiment of the present invention.
An embodiment of the present invention provides a data backup method, which is applied to a server in a failover cluster, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the data backup method according to the present invention.
In this embodiment, the data backup method includes the following steps:
step S10: and when the read-write right of the cluster disk in the failover cluster is acquired, determining a backup recording area in the cluster disk.
It should be understood that the executing subject of the method of this embodiment may be a data backup device having functions of data processing, network communication, and program execution, such as a tower server, a rack server, or a blade server, or other devices or devices capable of implementing the same or similar functions, and the following is collectively described with reference to the data backup device as an example, which is not limited in this embodiment.
It should be noted that the failover cluster may be a cluster server composed of two or more servers, where one server is a main server and the other servers are standby servers. The main server provides service to the outside, and the standby server is in a standby state.
The cluster disk may be a cluster of two or more storage disks shared by multiple servers in the failover cluster. The read-write permission can be the permission of a main server in the fault transfer cluster to read and write the cluster disk, and only one server in the fault transfer cluster has the read-write permission.
The backup recording area may be an area for recording server backup write data records, which is separately divided in the cluster disk.
It should be understood that, when a main server having read-write permission in a failover cluster fails, services, resources, IP cluster disks and read-write permission of the cluster disks in the main server are transferred to a standby server, and the standby server that acquires the read-write permission provides services to the outside, so that service continuity is met.
In a specific implementation, when a main server in a failover cluster having read-write permission fails, the data backup device transfers the read-write permission of a cluster disk in the failover cluster to a standby server in the failover cluster, wherein the standby server that acquires the read-write permission is regarded as the main server. And when the main server acquires the read-write right of the cluster disk in the failover cluster, determining a backup recording area in the cluster disk.
Step S20: and acquiring corresponding historical backup information in the backup recording area.
It should be noted that the historical backup information may be all incremental write data records of the cluster disk for all time periods within the scope of the entire failover cluster. The historical backup information may include information such as cluster disk offset and write length, and the historical backup record may be in various forms, for example, a bitmap, a json format text, or other custom structures, and the embodiment is not limited thereto.
It should be understood that only one of the master servers having the read-write authority can read and write the cluster disk at the same time in the failover cluster, that is, only one master server can record the disk write information to the backup recording area at the same time. When the current main server fails, the read-write permission of the cluster disk may drift to another backup server in the failover cluster, and the backup server may continue to use the backup recording area in the cluster disk, that is, the backup server may continue to record the disk write information to the backup recording area.
It should be noted that the main server, the standby server, and other servers in the failover cluster are all installed with a disk tracking module, a disk recording module, a cluster disk monitoring module, and a backup module.
The disk tracking module is used for tracking all disk writing information on the server and transmitting the writing information to the disk recording module, and the disk tracking module has different forms in different systems, for example, in a Windows system, the disk tracking module may be a disk filter driver and is used for filtering all writing information to a disk.
The disk recording module is used for recording the received disk writing information to a disk writing recording area in the corresponding cluster disk, namely a backup recording area in the cluster disk. In different file systems, the disk write recording area types of the cluster disks are different.
The cluster monitoring module is used for monitoring whether the read-write permission of the cluster disk is transferred to the server, and the monitoring mode can be various, for example, in Windows, the cluster monitoring module monitors a volume addition or removal notification of the cluster disk in a file system; in Linux, a cluster monitoring module monitors mount actions of cluster disks, if the messages cannot be received, test data can be written to the cluster disks at regular time, and when the cluster disks are not in the server, writing fails, but when the cluster disks drift to the server, writing succeeds, which is a mechanism that only one server can read and write the cluster disks at the same time.
It should be understood that, after a failure occurs in a main server having read-write permission in a failover cluster, the read-write permission on the main server is transferred to another backup server, a cluster disk monitoring module on the backup server monitors that the read-write permission of a cluster disk is transferred to the main server, the cluster disk monitoring module notifies a disk recording module to identify a disk write recording area in the cluster disk, when a subsequent backup server starts to work, a disk tracking module transmits disk write information to a disk recording module, and the disk recording module records the received disk write information to a corresponding disk write recording area in a cluster disk in a superposition manner.
The purpose of the overlay recording method is to both retain data in the previous disc write recording area and record new disc write information to the disc write recording area. The superposition mode is determined according to the disk writing recording mode, for example, if the disk writing recording mode is bitmap, the superposition mode can be bitwise or operation.
Step S30: and determining the data to be backed up in the cluster disk according to the historical backup information, and performing incremental backup on the data to be backed up.
It should be noted that the data to be backed up may be data that needs to be backed up in the cluster disk. An incremental backup may be a server with read and write rights backing up only data that has changed from the last backup.
It should be understood that, in order to avoid backup of repeated cluster disk data, the data backup device needs to determine, according to the historical backup information, cluster disk data that has been backed up by the main server before the failure occurs, determine, according to the cluster disk data that has been backed up, data to be backed up that has not been backed up, then perform incremental saving on the data to be backed up, and save the data to be backed up to the local storage medium or the cloud storage.
In a specific implementation, when controlling the backup server to perform incremental backup, the data backup device performs incremental backup by using records in a disk write recording area corresponding to the cluster disk (i.e., historical backup information in the backup recording area), because the records in the disk write recording area include all incremental write data records of the cluster disk in all time periods within the range of the whole failover cluster.
For example, when a server carrying a service fails, the read-write permission of the cluster disk on the server drifts to another standby server, the standby server starts to work normally, and disk write information is continuously recorded in a disk write recording area, then if the standby server also fails, the read-write permission of the cluster disk drifts to another standby server, and then incremental backup is performed on the standby server, the record in the disk write recording area already contains all write information of the server which fails earliest and all write information of the standby server which fails first. As can be seen from this example, no matter how many servers fail, no matter how many times the cluster disk read-write authority is drifted, the record in the last disk write recording area always contains all incremental write data records of the cluster disk in all time periods within the whole failover cluster range.
In this embodiment, when the read-write right of a cluster disk in a failover cluster is obtained, a backup recording area in the cluster disk is determined, corresponding historical backup information in the backup recording area is obtained, data to be backed up in the cluster disk is determined according to the historical backup information, and incremental backup is performed on the data to be backed up. According to the method and the device, the data to be backed up in the cluster disk is determined according to the historical backup information in the backup recording area, and the data to be backed up is subjected to incremental backup, so that the incremental backup of the cluster disk is realized, the problem that full backup needs to be carried out again after the authority of the cluster disk is transferred is effectively solved, the efficiency of data backup of the cluster disk is improved, and the backup time is effectively saved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a data backup method according to a second embodiment of the present invention.
Based on the first embodiment, in this embodiment, before the step S10, the method further includes:
step S101: and judging whether the file system corresponding to the cluster disk in the failover cluster is an identifiable file system.
It should be noted that the recognizable file system may be a file system that can be recognized by the operating system.
It should be understood that, in order to ensure that disk write information (i.e., backup information) can be saved in a cluster disk, the data backup device needs to determine in advance whether a file system corresponding to the cluster disk in the failover cluster is an identifiable file system, create a blank file in the cluster disk if the file system corresponding to the cluster disk is an identifiable file system, and save the backup information in the blank file; if the file system corresponding to the cluster disk is an unidentifiable file system, a block of area (i.e., a backup recording area) is divided in the cluster disk, and the backup information is saved in the backup recording area.
Further, in order to improve the efficiency of saving the backup information, after the step S101, the method further includes:
step S1011: when the file system corresponding to the cluster disk is an identifiable file system, determining the file system type of the file system;
step S1012: and creating a backup record file in the cluster disk according to the file system type.
It should be noted that the recognizable file system may be a file system recognizable by an operating system, for example, a file system such as windows ntfs, linux xfs or ext4, and one or more files may be created in the recognizable file system for recording disk writing information.
It should be appreciated that if the file system in the cluster disk is public and is recognizable by the operating system, a blank file or files are created into which disk write information for the cluster disk is recorded.
If the file system in the cluster disk is a public system, the recorded disk writing information is saved in a file type (for example, a text or bitmap in json format). The data backup device can classify the disk writing information (i.e. backup information) according to the recording time and the disk writing information type, create a plurality of blank files according to the classification type of the disk writing information, and store different recording times and different types of information in different blank files.
For example, the data backup device creates a blank file in the cluster disk according to the disk writing information, then writes the backup information into the blank file, and then saves the backup information into the corresponding blank file when the server performs backup.
Further, in order to improve the efficiency of saving the backup information, after step S1012, the method further includes:
step S1013: when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up;
step S1014: generating backup information corresponding to the data to be backed up according to the data information;
step S1015: and saving the backup information to the backup record file.
It should be noted that the data information may be write information of the data to be backed up, such as write offset information or write length information. The backup information recording mode can be in various forms, such as a bitmap or a custom structure like json based on text.
Step S102: and when the file system corresponding to the cluster disk is the unidentifiable file system, creating a backup recording area in the cluster disk according to the file system.
It should be noted that the unrecognized file system may be a file system unrecognized by the operating system, for example, a file system such as a windows raw or linux oracle asm, and a file cannot be created in the unrecognized file system for recording the disk writing information.
Further, in order to improve the efficiency of incremental backup and avoid backup of duplicate data, after step S102, the method further includes:
step S103: and when detecting that the main server in the failover cluster performs incremental backup on the data to be backed up in the cluster disk, acquiring data information of the data to be backed up.
Step S104: and generating backup information corresponding to the data to be backed up according to the data information.
Step S105: and saving the backup information to the backup recording area.
It should be noted that if the file system in the cluster disk is not disclosed or is not recognizable by the operating system, such as windows raw, linux oracle asm, etc., and a file cannot be created, then a separate area or areas in the cluster disk may be used for storing the disk writing information of the cluster disk.
It should be understood that, if the data backup device cannot partition this area in the cluster disk for some reason, a cluster disk may be added separately, the cluster disk becomes a recording cluster disk, the recording cluster disk is divided into a plurality of areas, each area is used for recording disk write information of one cluster disk, when a server sends a failure, the recording cluster disk may also drift along with other cluster disks and then be used by other servers for recording disk write information, or a plurality of recording cluster disks are added, that is, each cluster disk is added with one recording cluster disk for disk write information of the respective cluster disk.
In this embodiment, by determining whether a file system corresponding to a cluster disk in a failover cluster is an identifiable file system, when the file system corresponding to the cluster disk is an unidentifiable file system, a backup recording area is created in the cluster disk according to the file system. According to the invention, the corresponding backup recording area is established according to the file system corresponding to the cluster disk in the failover cluster, so that the backup information is saved, and the saving efficiency of the backup information is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a data backup method according to a third embodiment of the present invention.
Based on the first embodiment, in this embodiment, the step S30 includes:
step S301: and determining the data to be backed up in the cluster disk according to the historical backup information, and determining the data information of the data to be backed up.
It should be noted that the historical backup information may be all incremental write data records of the cluster disk for all time periods within the scope of the entire failover cluster. The data to be backed up may be data that needs to be backed up in the cluster disk. The data information may be a data size or a data storage location of the data to be backed up.
Step S302: and performing incremental backup on the data to be backed up to obtain an incremental backup result.
It should be noted that the incremental backup may be that a server with read-write authority only backs up data that has been changed by the system since the last backup. The incremental backup result may be a result of a backup duration of a backup process of the incremental backup or an integrity of backup data.
In a specific implementation, the data backup device controls a main server in the failover cluster to perform incremental backup on data to be backed up, and obtains an incremental backup result, where the incremental backup result includes information such as backup duration, backup data type, backup server identifier, and integrity of the backup data in the backup process.
Step S303: and generating backup information corresponding to the data to be backed up according to the incremental backup result and the data information.
It should be noted that the backup information may be classification information of the data to be backed up, and the backup information may be information of the data type, the data size, or the data format of the data to be backed up.
It should be understood that, in order to accurately perform incremental backup on a cluster disk in subsequent backup and avoid occurrence of duplicate backup, a backup device needs to generate corresponding backup information according to an incremental backup result and data information of data to be backed up, so that subsequent incremental backup can determine which data in the cluster disk has been backed up according to the backup information.
The data backup device determines information such as a main server identification, backup time, backup duration and backup integrity in the incremental backup according to the incremental backup result, determines information such as data size, data type and data integrity of the data to be backed up according to the data information, and then generates backup information corresponding to the data to be backed up according to the information such as the main server identification, the backup time, the backup duration, the backup integrity, the data size, the data type and the data integrity.
Step S304: and saving the backup information to the backup recording area.
It should be noted that the backup recording area may be one or more areas separately partitioned in the cluster disk and used for storing backup information, the backup recording area may be a file, or may be a separate storage area in the cluster disk, and the form of the backup recording area is determined by the file system type of the cluster disk.
Further, in order to maintain the real-time performance of the incremental backup, before step S304, the method further includes:
step S3041: and deleting the historical backup information from the backup recording area.
It should be noted that, since the data backup apparatus controls the primary server to perform incremental backup not instantaneously but continuously, during the incremental backup performed by the primary server, the server also continuously records newly written disk writing information (i.e., backup information) into the backup recording area to prepare for the next incremental backup.
It should be understood that, while the data backup device performs incremental backup information recording, in order to avoid duplicate backup, historical backup recording information needs to be deleted, otherwise, the next incremental backup will also backup previously written data, resulting in duplicate backup. Therefore, the data backup device deletes the historical backup information from the backup recording area in a mode of deleting the historical backup information while backing up.
In a specific implementation, when the data backup device finishes the backup of N data blocks, the historical backup information corresponding to the data blocks is deleted, only new backup information is reserved, and the backup is carried out at the same time until the incremental backup is finished.
In this embodiment, the data to be backed up in the cluster disk is determined according to the historical backup information, the data information of the data to be backed up is determined, incremental backup is performed on the data to be backed up to obtain an incremental backup result, backup information corresponding to the data to be backed up is generated according to the incremental backup result and the data information, and the backup information is stored in the backup recording area. According to the invention, the data information of the incremental backup data is determined, the corresponding backup information is generated according to the data information and the incremental backup result, and the backup information is stored in the backup recording area, so that the incremental backup is recorded, the repeated backup of the data is effectively avoided, and the data backup efficiency is improved.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores a data backup program, and the data backup program implements the steps of the data backup method described above when executed by a processor.
Since the storage medium adopts all the technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are provided, and are not described in detail herein.
Referring to fig. 5, fig. 5 is a block diagram illustrating a first embodiment of a data backup apparatus according to the present invention.
As shown in fig. 5, the data backup apparatus according to the embodiment of the present invention includes:
the permission obtaining module 10 is configured to determine a backup recording area in a cluster disk when obtaining a read-write permission of the cluster disk in a failover cluster;
a backup recording module 20, configured to obtain corresponding historical backup information in the backup recording area;
and the incremental backup module 30 is configured to determine data to be backed up in the cluster disk according to the historical backup information, and perform incremental backup on the data to be backed up.
Further, the permission obtaining module 10 is further configured to determine whether a file system corresponding to a cluster disk in the failover cluster is an identifiable file system; and when the file system corresponding to the cluster disk is the unidentifiable file system, creating a backup recording area in the cluster disk according to the file system.
Further, the permission obtaining module 10 is further configured to, when it is detected that the main server in the failover cluster performs incremental backup on the data to be backed up in the cluster disk, obtain data information of the data to be backed up, generate backup information corresponding to the data to be backed up according to the data information, and store the backup information in the backup recording area.
Further, the permission obtaining module 10 is further configured to determine a file system type of the file system when the file system corresponding to the cluster disk is an identifiable file system; and creating a backup record file in the cluster disk according to the file system type.
Further, the permission obtaining module 10 is further configured to obtain data information of the data to be backed up when it is detected that the main server in the failover cluster performs incremental backup on the data to be backed up in the cluster disk; generating backup information corresponding to the data to be backed up according to the data information; and saving the backup information to the backup record file.
Further, the incremental backup module 30 is further configured to determine data to be backed up in the cluster disk according to the historical backup information, and determine data information of the data to be backed up; performing incremental backup on the data to be backed up to obtain an incremental backup result; generating backup information corresponding to the data to be backed up according to the incremental backup result and the data information; and saving the backup information to the backup recording area.
Further, the incremental backup module 30 is further configured to delete the historical backup information from the backup recording area.
In this embodiment, when the read-write right of a cluster disk in a failover cluster is obtained, a backup recording area in the cluster disk is determined, corresponding historical backup information in the backup recording area is obtained, data to be backed up in the cluster disk is determined according to the historical backup information, and incremental backup is performed on the data to be backed up. According to the method and the device, the data to be backed up in the cluster disk is determined according to the historical backup information in the backup recording area, and the data to be backed up is subjected to incremental backup, so that the incremental backup of the cluster disk is realized, the problem that full backup needs to be carried out again after the authority of the cluster disk is transferred is effectively solved, the efficiency of data backup of the cluster disk is improved, and the backup time is effectively saved.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the data backup method provided in any embodiment of the present invention, and are not described herein again.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (5)

1. A data backup method is applied to a server in a failover cluster, and is characterized by comprising the following steps:
when a main server with read-write permission of a cluster disk in a fault transfer cluster fails, acquiring the read-write permission transferred by the main server;
when the read-write right of the cluster disk in the failover cluster is obtained, determining a backup recording area in the cluster disk;
acquiring corresponding historical backup information in the backup recording area;
determining data to be backed up in the cluster disc according to the historical backup information, and performing incremental backup on the data to be backed up, wherein the historical backup information is all incremental write data records of the cluster disc in the whole fault transfer cluster range, and the historical backup information comprises disc offset information and write length information of the cluster disc;
wherein, before determining the backup recording area in the cluster disk when the read-write right of the cluster disk in the failover cluster is obtained, the method further includes:
judging whether a file system corresponding to a cluster disk in the failover cluster is an identifiable file system; when the file system corresponding to the cluster disk is an unidentifiable file system, creating a backup recording area in the cluster disk according to the unidentifiable file system; when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up; generating backup information corresponding to the data to be backed up according to the data information; storing backup information corresponding to the data to be backed up into the backup recording area;
after determining whether the file system corresponding to the cluster disk in the failover cluster is the identifiable file system, the method further includes:
when the file system corresponding to the cluster disk is an unidentifiable file system and a backup recording area cannot be created in the cluster disk, adding at least one recording cluster disk to the failover cluster, wherein the recording cluster disk is used for recording backup information corresponding to data to be backed up of the cluster disk in the failover cluster;
when the file system corresponding to the cluster disk is an identifiable file system, determining the file system type of the identifiable file system; creating a backup record file in the cluster disk according to the file system type; when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up; generating backup information corresponding to the data to be backed up according to the data information; storing backup information corresponding to the data to be backed up into the backup record file;
when the file system corresponding to the cluster disk is an identifiable file system, after determining the file system type of the identifiable file system, the method further includes:
when the file system type is the open system type, creating a blank file in the cluster disk; when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up; generating backup information corresponding to the data to be backed up according to the data information; storing backup information corresponding to the data to be backed up into the blank file;
the determining, according to the historical backup information, data to be backed up in the cluster disk, and performing incremental backup on the data to be backed up specifically includes:
determining data to be backed up in the cluster disk according to the historical backup information, and determining data information of the data to be backed up; performing incremental backup on the data to be backed up to obtain an incremental backup result; generating backup information corresponding to the data to be backed up according to the incremental backup result and the data information; and storing the backup information corresponding to the data to be backed up into the backup recording area.
2. The data backup method according to claim 1, wherein before the saving of the backup information into the backup recording area, the method further comprises:
and deleting the historical backup information from the backup recording area.
3. A data backup apparatus, characterized in that the data backup apparatus comprises:
the system comprises a permission acquisition module, a failure transfer module and a failure transfer module, wherein the permission acquisition module is used for acquiring the read-write permission transferred by a main server when the main server having the read-write permission of a cluster disk in a failure transfer cluster fails; when the read-write right of the cluster disk in the failover cluster is obtained, determining a backup recording area in the cluster disk;
the backup recording module is used for acquiring corresponding historical backup information in the backup recording area;
an incremental backup module, configured to determine, according to the historical backup information, data to be backed up in the cluster disk, and perform incremental backup on the data to be backed up, where the historical backup information is all incremental write data records of the cluster disk in the whole failover cluster range, and the historical backup information includes disk offset information and write length information of the cluster disk;
determining data to be backed up in the cluster disk according to the historical backup information, and performing incremental backup on the data to be backed up, including:
determining data to be backed up in the cluster disk according to the historical backup information, and determining data information of the data to be backed up; performing incremental backup on the data to be backed up to obtain an incremental backup result; generating backup information corresponding to the data to be backed up according to the incremental backup result and the data information; storing backup information corresponding to the data to be backed up into the backup recording area;
wherein, before determining the backup recording area in the cluster disk when the read-write right of the cluster disk in the failover cluster is obtained, the method further includes:
judging whether a file system corresponding to a cluster disk in the failover cluster is an identifiable file system; when the file system corresponding to the cluster disk is an unidentifiable file system, creating a backup recording area in the cluster disk according to the unidentifiable file system; when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, acquiring data information of the data to be backed up; storing backup information corresponding to the data to be backed up into the backup recording area;
after determining whether the file system corresponding to the cluster disk in the failover cluster is the identifiable file system, the method further includes:
when the file system corresponding to the cluster disk is an unidentifiable file system and a backup recording area cannot be created in the cluster disk, adding at least one recording cluster disk to the failover cluster, wherein the recording cluster disk is used for recording backup information corresponding to data to be backed up of the cluster disk in the failover cluster;
when the file system corresponding to the cluster disk is an identifiable file system, determining the file system type of the identifiable file system; creating a backup record file in the cluster disk according to the file system type; when detecting that a main server in the failover cluster performs incremental backup on data to be backed up in the cluster disk, storing backup information corresponding to the data to be backed up into the backup recording file;
when the file system corresponding to the cluster disk is an identifiable file system, after determining the file system type of the identifiable file system, the method further includes:
when the file system type is the open system type, creating a blank file in the cluster disk; when detecting that the main server in the failover cluster performs incremental backup on the data to be backed up in the cluster disk, storing backup information corresponding to the data to be backed up in the blank file.
4. A data backup device, characterized in that the data backup device comprises: a memory, a processor, and a data backup program stored on the memory and executable on the processor, the data backup program configured to implement the data backup method of any of claims 1 to 2.
5. A storage medium having stored thereon a data backup program which, when executed by a processor, implements a data backup method according to any one of claims 1 to 2.
CN202111638785.1A 2021-12-30 2021-12-30 Data backup method, device, equipment and storage medium Active CN114003439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111638785.1A CN114003439B (en) 2021-12-30 2021-12-30 Data backup method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111638785.1A CN114003439B (en) 2021-12-30 2021-12-30 Data backup method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114003439A CN114003439A (en) 2022-02-01
CN114003439B true CN114003439B (en) 2022-05-24

Family

ID=79932495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111638785.1A Active CN114003439B (en) 2021-12-30 2021-12-30 Data backup method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114003439B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968667B (en) * 2022-05-30 2023-07-25 安超云软件有限公司 Backup management method and system
CN115168110B (en) * 2022-09-05 2022-11-29 深圳市科力锐科技有限公司 Incremental data identification method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500130A (en) * 2013-09-11 2014-01-08 上海爱数软件有限公司 Method for backing up dual-computer hot standby data in real time
CN103608781A (en) * 2011-06-06 2014-02-26 微软公司 Recovery service location for a service
CN106484313A (en) * 2015-09-01 2017-03-08 北京金山云网络技术有限公司 Data message backup method, data back up method and device
CN106844052A (en) * 2017-01-22 2017-06-13 郑州云海信息技术有限公司 A kind of method and device that fusion cluster is built based on Windows Server
CN110673982A (en) * 2019-08-26 2020-01-10 广东睿江云计算股份有限公司 Shared mysql database backup and recovery method and device
US10936545B1 (en) * 2013-12-20 2021-03-02 EMC IP Holding Company LLC Automatic detection and backup of primary database instance in database cluster

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716829A (en) * 2019-10-10 2020-01-21 浪潮云信息技术有限公司 Block storage backup method, terminal and storage medium based on Ceph technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103608781A (en) * 2011-06-06 2014-02-26 微软公司 Recovery service location for a service
CN103500130A (en) * 2013-09-11 2014-01-08 上海爱数软件有限公司 Method for backing up dual-computer hot standby data in real time
US10936545B1 (en) * 2013-12-20 2021-03-02 EMC IP Holding Company LLC Automatic detection and backup of primary database instance in database cluster
CN106484313A (en) * 2015-09-01 2017-03-08 北京金山云网络技术有限公司 Data message backup method, data back up method and device
CN106844052A (en) * 2017-01-22 2017-06-13 郑州云海信息技术有限公司 A kind of method and device that fusion cluster is built based on Windows Server
CN110673982A (en) * 2019-08-26 2020-01-10 广东睿江云计算股份有限公司 Shared mysql database backup and recovery method and device

Also Published As

Publication number Publication date
CN114003439A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN114003439B (en) Data backup method, device, equipment and storage medium
US9645892B1 (en) Recording file events in change logs while incrementally backing up file systems
CN109582443A (en) Virtual machine standby system based on distributed storage technology
CN103186554B (en) Distributed data mirror method and storage back end
US7987325B1 (en) Method and apparatus for implementing a storage lifecycle based on a hierarchy of storage destinations
WO2007005437A2 (en) Out-of-band change detection
CN104077380A (en) Method and device for deleting duplicated data and system
CN103619008A (en) System and method for performing backup and restoration on data
CN112380057A (en) Data recovery method, device, equipment and storage medium
CN101937378B (en) Method for carrying out back-up protection on data of storage equipment and computer system
WO2023226380A1 (en) Disk processing method and system, and electronic device
CN106484313A (en) Data message backup method, data back up method and device
CN111984601A (en) Log file deleting method and device, electronic equipment and storage medium
CN105608150A (en) Business data processing method and system
CN105430314A (en) Video data storage and access control method and device
CN115080309A (en) Data backup system, method, storage medium, and electronic device
US9116905B1 (en) System and method for cataloging data
CN115174596A (en) Equipment remote copying method, device and medium
CN112765129A (en) Method and equipment for realizing database data version management
CN103902919A (en) Method and device for recovering login information
CN113535477A (en) Method and equipment for data disaster recovery
CN112416655A (en) Storage disaster recovery system based on enterprise service portal and data copying method
CN113421109A (en) Service checking method, device, electronic equipment and storage medium
CN103678478A (en) Information processing apparatus, information processing method, and program
CN103684868B (en) Data guard method and device

Legal Events

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