Data backup method and device

By using kernel-state drivers to monitor and store data changes during data backup, the problem of large space and long generation time of snapshots is solved, and efficient and secure data backup is achieved.

CN119311471APending Publication Date: 2025-01-14CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411340381.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Existing data backup methods rely on snapshot technology, resulting in snapshots taking up a large storage space and long generation time, and they cannot effectively deal with data changes during data backup, which may lead to data loss.

Method used

Install the kernel-state driver on the target server, obtain and monitor logical volume information through the kernel-state driver, register block devices, bind request queues, identify and transfer data changes in real time, avoid creating physical snapshots, and realize incremental backups.

Benefits of technology

Reduces storage space usage, shortens backup time, improves backup speed, ensures data integrity and security, and avoids data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311471A_ABST
    Figure CN119311471A_ABST
Patent Text Reader

Abstract

The invention relates to a data backup method and device, and belongs to the technical field of computer storage. Comprising the steps of installing a kernel mode drive program, starting a user mode backup application program, obtaining logical volume information of a target server, sending the logical volume information to the kernel mode drive program, registering a block device consistent with the logical volume information in a kernel of the target server, distributing a block device request queue in the kernel of the target server, the method comprises the steps of receiving a logical volume request queue in a target server, binding the logical volume request queue in the target server to a block device request queue, receiving logical volume bitmap information, determining change data according to the logical volume bitmap information, transferring the change data, and receiving a backup data reading request through a block device; and judging whether the data reading request relates to changed data, if so, returning the transferred data to the user state backup application program, otherwise, returning the disk data to the user state backup application program, and storing the obtained returned data to the storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer storage, and in particular to a data backup method and device. Background Art

[0002] Data backup is the basis of disaster recovery. In order to prevent data loss due to system failures and other reasons, backing up the data on the host is an essential operation. A common data backup method is to use snapshots to back up the system. When recovery is needed, the backed-up snapshot is used to restore the system.

[0003] Data backup can ensure the security, availability and continuity of data and prevent data loss or damage due to unexpected events. It is an indispensable part of information management, especially when enterprises and individual users deal with important data. Data backup enables enterprises to quickly restore data and business processes after disasters or emergencies, ensuring business continuity and operational efficiency. Data backup provides enterprises and individuals with a long-term data protection solution to ensure data availability, integrity and continuity.

[0004] Currently, snapshots are usually used for data backup. However, during the backup process, additional storage space is required to store and save the snapshots. When the amount of server data to be backed up is large, the time to create the snapshot will be longer and the space occupied by the snapshot will also be larger. During the snapshot creation process, if there is data change, the snapshot cannot store this part of the data, which may lead to data loss during data recovery, posing a great threat to data backup. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the invention is to provide a data backup method and device, which can solve the problem of snapshots occupying large storage space, effectively cope with the backup of changed data during the data backup process, shorten the time for generating data during the backup process, and promptly handle the problem of possible loss of production data, thereby improving the security of the data backup process.

[0006] A first aspect of the present invention provides a data backup method, the method comprising:

[0007] S1, install the kernel-mode driver on the target server to be backed up;

[0008] S2, start the user-mode backup application on the target server, obtain the logical volume information of the target server, and send the logical volume information to the kernel-mode driver;

[0009] S3, registers a block device consistent with the logical volume information in the target server kernel through the kernel-mode driver;

[0010] S4, allocating a block device request queue in the target server kernel, and binding the logical volume request queue in the target server to the block device request queue;

[0011] S5, receiving and recording the logical volume bitmap information obtained by the user-mode backup application;

[0012] S6, determining the changed data according to the logical volume bitmap information, and transferring the changed data;

[0013] S7, receiving a data read request for backup from a user-mode backup application through a block device;

[0014] S8, determining whether the data read request involves changed data, if so, returning the transferred data to the user-state backup application, otherwise, returning the disk data to the user-state backup application;

[0015] S9, storing the obtained returned data in a storage medium.

[0016] Furthermore, the kernel-mode driver is specifically snapshotdriver.ko.

[0017] Furthermore, the logical volume information includes sector range and capacity.

[0018] Furthermore, the logical volume information of the target server is obtained, specifically:

[0019] Get the logical volume information of the target server through the file system layer.

[0020] Furthermore, S6 specifically includes:

[0021] S601, recording the logical volume bitmap information at the backup start time;

[0022] S602, obtaining real-time logical volume bitmap information;

[0023] S603, comparing the real-time logical volume bitmap information with the logical volume bitmap information at the start time of backup, and outputting the changed data;

[0024] S604, transferring the changed data.

[0025] Furthermore, after S9, it also includes:

[0026] Remove the block device in the target server kernel.

[0027] A second aspect of the present invention provides a data backup device for implementing any one of the data backup devices of the first aspect, the device comprising:

[0028] Installation module, used to install kernel-mode drivers on the target server to be backed up;

[0029] The acquisition module is used to start the user-mode backup application on the target server, obtain the logical volume information of the target server, and send the logical volume information to the kernel-mode driver;

[0030] A registration module is used to register a block device consistent with the logical volume information in the kernel of the target server through a kernel-mode driver;

[0031] An allocation module, used for allocating a block device request queue in a target server kernel and binding a logical volume request queue in the target server to the block device request queue;

[0032] A first receiving module, used for receiving and recording the logical volume bitmap information obtained by the user-mode backup application;

[0033] The transfer module is used to determine the changed data according to the logical volume bitmap information and transfer the changed data;

[0034] A second receiving module is used to receive a data read request for backup from a user-mode backup application through a block device;

[0035] A determination module, used to determine whether the data read request involves changed data, and if so, return the transferred data to the user-mode backup application; otherwise, return the disk data to the user-mode backup application;

[0036] The storage module is used to store the obtained returned data in a storage medium.

[0037] Furthermore, the kernel-mode driver is specifically snapshotdriver.ko.

[0038] Furthermore, the logical volume information includes sector range and capacity.

[0039] Furthermore, the logical volume information of the target server is obtained, specifically:

[0040] Get the logical volume information of the target server through the file system layer.

[0041] Furthermore, the transfer module is specifically used for:

[0042] Record the logical volume bitmap information at the start time of the backup;

[0043] Get real-time logical volume bitmap information;

[0044] Compare the real-time logical volume bitmap information with the logical volume bitmap information at the start of the backup, and output the changed data;

[0045] Transfer the changed data.

[0046] Furthermore, it also includes:

[0047] The removal module is used to remove block devices in the target server kernel.

[0048] A third aspect of the present invention provides a data backup system, comprising: a memory and one or more processors.

[0049] One or more application programs are stored in the memory, and the one or more application programs are suitable for being executed by one or more processors to implement the data backup device of the first aspect.

[0050] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. The computer program can be loaded and executed by a processor to form a data backup device according to the first aspect.

[0051] The beneficial effects of the present invention are as follows:

[0052] In an embodiment of the present invention, when using backup software to back up a server, a snapshot of the server is no longer created, and a kernel-mode driver is introduced to complete the snapshot work. The driver obtains the server data at the time of backup startup. At the same time, the driver can monitor the changes of the target server data in the backup process in real time according to the logical volume bitmap information. When the backup is completed, the kernel-mode driver is still running in the kernel. The next time the backup program runs, you can choose to only make an incremental backup of the server. At this time, the driver will return this part of the changed data to the backup software for storage. During the backup process, the driver is used to register a new block device in the kernel, and the request queue of the original logical volume is bound to the new block device. All I / O requests on the logical volume will be taken over by the block device. When an I / O request for data occurs on the logical volume, the request first reaches the block device. The block device will return the transfer data or disk data to the backup software according to the business logic of the backup software to complete the data backup, thereby solving the problem of large snapshot space occupation and long snapshot creation time, while reducing the occupied space and improving the backup speed, and can effectively monitor the changed data during the backup process, realize complete data backup, avoid data loss, and improve data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0054] Figure 1 It is a flowchart of a data backup method provided by an embodiment of the present invention;

[0055] Figure 2 It is a structural schematic diagram of a data backup device provided by an embodiment of the present invention;

[0056] Figure 3 It is a structural diagram of a data backup system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0058] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0059] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0061] The present invention proposes a data backup method and device to solve the problems that existing data backup often relies on snapshot technology, resulting in large storage space occupied by snapshots, long generation time, possible loss of production data, and inability to adapt to data changes during data backup.

[0062] Method Embodiment

[0063] Reference Figure 1 , shows a flow chart of a data backup method provided by an embodiment of the present invention.

[0064] An embodiment of the present invention provides a data backup method, the method comprising:

[0065] Specifically, the method includes steps S1 to S9:

[0066] S1, install the kernel-mode driver on the target server to be backed up.

[0067] The target server refers to the computer or server that needs to perform data backup. It is the center of data storage and processing, and the backup operation is intended to protect the important data on it.

[0068] A kernel-mode driver is a program that runs in the operating system kernel and is responsible for interacting directly with the hardware. A kernel-mode driver can perform lower-level operations, such as directly accessing hardware resources, thereby improving system performance and responsiveness.

[0069] It should be noted that installing a kernel-mode driver on the target server to be backed up provides direct access to the underlying hardware, improves the efficiency and performance of the backup process, and allows real-time monitoring and management of logical volumes, thereby enhancing the overall reliability of the system.

[0070] In a possible implementation manner, the kernel-mode driver is specifically snapshotdriver.ko.

[0071] Among them, snapshotdriver.ko is a kernel-mode driver for implementing the snapshot function, allowing the operating system to capture the data state at a specific point in time for efficient data backup and recovery.

[0072] It should be noted that the kernel-mode driver simplifies the interaction between user-mode applications and hardware, thus improving the convenience of system management.

[0073] S2, start the user state backup application on the target server, obtain the logical volume information of the target server, and send the logical volume information to the kernel state driver.

[0074] Among them, the user-state backup application is a program running in the user state, which is responsible for initiating and managing backup operations. Compared with the kernel state, the user state has higher security, but is also subject to more restrictions. The user-state backup application is separated from the core part of the operating system and is mainly responsible for data collection and processing of backup requests. Logical volume information refers to metadata about the logical volume, including sector range and capacity. The logical volume is a virtualized storage unit that allows flexible storage management. Logical volume information helps the backup program identify and locate the data that needs to be backed up.

[0075] It should be noted that starting the user-mode backup application and obtaining the logical volume information can quickly identify and obtain the system status, help formulate an accurate backup strategy, ensure data consistency during the backup process, and reduce potential data loss risks.

[0076] In a possible implementation, the logical volume information of the target server is obtained by specifically obtaining the logical volume information of the target server through a file system layer.

[0077] Among them, the file system layer is the structure and logic used to manage and store files in the operating system. It is responsible for organizing and managing data on the disk so that users and applications can easily read and write files. The file system layer can access the relevant metadata of the logical volume, such as size, location, and status, which enables the backup application to accurately identify and process the logical volumes that need to be backed up.

[0078] S3, registers a block device consistent with the logical volume information in the target server kernel through the kernel-mode driver.

[0079] Among them, a block device is a data storage device where data is read and written in blocks of fixed size (usually 512 bytes or larger). Common block devices include hard disk drives and solid-state drives (SSDs), which allow random access and are suitable for efficient data processing, achieving a close association between logical volumes and block devices and improving data access speed.

[0080] S4, allocating a block device request queue in the target server kernel, and binding the logical volume request queue in the target server to the block device request queue.

[0081] Among them, the block device request queue is a queue for managing read and write requests for block devices. It stores pending I / O requests in the kernel to ensure that the requests are processed in order or priority, thereby improving system performance and efficiency. The logical volume request queue is a queue for specific I / O requests for logical volumes. The logical volume request queue contains all read and write operation requests for logical volumes. It is used to organize and schedule I / O requests during the backup process.

[0082] It should be noted that by allocating block device request queues and binding logical volume request queues, the efficiency of data reading and writing can be effectively improved, I / O performance can be optimized, latency can be reduced, more efficient concurrent processing can be allowed, and the responsiveness of the system can be improved.

[0083] S5, receiving and recording the logical volume bitmap information obtained by the user-mode backup application.

[0084] The bitmap information is bitmap information used to represent the status of a set of data items. In the context of a logical volume, the bitmap information represents whether each data block in the logical volume is modified or used. The status of each bit is usually used to indicate whether the corresponding data block needs to be backed up.

[0085] It should be noted that by recording the changes in the logical volume bitmap information, the integrity and consistency of data backup can be ensured, and real-time monitoring of the backup status can be provided, which helps to detect potential problems in a timely manner.

[0086] S6, determining the changed data according to the logical volume bitmap information, and transferring the changed data.

[0087] Among them, changed data refers to the data that has been modified, added or deleted in the logical volume since the last backup. By identifying these changes, the backup process can be carried out more efficiently and only the necessary data can be transferred.

[0088] Specifically, the changed data is determined according to the logical volume bitmap information to reduce the backup time, reduce the impact on system performance, reduce storage requirements, improve backup efficiency, and enhance user experience.

[0089] In a possible implementation, S6 specifically includes:

[0090] S601, recording the logical volume bitmap information at the backup start time.

[0091] The logical volume bitmap information at the time when the backup starts refers to the state of the logical volume recorded when the backup operation starts.

[0092] S602, obtaining real-time logical volume bitmap information.

[0093] The real-time logical volume bitmap information refers to the logical volume status information dynamically obtained during the backup operation.

[0094] S603, comparing the real-time logical volume bitmap information with the logical volume bitmap information at the backup start time, and outputting the changed data.

[0095] S604, transferring the changed data.

[0096] It should be noted that by systematically recording and comparing the bitmap information of the logical volume, the changed data can be efficiently identified and transferred, reducing resource consumption during backup. In addition, by continuously monitoring and obtaining data status in real time, the consistency and reliability of the backup are ensured, making the recovery process smoother and more accurate. This incremental backup strategy not only improves system performance, but also reduces storage requirements and optimizes overall data management.

[0097] S7, receiving a data read request for backup from a user-mode backup application through a block device.

[0098] The data read request refers to a request sent by a user-mode backup application to a block device, requesting to read a specific data block. The data read request may be an access to backup data or other data.

[0099] Specifically, receiving data read requests through block devices ensures that data read requests during the backup process are processed in a timely manner, avoids data bottlenecks, improves the parallel processing capability of the system, and enhances overall performance.

[0100] S8, determining whether the data read request involves changed data, if so, returning the transferred data to the user-state backup application, otherwise, returning the disk data to the user-state backup application.

[0101] Disk data refers to the original data stored on the block device. These data may not be transferred. By judging whether the data read request involves changed data, the data access efficiency is optimized, the flexibility of the backup process is improved, and the efficient operation of user-mode applications is ensured.

[0102] S9, storing the obtained returned data in a storage medium.

[0103] Among them, the returned data refers to the data obtained from the block device after processing the data read request, which can also be the transferred change data or original disk data. The storage medium refers to the device or medium used to save data, such as a hard disk, solid-state drive or cloud storage. It is used to store backup data for a long time for future recovery.

[0104] It should be noted that by writing the returned data to the storage medium, the persistence and reliability of the backup data are ensured, data loss is prevented, a reliable basis is provided for subsequent data recovery, and the disaster recovery capability of the system is enhanced.

[0105] In a possible implementation manner, after S9, the method further includes:

[0106] Remove the block device in the target server kernel.

[0107] It should be noted that deleting block devices can free up system resources, reduce the burden on memory and processors, ensure that other operations can be performed more efficiently, simplify kernel configuration, and make the system easier to manage and operate, especially when performing subsequent backup or data recovery, which helps to improve system performance, security, and management efficiency.

[0108] Specifically, first, install the kernel-mode driver on the server that needs to be backed up; then, start and run the user-mode backup application on the server that needs to be backed up; then use the backup application to obtain the information of the logical volume on the server that needs to be backed up, including the sector range and size occupied by the volume; and notify the driver of the logical volume information through the backup application. The driver registers a new block device in the kernel based on the logical volume information. The sector range and size of the block device are consistent with the sector range and size of the logical volume; then, the backup application obtains the bitmap information on the logical volume, and notifies the driver of the bitmap information of the logical volume, and the driver records the bitmap information; during the backup process, the driver applies to the kernel to allocate a request queue for the block device, and the original logical The request queue of the logical volume is bound to the new block device. At this time, all I / O requests for the original logical volume will be taken over by the new block device. When the data of the original volume changes during the backup process, the block device receives the changed I / 0 request and transfers the data of the changed disk data block or directly sends the I / 0 request to the disk; when the backup application starts to read data for data backup, it directly reads the new block device. After the driver receives the read data I / O request, it determines whether the I / O request is directly sent to the disk and returns the disk data to the upper-level application based on the transmitted bitmap information, or returns the transferred data to the upper-level application from the transferred data; after the backup application receives the backup data returned by the driver, it writes the backup data to the backup storage to complete the data backup process.

[0109] For example, the whole process is as follows: install the backup driver snapshotdriver.ko on the host that needs to perform data backup; start the backup application backupapp on the host that needs to perform data backup; the backup application backupapp obtains the sector and size information of the volume / dev / sda1 on the host; the backup application backupapp sends the volume information to the backup driver snapshotdriver.ko; after the backup driver snapshotdriver.ko receives the volume information, it registers a new block device / dev / snapshotdev according to the volume information; the backup application backupapp obtains the bitmap information of the volume / dev / sda1 and sends it to the backup driver snapshotdriver.ko; the backup driver applies for a request queue for the new block device and binds the request queue of the original logical volume to the request queue of the new block device; the backup application backupapp accesses the block device / dev / snapshotdev to read the backup data; after the backup driver snapshotdriver.ko receives the I / O request of the backup application backup, it returns the block data of the disk to the application backupapp; after the backup application backupapp receives the disk data, it stores the data in the storage medium.

[0110] In actual use, the data backup method installs a kernel-mode driver, starts a user-mode backup application, obtains logical volume information, registers a block device through a kernel-mode driver, and uses the block device to receive data read requests. The entire process ensures data consistency and accuracy based on the recorded initial and real-time bitmap information, and enhances the reliability of data recovery. In addition, the modular design simplifies management, releases resources to improve system performance, and reduces security risks, thereby providing a safe and reliable data management solution. During the entire backup process, no physical snapshot is created, but a block device is registered in the kernel by the driver. When the backup is completed, the block device is removed from the kernel. The time and space used here are much smaller than the time and space used to create a snapshot. At the same time, the data changes during the backup process can also be monitored.

[0111] The beneficial effects of the present invention are as follows:

[0112] When using backup software to back up the server, no snapshot is created for the server. A kernel-mode driver is introduced to complete the snapshot work. The driver obtains the server data at the time of backup startup. At the same time, the driver can monitor the changes of the target server data in real time during the backup process based on the logical volume bitmap information. When the backup is completed, the kernel-mode driver is still running in the kernel. When the backup program runs next time, you can choose to only make incremental backups of the server. At this time, the driver will return this part of the changed data to the backup software for storage. During the backup process, the driver is used to register a new block device in the kernel, and the request queue of the original logical volume is bound to the new block device. All I / O requests on the logical volume will be taken over by the block device. When an I / O request for data occurs on the logical volume, the request first reaches the block device. The block device will return the transfer data or disk data to the backup software according to the business logic of the backup software to complete the data backup, thereby solving the problem of large snapshot space occupation and long snapshot creation time. While reducing the occupied space, the backup speed is improved, and the changed data during the backup process can be effectively monitored to achieve complete data backup, avoid data loss, and improve data security.

[0113] Device Embodiment

[0114] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a data backup device provided by an embodiment of the present invention.

[0115] Another specific embodiment of the present invention discloses a data backup device, which is used to implement any one of the method embodiments. The data backup device 20 includes:

[0116] Installation module 201, used to install a kernel-mode driver on a target server to be backed up;

[0117] The acquisition module 202 is used to start the user-mode backup application on the target server, obtain the logical volume information of the target server, and send the logical volume information to the kernel-mode driver;

[0118] A registration module 203, used to register a block device consistent with the logical volume information in the target server kernel through a kernel-mode driver;

[0119] The allocation module 204 is used to allocate a block device request queue in the target server kernel and bind the logical volume request queue in the target server to the block device request queue;

[0120] A first receiving module 205, used to receive and record the logical volume bitmap information obtained by the user-mode backup application;

[0121] The transfer module 206 is used to determine the changed data according to the logical volume bitmap information and transfer the changed data;

[0122] The second receiving module 207 is used to receive a backup data reading request from a user-mode backup application through a block device;

[0123] The judging module 208 is used to judge whether the data read request involves changed data, and if so, return the transferred data to the user-mode backup application; otherwise, return the disk data to the user-mode backup application;

[0124] The storage module 209 is used to store the obtained returned data in a storage medium.

[0125] In a possible implementation manner, the kernel-mode driver is specifically snapshotdriver.ko.

[0126] In a possible implementation, the logical volume information includes sector range and capacity.

[0127] In a possible implementation, the logical volume information of the target server is obtained, specifically:

[0128] Get the logical volume information of the target server through the file system layer.

[0129] In a possible implementation, the transfer module is specifically used for:

[0130] Record the logical volume bitmap information at the start time of the backup;

[0131] Get real-time logical volume bitmap information;

[0132] Compare the real-time logical volume bitmap information with the logical volume bitmap information at the start of the backup, and output the changed data;

[0133] Transfer the changed data.

[0134] In a possible implementation, it further includes:

[0135] The removal module is used to remove block devices in the target server kernel.

[0136] The device provided in the embodiment of the present invention can implement each process and step in the above method embodiment, and can obtain the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0137] The beneficial effects of the present invention are as follows:

[0138] In an embodiment of the present invention, a kernel-mode driver is first installed on a target server to be backed up to improve the efficiency and performance of the backup process, and then a user-mode backup application is started to obtain logical volume information to ensure data consistency during the backup process and reduce potential data loss risks. A close association between logical volumes and block devices is achieved by registering block devices in the kernel-mode driver to improve data access speed. By allocating block device request queues and binding logical volume request queues, the efficiency of data reading and writing is improved, I / O performance is optimized, and latency is reduced. Then, logical volume bitmap information is received and recorded, and the integrity and consistency of data backup are ensured by recording changes. Changed data is determined based on the logical volume bitmap information, and backup time is reduced, the impact on system performance is reduced, and user experience is improved. Data read requests are received through block devices to improve the parallel processing capability of the system and enhance overall performance. By determining whether a data read request involves changed data, the flexibility of the backup process is improved to ensure efficient operation of user-mode applications. Finally, the returned data is stored in a storage medium to ensure the persistence and reliability of backup data and prevent data loss.

[0139] System Example

[0140] Reference Manual Attached Figure 3 , showing a structural schematic diagram of a data backup system provided by an embodiment of the present invention.

[0141] The present invention provides a data backup system 30 , including: a memory 303 and one or more processors 301 .

[0142] One or more application programs are stored in the memory 303 , and the one or more application programs are suitable for being executed by the one or more processors 301 to implement the data backup device of the method embodiment.

[0143] The data backup system 30 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302.

[0144] The structure of the data backup system 30 does not constitute a limitation on the embodiment of the present invention.

[0145] Processor 301 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0146] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI bus or an EISA bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0147] The memory 303 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0148] Computer Readable Storage Medium Embodiments

[0149] The present invention provides a computer-readable storage medium on which a computer program is stored. The computer program can be loaded and executed by a processor to form the data backup device described in the first aspect.

[0150] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims

1. A data backup method, characterized in that: The data backup method comprises: S1, install the kernel-mode driver on the target server to be backed up; S2, starting the user-mode backup application on the target server, obtaining the logical volume information of the target server, and sending the logical volume information to the kernel-mode driver; S3, registering a block device consistent with the logical volume information in the kernel of the target server through the kernel-mode driver; S4, allocating a block device request queue in the target server kernel, and binding the logical volume request queue in the target server to the block device request queue; S5, receiving and recording the logical volume bitmap information obtained by the user-mode backup application; S6, determining the changed data according to the logical volume bitmap information, and transferring the changed data; S7, receiving a data read request for backup from the user-mode backup application through the block device; S8, determining whether the data read request involves the changed data, if so, returning the transferred data to the user state backup application, otherwise, returning the disk data to the user state backup application; S9, storing the obtained returned data in a storage medium.

2. The data backup method according to claim 1, characterized in that: The kernel-mode driver is specifically snapshotdriver.ko.

3. The data backup method according to claim 1, characterized in that: The logical volume information includes sector range and capacity.

4. The data backup method according to claim 1, characterized in that: The obtaining of the logical volume information of the target server is specifically as follows: The logical volume information of the target server is obtained through the file system layer.

5. The data backup method according to claim 1, characterized in that: The S6 specifically includes: S601, recording the logical volume bitmap information at the backup start time; S602, obtaining real-time logical volume bitmap information; S603, comparing the real-time logical volume bitmap information with the logical volume bitmap information at the backup start time, and outputting the change data; S604: Transfer and save the changed data.

6. The data backup method according to claim 1, characterized in that: After S9, the method further includes: The block device is deleted in the target server kernel.

7. A data backup device, characterized in that: The data backup device comprises: Installation module, used to install kernel-mode drivers on the target server to be backed up; An acquisition module, used for starting a user-mode backup application on the target server, acquiring logical volume information of the target server, and sending the logical volume information to the kernel-mode driver; A registration module, used for registering a block device consistent with the logical volume information in the target server kernel through the kernel state driver; An allocation module, configured to allocate a block device request queue in the target server kernel and bind the logical volume request queue in the target server to the block device request queue; A first receiving module, used for receiving and recording the logical volume bitmap information acquired by the user-mode backup application; A transfer module, used for determining the changed data according to the bitmap information of the logical volume, and transferring the changed data; A second receiving module, configured to receive a data read request for backup from the user-mode backup application through the block device; A determination module, used for determining whether the data read request involves the changed data, and if so, returning the transferred data to the user-state backup application; otherwise, returning the disk data to the user-state backup application; The storage module is used to store the obtained returned data in a storage medium.

8. The data backup device according to claim 7, characterized in that: The kernel-mode driver is specifically snapshotdriver.ko.

9. The data backup device according to claim 7, characterized in that: The logical volume information includes sector range and capacity.

10. The data backup device according to claim 7, characterized in that: The obtaining of the logical volume information of the target server is specifically as follows: The logical volume information of the target server is obtained through the file system layer.

Citation Information

Cited By

  • Virtual machine data backup method, storage medium and electronic equipment

    CN120256206A

  • Fault detection method and device based on kernel mode and user mode, medium and product

    CN120768748A

  • Enterprise incremental backup method and system based on content awareness and intelligent scheduling

    CN122884756A