Agentless backup method, device, equipment and storage medium
By virtualizing the original data file to be backed up into a virtual block device and storing it in the form of a block device, the problem of backup data being susceptible to virus infection is solved, and higher data security is achieved.
Patent Information
- Application Number
- CN202411836213.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, backup data is stored in the form of files and is susceptible to viruses or malware infection, resulting in backup data being infected, affecting data security.
By virtualizing the original data file to be backed up as a virtual block device and storing it in the form of a block device to the target backup address, agentless backup is achieved to avoid the backup data being infected by viruses or malware.
When the original data file is infected with viruses or encrypted, the backup data remains intact and available, improving data security.
Smart Images

Figure CN119782042A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an agentless backup method, device, equipment and storage medium. Background Art
[0002] Backup is a process of reading the data to be backed up from the source device and storing it in the target device for backup after appropriate processing. Generally speaking, backup is a means of protecting important data security, that is, if the data on the source device is damaged, as long as the backup is done before the data is damaged, the data stored in the target device can be used to restore the data in the source device.
[0003] At present, Windows systems generally adopt file backup methods, which use file backup tools to back up specific files and targets specified by users. After being read from the file system operation interface, they are backed up through a file backup program. The biggest advantage of file backup tools is the high flexibility in selecting backup files. Users only need to process files that need to be backed up in a part of a volume. However, since the backup data is stored in the form of files, when the files to be backed up corresponding to the backup data are infected by viruses or malware, the backup data will also be infected by viruses or malware.
[0004] Therefore the prior art still needs to be improved and enhanced. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide an agentless backup method, device, equipment and storage medium in view of the deficiencies in the prior art.
[0006] In order to solve the above technical problems, the first aspect of the present application provides an agentless backup method, wherein the agentless backup method specifically includes:
[0007] Acquire the original data file to be backed up, and virtualize the original data file into a virtual block device;
[0008] The virtual block device is stored in the target backup address in the form of a block device to achieve agentless backup of data files.
[0009] The agentless backup method, wherein the step of obtaining the original data file to be backed up and virtualizing the original data file into a virtual block device specifically comprises:
[0010] Obtaining an original data file to be backed up, and reading a file security level of the original data file;
[0011] When the security level of the file is higher than a preset level threshold, virtualizing the original data file into a virtual block device;
[0012] When the file security level is lower than or equal to a preset level threshold, the original data file is directly backed up in the form of a file to a target backup address.
[0013] The agentless backup method, wherein the step of virtualizing the original data file into a virtual block device specifically comprises:
[0014] Get each file included in the original data file;
[0015] Each file is virtualized as a virtual block device, so that each file in the original data file corresponds to the virtual block device one by one.
[0016] In the agentless backup method, the virtual process of the virtual block device specifically includes:
[0017] Reading a file header of a file to be virtualized, wherein the file to be virtualized is an original data file, or a file included in the original data file;
[0018] The file header is removed from the file to be virtualized, and the file to be virtualized with the file header removed is virtualized as a virtual block device.
[0019] The agentless backup method, wherein, after virtualizing the data portion as a virtual block device, the method further comprises:
[0020] Obtaining a file identifier of the original data file;
[0021] The file identifier is associated with the virtual block device to associate the virtual block device with the original data file.
[0022] The agentless backup method, wherein the step of storing the virtual block device in the form of a block device to a target backup address to implement agentless backup of data files specifically includes:
[0023] The virtual block device is stored at the target backup address to achieve agentless backup of data files.
[0024] In the agentless backup method, the original data file is stored in the form of a file.
[0025] A second aspect of the present application provides an agentless backup device, wherein the agentless backup device specifically includes:
[0026] An acquisition module, used for acquiring the original data file to be backed up, and virtualizing the original data file into a virtual block device;
[0027] The backup module is used to store the virtual block device in the form of a block device to a target backup address to achieve agentless backup of data files.
[0028] A third aspect of the present application provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the above-described agentless backup methods.
[0029] A fourth aspect of the present application provides a terminal device, comprising: a processor and a memory;
[0030] The memory stores a computer-readable program executable by the processor;
[0031] When the processor executes the computer-readable program, the steps in any of the above-mentioned agentless backup methods are implemented.
[0032] Beneficial effects: Compared with the prior art, the present application provides an agentless backup method, apparatus, device and storage medium, the method comprising obtaining the original data file to be backed up, virtualizing the original data file into a virtual block device; storing the virtual block device in the form of a block device to a target backup address, so as to realize agentless backup of data files. The embodiment of the present application backs up the original data file to be backed up into a virtual block device, and then backs up the original data file in the form of a block device, so that when the original data file in the file system is infected by a virus or encrypted, the backup data remains intact and available, further improving data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 A flowchart of an agentless backup method provided in an embodiment of the present application.
[0035] Figure 2 A flowchart of the virtualization process of a virtual block device.
[0036] Figure 3 A principle block diagram of an agentless backup device provided in an embodiment of the present application.
[0037] Figure 4 A functional block diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The embodiments of the present application provide an agentless backup method, device, equipment and storage medium. To make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0040] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0041] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0042] After research, it was found that backup is a process of reading the data to be backed up from the source device, storing it in the target device for backup after appropriate processing. Generally speaking, backup is a means of protecting important data security, that is, if the data on the source device is damaged, as long as the backup is done before the data is damaged, the data stored in the target device can be used to restore the data in the source device.
[0043] At present, Windows systems generally adopt file backup methods, which use file backup tools to back up specific files and targets specified by users. After being read from the file system operation interface, they are backed up through a file backup program. The biggest advantage of file backup tools is the high flexibility in selecting backup files. Users only need to process files that need to be backed up in a part of a volume. However, since the backup data is stored in the form of files, when the files to be backed up corresponding to the backup data are infected by viruses or malware, the backup data will also be infected by viruses or malware.
[0044] In order to solve the above problems, in an embodiment of the present application, the original data file to be backed up is obtained, and the original data file is virtualized as a virtual block device; the virtual block device is stored in the form of a block device to the target backup address to achieve agentless backup of the data file. In an embodiment of the present application, the original data file to be backed up is backed up as a virtual block device, and then the original data file is backed up in the form of a block device. In this way, even if the original data file in the file system is infected by a virus or encrypted, the backup data remains intact and available, further improving data security.
[0045] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0046] This embodiment provides an agentless backup method, such as Figure 1 As shown, the method includes:
[0047] S10. Acquire the original data file to be backed up, and virtualize the original data file into a virtual block device.
[0048] Specifically, the original data file is a data file that needs to be backed up, which is stored in the form of a file, and the original data file can be read through the file system operation interface. To this end, the acquisition process of the original data file to be backed up can be: receiving a specified file or target selected by a user (such as a storage address of a specified file or target set by a user, etc.), and then reading the specified file or target through the file system operation interface to obtain the original data file, wherein the original data file may include one file or multiple files. For example, when the user selects a specified file as a file to be backed up, the original data file includes one file, and when the user selects a target including multiple files as a file to be backed up, the original data file includes all files under the target, that is, includes multiple files.
[0049] Further, when the original data file includes multiple files, each file in the original data file is virtualized as a virtual block device, and when the original data file includes only one file, the original data file is virtualized as a virtual block device. To this end, when the original data file is virtualized as a virtual block device, each file included in the original data file is obtained, and then each file is virtualized as a virtual block device, so that each file in the original data file corresponds to the virtual block device one by one. It should be noted that the process of virtualizing each file as a virtual block device is the same, so here the original data file is taken as an example for description.
[0050] A file includes a file header and data. The file header is located at the beginning of the file and bears the important attributes and tasks of describing the file. It contains basic information such as the file format, size, and starting position of the data. For example, in a BMP file, the file header contains the file type identifier, the file size, and the starting position of the bitmap data in the file. Data is the main content of the file and includes actual useful information. For example, in a BMP file, the data area is bitmap data arranged in the order of b, g, r, b, g, r... In other words, the file header is used to describe the basic file information of the file, and the data includes the specific data content of the file. When a file is attacked, it is generally attacked by obtaining the content of the file header. For this reason, when the original data file is virtualized as a virtual block device, the embodiment of the present application can only save the data in the original data file without saving the file header to avoid virus infection or encryption.
[0051] For example, Figure 2 As shown, the virtualization of the original data file into a virtual block device specifically includes:
[0052] S11, reading the file header of the original data file;
[0053] S12. Determine a data portion included in the original data file based on the file header, and virtualize the data portion as a virtual block device.
[0054] Specifically, the file header is located at the head of the original data file and includes the starting position of the data, so that after reading the file header of the original data file, the data portion in the original data file can be determined, and then the data portion can be read from the original data file as the raw data to be backed up. In other words, the file header is removed from the original data file so that the backup data does not include the file header, so that when the original data file is infected, the backup data corresponding to the original data file will not be infected, thereby improving the security of the original data file.
[0055] Further, after determining the data portion included in the original data file, the data portion is stored in a virtual block device so that the data portion is stored in the form of a virtual block device. That is, after determining the data portion included in the original data file, a virtual block device matching the data size can be virtualized based on the data size of the data portion, and then the data portion is stored in the virtual block device. For example, a virtual disk is constructed as a virtual block device, and then the data portion is stored on the virtual disk to virtualize the original data file into a virtual block device.
[0056] It should be noted that when the data part in the original data file is virtualized as a virtual block device, the data size of the data part will also be read. When the data size is within a preset range, the data part is directly virtualized as a virtual block device; when the data size is not within the preset range, the data part can be split into multiple data segments, so that the data size of each data segment is within the preset range, and then each data segment is virtualized as a virtual block device, so that the data part of the original data file can be stored in the form of a block device, and the content corresponding to each data segment in the data part can be independently accessed.
[0057] In one implementation, after obtaining the original data file to be backed up, the original data file can be directly virtualized as a virtual block device, or the file security level of the original data file can be first determined, and then the backup method of the original data file is determined based on the file security level. Based on this, the obtaining of the original data file to be backed up and virtualizing the original data file as a virtual block device specifically includes:
[0058] Obtaining an original data file to be backed up, and reading a file security level of the original data file;
[0059] When the security level of the file is higher than a preset level threshold, virtualizing the original data file into a virtual block device;
[0060] When the file security level is lower than or equal to a preset level threshold, the original data file is directly backed up in the form of a file to a target backup address.
[0061] Specifically, the file security level is used to reflect the file importance of the original data file, wherein the file security level can be determined according to the file attribute of the original data file, or determined according to actual needs, or set by the user, or determined based on the application that forms the original data file. For example, when the original data file is formed by a system application, a high security level is configured for the original data file, and when the original data file is formed by a third-party application, a low security level is configured for the original data file, etc.
[0062] The preset level threshold is a pre-set basis for determining the backup method of the original file data. Specifically, when the file security level is higher than the preset level threshold, it means that the original file data is of high importance. For this reason, the original data file can be backed up by virtualizing the original data file as a virtual block device; when the file security level is lower than or equal to the preset level threshold, it means that the original file data node is of low importance, and the original data file is directly backed up to the target backup address in the form of a file. In other words, the original data file does not need to be virtualized as a virtual block device, but is directly backed up using the existing file backup method.
[0063] In addition, since after the data backup is virtualized as a virtual block device, the data stored in the virtual block device is raw data. Therefore, in order to facilitate the determination of the original data file corresponding to the virtual block device. Accordingly, after the data portion is virtualized as a virtual block device, the method further includes:
[0064] Obtaining a file identifier of the original data file;
[0065] The file identifier is associated with the virtual block device to associate the virtual block device with the original data file.
[0066] Specifically, the file identifier is a unique identifier of the original data file, and the original data file can be located based on the file identifier, and the backup data of the original data file can be read based on the file identifier. In other words, the file identifier is used as an association between the original data file and its corresponding virtual block device, and a relationship is established between the original data file and the virtual block device through the file identifier. To this end, after obtaining the file identifier of the original data file, the file identifier is associated with the virtual block device corresponding to the original data file, so as to associate the virtual block device with the original data file.
[0067] S20. Storing the virtual block device in a block device form to a target backup address to implement agentless backup of data files.
[0068] Specifically, the target backup address can be the storage address of a storage area in an electronic device storing the original data file, or it can be the storage address of a storage area in another electronic device different from the electronic device storing the original data file. That is to say, the original data file and the virtual block device corresponding to the original data file can be stored in the same electronic device, or in different electronic devices. In an embodiment of the present application, the original data file and the virtual block device corresponding to the original data file (i.e., the backup data corresponding to the original data file) are stored in the same electronic device, that is, the target backup address is the storage address of a storage area in the electronic device storing the original data file, that is, the original data file is backed up in the electronic device storing the original data file, so that when the original data file is encrypted or infected, the backup data of the original data file can be directly read at the target backup address, so that the backup data of the original data file can be obtained even without networking.
[0069] To this end, after obtaining the virtual block device corresponding to the original data file, the virtual block device is stored in the target backup address, so that the backup data of the original data file is stored in the target backup address in the form of a block device, thereby realizing agentless backup of the data file. Among them, when storing the virtual block device in the target backup address, the virtual block device can be installed in the target backup address in the manner of installing a file system. In other words, the virtual block device is installed as a virtual machine in the target backup address. For example, if the virtual block device is a virtual disk, the virtual disk is installed in the target backup address, so that a virtual disk is installed in the target backup address, and the data portion of the original data file (i.e., raw data) is stored in the virtual disk.
[0070] In summary, this embodiment provides an agentless backup method, which includes obtaining the original data file to be backed up, virtualizing the original data file into a virtual block device; storing the virtual block device in the form of a block device to a target backup address to achieve agentless backup of data files. In this embodiment of the application, the original data file to be backed up is backed up as a virtual block device, and then the original data file is backed up in the form of a block device, so that when the original data file in the file system is infected by a virus or encrypted, the backup data remains intact and available, further improving data security.
[0071] Based on the above-mentioned agentless backup method, this embodiment provides an agentless backup device, such as Figure 3 As shown, the agentless backup device specifically includes:
[0072] The acquisition module 100 is used to acquire the original data file to be backed up, and virtualize the original data file into a virtual block device;
[0073] The backup module 200 is used to store the virtual block device in the form of a block device to a target backup address to achieve agentless backup of data files.
[0074] Based on the above-mentioned agentless backup method, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the agentless backup method as described in the above-mentioned embodiment.
[0075] Based on the above-mentioned agentless backup method, the present application also provides a terminal device, such as Figure 4 As shown, it includes at least one processor 20, a display screen 21, and a memory 22, and may also include a communication interface 23 and a bus 24. The processor 20, the display screen 21, the memory 22, and the communication interface 23 may communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call the logic instructions in the memory 22 to execute the method in the above embodiment.
[0076] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0077] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.
[0078] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.
[0079] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An agentless backup method, characterized in that: The agentless backup method specifically includes: Acquire the original data file to be backed up, and virtualize the original data file into a virtual block device; The virtual block device is stored in the target backup address in the form of a block device to achieve agentless backup of data files.
2. The agentless backup method according to claim 1, characterized in that: The step of obtaining the original data file to be backed up and virtualizing the original data file into a virtual block device specifically includes: Obtaining an original data file to be backed up, and reading a file security level of the original data file; When the security level of the file is higher than a preset level threshold, virtualizing the original data file into a virtual block device; When the file security level is lower than or equal to a preset level threshold, the original data file is directly backed up in the form of a file to a target backup address.
3. The agentless backup method according to claim 1, characterized in that: The virtualizing the original data file into a virtual block device specifically includes: Get each file included in the original data file; Each file is virtualized as a virtual block device, so that each file in the original data file corresponds to the virtual block device one by one.
4. The agentless backup method according to any one of claims 1 to 3, characterized in that: The virtualization process of the virtual block device specifically includes: Reading a file header of a file to be virtualized, wherein the file to be virtualized is an original data file, or a file included in the original data file; The file header is removed from the file to be virtualized, and the file to be virtualized with the file header removed is virtualized as a virtual block device.
5. The agentless backup method according to claim 3, characterized in that: After virtualizing the data portion as a virtual block device, the method further includes: Obtaining a file identifier of the original data file; The file identifier is associated with the virtual block device to associate the virtual block device with the original data file.
6. The agentless backup method according to claim 1, characterized in that: The step of storing the virtual block device in the target backup address in the form of a block device to implement agentless backup of data files specifically includes: The virtual block device is stored at the target backup address to achieve agentless backup of data files.
7. The agentless backup method according to claim 1, characterized in that: The original data file is stored in file form.
8. An agentless backup device, characterized in that: The agentless backup device specifically includes: An acquisition module, used for acquiring the original data file to be backed up, and virtualizing the original data file into a virtual block device; The backup module is used to store the virtual block device in the form of a block device to a target backup address to achieve agentless backup of data files.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the agentless backup method according to any one of claims 1 to 7.
10. A terminal device, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the agentless backup method according to any one of claims 1 to 7 are implemented.