Method for creating snapshot backup, electronic device and computer-readable storage medium
By sorting file lists by container on the backup client to reduce the number of container openings and closings, the problem of inefficient snapshot backup in the prior art is solved, and a more efficient snapshot backup creation process is achieved.
Patent Information
- Application Number
- CN202010449309.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-25
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-05-25
AI Technical Summary
The prior art is inefficient when creating snapshot backups. Users need to frequently open and close containers in the backup server, and the synthesis operation for continuous files is not efficient, resulting in an increase in the number of storage and message delivery, affecting the backup efficiency.
By obtaining the file list corresponding to the snapshot backup to be created on the backup client, and generating a new file list by sorting it by the container to which the file belongs, the backup server makes the data in multiple containers based on the sorted list, reducing file operations and messages Pass to improve the efficiency of snapshot backup.
It effectively reduces the number of file operations and message passing during snapshot backup creation, improves the efficiency of creating snapshot backups, reduces the load on the backup server, and saves storage space.
Smart Images

Figure CN113722146B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of data storage, and in particular to a method for creating a snapshot backup, an electronic device, and a computer-readable storage medium. Background Art
[0002] A backup system usually includes a backup client and a backup server, where the backup client can send files to be backed up to the backup server for backup. Many backup systems provide an important function called snapshot backup. This function will create a new backup by referencing the data in the existing backup file in the backup server.
[0003] In a disk image backup scenario, the base disk image file and the changed data block file are usually created at different times, so there are usually two backup files created for them in the backup server. When customers want to restore the latest disk image file, they need to restore the base disk image file and the changed data block file, and then merge them to get the latest disk image file. This is often inconvenient for customers. In this case, customers can create a snapshot backup for the base disk image file and the changed data block file. Then, customers can restore everything from the snapshot backup without searching in different backup files. In some cases, customers may want to extend the expiration time of certain backup files. The expiration time of a backup file refers to the period from when the backup file is created on the backup server to when it is deleted. In this case, customers can create a snapshot backup and set a new expiration time for the snapshot backup. In this way, when the original backup file expires, it can be deleted, thereby saving storage space. The file data involved in the snapshot backup will be retained until the new expiration time. Summary of the invention
[0004] Embodiments of the present disclosure provide a method for creating a snapshot backup, an electronic device, and a computer-readable storage medium.
[0005] In a first aspect of the present disclosure, a method for creating a snapshot backup is provided. The method includes: obtaining, at a backup client, a first file list corresponding to a snapshot backup to be created, the first file list indicating a plurality of files to be referenced by the snapshot backup, and data of the plurality of files being included in a plurality of containers at a backup server; generating a second file list by sorting the plurality of files indicated in the first file list according to the containers to which they belong, the second file list indicating that each of the plurality of containers includes data of at least one of the plurality of files; and causing the backup server to reference the data of the plurality of files in the plurality of containers based on the second file list to create the snapshot backup.
[0006] In a second aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit and at least one memory. The at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device performs an action, which includes: obtaining a first file list corresponding to a snapshot backup to be created, the first file list indicating multiple files to be referenced by the snapshot backup, and the data of the multiple files are included in multiple containers at a backup server; generating a second file list by sorting the multiple files indicated in the first file list according to the containers to which they belong, the second file list indicating that each of the multiple containers includes data of at least one file in the multiple files; and causing the backup server to reference the data of the multiple files in the multiple containers based on the second file list to create the snapshot backup.
[0007] In a third aspect of the present disclosure, a computer-readable storage medium is provided, which includes machine-executable instructions. When the machine-executable instructions are executed by a device, the device performs the method described in the first aspect of the present disclosure.
[0008] In a fourth aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored in a computer-readable storage medium and includes machine-executable instructions. The machine-executable instructions, when executed by a device, cause the device to perform the method described in the first aspect of the present disclosure.
[0009] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the present disclosure, nor is it intended to limit the scope of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.
[0011] Figure 1A A block diagram illustrating an example environment in which embodiments of the present disclosure can be implemented;
[0012] Figure 1B A schematic diagram of a snapshot backup is shown;
[0013] Figure 2 A schematic diagram showing an example file list for creating a snapshot backup;
[0014] Figure 3 A schematic diagram illustrating an example synthesis operation is shown;
[0015] Figure 4 A flowchart of an example method for creating a snapshot backup according to an embodiment of the present disclosure is shown;
[0016] Figure 5 A schematic diagram showing an example file list for creating a snapshot backup according to an embodiment of the present disclosure is shown;
[0017] Figure 6 A schematic diagram showing sorting files in a file list according to their containers according to an embodiment of the present disclosure is shown;
[0018] Figure 7 A flowchart illustrating an example method for referencing file data in a container according to an embodiment of the present disclosure is shown;
[0019] Figure 8 A flowchart illustrating an example method for merging multiple composition operations for consecutive files according to an embodiment of the present disclosure; and
[0020] Fig. 9 A block diagram of an example electronic device that may be used to implement embodiments of the present disclosure is shown.
[0021] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0022] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0023] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0024] Figure 1AA block diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. It should be understood that the structure and functionality of environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. For example, embodiments of the present disclosure may also be applied to environments different from environment 100.
[0025] like Figure 1A As shown, the environment 100 includes a backup client 120 and a backup server 130. A user 110 may initiate a backup request to the backup client 120 to back up files at the backup client 120 to the backup server 130. Figure 1B As shown, backup server 130 may include, for example, multiple backup files 131, 132, and 133 created at different times. Backup file 131 may include data of files 101, 102, and 103. Backup file 132 may include data of files 104, 105, and 106. Backup file 133 may include data of files 107, 108, and 109.
[0026] In addition, user 110 may initiate a request to create a snapshot backup to backup client 120. The request may include a file list corresponding to the snapshot backup to be created, and the file list may indicate one or more files to be referenced by the snapshot backup to be created.
[0027] Figure 2 FIG. 2 shows a schematic diagram of an example file list 200 for creating a snapshot backup. Figure 2 As shown, the snapshot backup to be created involves, for example, Figure 1B The files 103, 104 and 108 are shown. The file list 200 can record the path name of the file 103 and the identifier of the backup file 131 to which it belongs, the path name of the file 104 and the identifier of the backup file 132 described therein, and the path name of the file 108 and the identifier of the backup file 133 to which it belongs.
[0028] According to Figure 2 As shown in the example file list 200 , the backup client 120 may send an operation request to the backup server 130 to enable the backup server 130 to create a snapshot backup by referencing data of a corresponding file in an existing backup file. Figure 1B Snapshot backup 134 is shown created at backup server 130 , referencing data of file 103 in existing backup file 131 , data of file 104 in existing backup file 132 , and data of file 108 in existing backup file 133 .
[0029] The file data at the backup server 130 can be stored in containers. In this article, the term "container" refers to a data storage unit that stores the corresponding file data of one or more files, which can exist in the form of a single file in the file system. By storing the file data of multiple files in a container, the number of file system operations in data backup can be reduced. The corresponding file data in a backup file (for example, backup files 131, 132 or 133) can be stored in one or more containers. The backup server 130 can create a snapshot backup by referencing the corresponding file data in the container according to the file list corresponding to the snapshot backup.
[0030] Herein, an operation of referencing file data in a container is also referred to as a "composition operation" or a "reference operation", and "reference" and "composition" may be used interchangeably.
[0031] Figure 3 A schematic diagram of an example synthesis operation is shown. Figure 3 A container 300 is shown, which includes, for example, data of a file 310. In order to reference the data of the file 310, it is usually necessary to first determine the position 301 of the container 300 and open the container 300. Then, the starting position 302 of the file 310 in the container 300 and the size of the file 310 are determined, and the ending position 303 of the file 310 in the container 300 is determined based on the starting position 302 and the size of the file 310. After determining the starting position 302 and the ending position 303 of the file 310 in the container 300, the file 310 can be referenced by referencing the data from the starting position 302 to the ending position 303 in the container 300. The container 300 can be closed after the synthesis operation is completed. It should be understood that the starting position of each container, the offset of the file data of each backed up file in the corresponding container, and the file size and other information can be recorded at the backup server 130 for query.
[0032] In traditional solutions, the efficiency of creating snapshot backups is usually low. This is because users often do not know where the files are stored in the backup server, so users can create a file list corresponding to the snapshot backup at will, or create a file list corresponding to the snapshot backup based on some simple rules (such as alphabetical order). This will bring the following problems.
[0033] First, it may cause the same container to be opened and closed repeatedly multiple times. When performing a synthesis operation, the traditional solution needs to open the container before the synthesis operation and close the container after the synthesis operation is completed. This is because the file list corresponding to the snapshot backup is usually created in an arbitrary order. Therefore, the data of the next file to be referenced may be located in another container. If the container is not closed after each synthesis operation is completed, many unused but opened containers may be generated, and too many open containers may cause problems on the backup server. Therefore, the traditional solution is usually to close the container after the synthesis operation is completed. Since users often do not know the container where the backed up files are located, even if multiple files to be referenced are in the same container, the container will be opened and closed repeatedly.
[0034] Second, the synthesis operation performed on multiple files in a container that are located continuously is not efficient. The file list corresponding to the snapshot backup may include multiple files in a container that are located continuously. These files can be referenced via a single synthesis operation. However, since the order of files in the file list corresponding to the snapshot backup may be arbitrary, multiple files in a container that are located continuously may not be continuous in the file list. In this case, the traditional solution can only perform synthesis operations on multiple files one by one, resulting in the same container being repeatedly opened and closed multiple times, which makes the efficiency of creating snapshot backups low.
[0035] An embodiment of the present disclosure provides a solution for creating a snapshot backup, which can solve one or more of the above-mentioned problems and other potential problems. According to the solution, at a backup client, a first file list corresponding to a snapshot backup to be created at a backup server is obtained. The first file list indicates multiple files to be referenced by the snapshot backup, and the data of the multiple files are included in multiple containers at the backup server. A second file list is generated by sorting the multiple files indicated in the first file list according to the containers to which they belong. The second file list indicates that each of the multiple containers includes data of at least one file among the multiple files. Then, the backup server references the data of the multiple files in the multiple containers based on the second file list to create a snapshot backup. In this way, the embodiment of the present disclosure can effectively reduce the number of file operations and message transfers during the snapshot backup creation process, thereby improving the efficiency of creating a snapshot backup.
[0036] Figure 4 1 is a flowchart of an example method 400 for creating a snapshot backup according to an embodiment of the present disclosure. The method 400 may be performed by, for example, the backup client 120 shown in FIG. 1 . It should be understood that the method 400 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect. Figure 1A The method 400 will be described in detail.
[0037] At block 410, backup client 120 obtains a first file list corresponding to the snapshot backup to be created. For example, the first file list may be input by user 110 to backup client 120. An example of the first file list may be: Figure 2 An example file list 200 is shown. The first file list may indicate a plurality of files to be referenced by the snapshot backup to be created, wherein data of the plurality of files is included in a plurality of containers at the backup server 130 .
[0038] At block 420 , the backup client 120 generates a second file list by sorting the plurality of files indicated in the first file list according to the containers to which they belong, wherein the second file list indicates that each container of the plurality of containers includes data of at least one file of the plurality of files.
[0039] In some embodiments, to generate the second file list, the backup client 120 may obtain information related to the multiple files indicated in the first file list from the backup server 130. The information may indicate the location of the container to which each file in the multiple files belongs, the offset of each file in the multiple files in the container to which it belongs, and the file size. The backup client 120 may generate an intermediate file list for creating a snapshot backup based on the information and the first file list.
[0040] Figure 5 FIG. 5 is a schematic diagram showing an example intermediate file list 500 for creating a snapshot backup according to an embodiment of the present disclosure. Figure 5 As shown, the file list 500 may include multiple entries corresponding to multiple files to be referenced by the snapshot backup. For example, the entry corresponding to file A may record the path name of file A, the identifier of the backup file to which it belongs, the path of the container where the data of file A is located, the offset of file A in the container (i.e., the starting position), and the size of file A.
[0041] In some embodiments, the backup client 120 may create corresponding sub-file lists for the multiple containers involved in the intermediate file list, respectively. Each sub-file list may correspond to a container and indicate a group of files in the container that will be referenced by the snapshot backup. The backup client 120 may generate a second file list by combining these sub-file lists.
[0042] Figure 6 A schematic diagram is shown of sorting files in a file list 500 according to the containers to which they belong according to an embodiment of the present disclosure.
[0043] like Figure 6As shown, the backup client 120 can calculate a hash value for the path of the container to which each file in the file list 500 belongs. For example, for file A, the hash value calculated for the path of the container to which it belongs is h1. In some embodiments, the hash value h1 may also be a complete hash value calculated for the path of the container to which file A belongs. Alternatively, the hash value h1 may also be several bits of the complete hash value calculated for the path of the container to which file A belongs, also referred to as a "truncated hash value". The use of truncated hash values helps to improve the efficiency of subsequent searches. The backup client 120 can determine the index A[h1] in the hash array 610 based on the hash value h1. The array value P[h1] corresponding to the index A[h1] will point to one or more sublists in the sorted file list 620 (i.e., the second file list). The one or more sublists correspond to those containers whose container paths have a hash value of h1, wherein each sublist corresponds to a container and records a set of files in the file list 500 to which the container relates. It should be understood that the hash array 610 may be pre-configured at the backup client 120.
[0044] Depending on the hash function used to calculate the hash value, the hash values corresponding to the paths of different containers may be the same, that is, a "collision" occurs. In some embodiments, the problem of hash value collision can be solved by checking the complete hash value and / or container path. For example, in order to add file A to the correct sublist, after P[h1] is determined, the path of the container to which file A belongs can be compared with the path of the container corresponding to one or more sublists pointed to by P[h1]. If the path of the container to which file A belongs matches the path of the container corresponding to a certain sublist (e.g., sublist 621), the entry corresponding to file A is added to sublist 621. In some embodiments, the added entry can record the offset (i.e., the starting position) and file size of file A in the container. In some embodiments, in order to improve the efficiency of subsequent references to files with continuous positions, the entries corresponding to the files can be added in ascending order according to the starting position of the files in the container. That is, the entry corresponding to the file at the front of the starting position will be added to the position near the head of the list, and the entry corresponding to the file at the back of the starting position will be added to the position near the end of the list. Alternatively, if the path of the container to which file A belongs does not match the paths of the containers corresponding to all existing sublists, a new sublist (e.g., sublist 622) can be created for the container to which file A belongs, and the entry corresponding to file A can be added to the new sublist 622.
[0045] In this way, the backup client 120 can generate the second file list 620 based on the intermediate file list 500. The second file list 620 indicates a group of files included in each of the multiple containers involved in the snapshot backup to be created. It should be understood that the second file list 620 and the sub-file lists 621 and 622 therein can be implemented using a linked list or any other suitable data structure, and the scope of the present disclosure is not limited in this respect.
[0046] Return to reference Figure 4 At box 430, the backup client 120 enables the backup server 130 to reference the data of multiple files in the multiple containers based on the second file list to create a snapshot backup. In some embodiments, the backup client 120 can enable the backup server 130 to open each of the multiple containers involved in the second file list and reference the data of a group of files in the opened container. After all the file data involved in the container is synthesized, the backup client 120 can enable the backup server 130 to close the container. In this way, the embodiments of the present disclosure can effectively reduce the number of times the same container is repeatedly opened and closed during the snapshot backup creation process, thereby improving the efficiency of creating snapshot backups.
[0047] Figure 7 FIG. 7 is a flowchart of an exemplary method 700 for referencing file data in a container according to an embodiment of the present disclosure. The method 700 may be viewed as follows: Figure 4 An example implementation of block 430 is shown. In some embodiments, backup client 120 may perform method 700 for each of the plurality of containers involved in the second file list, thereby referencing file data in these containers. It should be understood that method 700 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.
[0048] like Figure 7 As shown, at block 710, the backup client 120 sends a first operation request to the backup server 130, so that the backup server 130 opens the container. In some embodiments, the container may be represented as a file in the file system, so the container may be opened by an operation of opening a file. For example, the first operation request may indicate the path of the container.
[0049] At block 720 , the backup client 120 sends at least one operation request to the backup server 130 , so that the backup server 130 references data of a set of files in the container through at least one synthetic operation.
[0050] In some embodiments, for a file in a group of files that is not located continuously, the backup client 120 may send an operation request for the file to the backup server 130, so that the backup server 130 references the data of the file in the container through a synthetic operation. Additionally or alternatively, for multiple files in a group of files that are located continuously, the backup client 120 may send an operation request for the multiple files to the backup server 130, so that the backup server 130 references the data of the multiple files in the container through a single synthetic operation.
[0051] Figure 8 800 is a flowchart of an example method 800 for merging multiple composition operations for consecutive files according to an embodiment of the present disclosure. The method 800 can be viewed as follows: Figure 7 An example implementation of block 720 is shown. It should be understood that method 800 may also include additional actions not shown and / or may omit actions shown, and the scope of the present disclosure is not limited in this respect.
[0052] like Figure 8 As shown, at block 801, the backup client 120 reads an entry in a sub-file list corresponding to a container. At block 802, the backup client 120 obtains the starting position B1 and the file size S1 of the file recorded in the entry in the container from the entry. At block 803, the backup client 120 determines the ending position E1=B1+S1 of the file in the container based on the file starting position B1 and the file size S1.
[0053] At block 804, backup client 120 determines whether the entry is the last entry in the subfile list. If so, at block 811, backup client 120 sends an operation request to backup client 130 to reference the data from B1 to E1 in the container. If not, at block 805, backup client 120 reads the next entry in the subfile list.
[0054] At block 806, the backup client 120 obtains the starting position B2 and the file size S2 of the next file recorded in the next entry in the container. At block 807, the backup client 120 determines whether the starting position B2 of the next file is equal to the ending position E1 of the current file. If so, at block 808, the backup client 120 updates E1 to E1=E1+S2, and then the method 800 proceeds to block 804. If not, at block 809, the backup client 120 sends an operation request to the backup client 130 to reference the data from B1 to E1 in the container.
[0055] At block 810 , the backup client 120 updates B1 with B2, ie, B1=B2, and updates E1 to E1=B1+S2. The method 800 then proceeds to block 805.
[0056] In this way, when there are multiple files in the container with consecutive positions in the sub-file list, the backup client 120 can determine the starting position and the ending position of the multiple files in the container, and send an operation request to the backup server 130 to reference the data from the determined starting position to the ending position in the container through a single synthetic operation, thereby completing the reference to the file data of the multiple files. Combining the synthetic operations of multiple files in consecutive positions can effectively reduce the number of repeated opening and closing of containers, while reducing the number of message transmissions between the backup client 120 and the backup server 130, thereby significantly improving the performance of creating snapshot backups.
[0057] Return to reference Figure 7 At block 730 , if it is determined that at least one reference operation is completed, the backup client 120 sends a second operation request to the backup server 130 to cause the backup server 130 to close the container.
[0058] Fig. 9 1 shows a block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure. For example, the backup client 120 and / or the backup server 130 shown in FIG. 1 can be implemented by the electronic device 900. Fig. 9 As shown, the device 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 902 or computer program instructions loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0059] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0060] The various processes and processing described above, such as methods 400, 700, and / or 800, may be performed by the processing unit 901. For example, in some embodiments, methods 400, 700, and / or 800 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the CPU 901, one or more actions of the methods 400, 700, and / or 800 described above may be performed.
[0061] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0062] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination of the above. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0063] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0064] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0065] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0066] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0067] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0068] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0069] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for creating a snapshot backup, comprising: At the backup client, a first file list corresponding to the snapshot backup to be created is obtained, the first file list indicating a plurality of files to be referenced by the snapshot backup, a path identifier of a first file among the plurality of files, and a first identifier of a first backup file associated with the first file, and data of the plurality of files are stored in a plurality of containers at the backup server, wherein a user of the backup client initiates a request to the backup client to generate the snapshot backup, wherein the request includes the first file list as an input of the user; Generating a second file list by sorting the plurality of files indicated in the first file list according to the containers to which they belong, the second file list indicating that each of the plurality of containers includes data of at least one file among the plurality of files, wherein the second file list indicates that the plurality of containers includes a first container, and the first container includes data of a group of files among the plurality of files, wherein generating the second file list includes: acquiring information related to the plurality of files from the backup server; generating an intermediate file list IFL for creating the snapshot backup based on the information and the first file list, wherein the IFL includes an entry associated with a second file among the plurality of files, wherein the entry specifies at least a path identifier of the second file, a second identifier of a second backup file associated with the second file, a path to a second container hosting the second file, and an offset and a size of the second file in the second container, wherein the second container is a container among the plurality of containers; Based on the IFL, generating a plurality of sub-file lists for at least a portion of the plurality of containers listed in the IFL; and combining the plurality of sub-file lists to generate the second file list; and causing the backup server to reference the data of the plurality of files in the plurality of containers based on the second file list to create the snapshot backup, wherein the snapshot backup comprises a synthesis of the plurality of files specified in the second file list, The data for causing the backup server to reference the plurality of files in the plurality of containers based on the second file list comprises: sending a first operation request to the backup server to cause the backup server to open the first container, wherein in order to open the first container, the first container is represented as a file in a file system of the backup server; After the first operation, sending at least one operation request to the backup server to cause the backup server to reference the data of the set of files in the first container; making a determination that the at least one operation request is complete; and Based on the determination, sending a second operation request to the backup server to cause the backup server to close the first container, Wherein after the second operation and during the creation of the snapshot backup, the first container is no longer opened.
2. The method according to claim 1, wherein each sub-file list indicates that a group of files in the plurality of files are included in a corresponding container in the plurality of containers and indicates corresponding offsets and sizes of the group of files, and The information indicates a location of a third container to which each file in the second plurality of files belongs, and an offset and a size of each file in the second plurality of files in the third container, wherein the third container is a container in the plurality of containers, and each file in the second plurality of files is a file in the plurality of files.
3. The method according to claim 1, wherein the set of files includes the first file, and The sending of the at least one operation request to the backup server comprises: Determine a first starting position and a first ending position of the first file in the first container; as well as A third operation request is sent to the backup server, so that the backup server references the data in the first container between the first starting position and the first ending position.
4. The method according to claim 3, wherein the set of files further comprises a third file and a fourth file, and The sending of the at least one operation request to the backup server comprises: Determining a second starting position and a second ending position of the third file in the first container, and a third starting position and a third ending position of the fourth file in the first container; and If it is determined that the second end position is the same as the third start position, a fourth operation request is sent to the backup server, so that the backup server references the data between the second start position and the third end position in the first container through a single reference operation.
5. The method according to claim 4, wherein sending the at least one operation request to the backup server further comprises: If it is determined that the second end position and the third start position are different: Sending a fifth operation request to the backup server, so that the backup server references the data between the second starting position and the second ending position in the first container; as well as A sixth operation request is sent to the backup server, so that the backup server references the data in the first container between the third starting position and the third ending position.
6. The method of claim 1, wherein the first container is opened by making the data accessible to the backup server.
7. An electronic device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform a method, the method comprising: Obtaining a first file list corresponding to a snapshot backup to be created, the first file list indicating a plurality of files to be referenced by the snapshot backup, a path identifier of a first file among the plurality of files, and a first identifier of a first backup file associated with the first file, wherein data of the plurality of files are stored in a plurality of containers at a backup server, wherein a user of the backup client initiates a request to the backup client to generate the snapshot backup, wherein the request includes the first file list as input by the user; Generating a second file list by sorting the plurality of files indicated in the first file list according to the containers to which they belong, the second file list indicating that each of the plurality of containers includes data of at least one file among the plurality of files, wherein the second file list indicates that the plurality of containers includes a first container, and the first container includes data of a group of files among the plurality of files, wherein generating the second file list includes: acquiring information related to the plurality of files from the backup server; generating an intermediate file list IFL for creating the snapshot backup based on the information and the first file list, wherein the IFL includes an entry associated with a second file among the plurality of files, wherein the entry specifies at least a path identifier of the second file, a second identifier of a second backup file associated with the second file, a path to a second container hosting the second file, and an offset and a size of the second file in the second container, wherein the second container is a container among the plurality of containers; Based on the IFL, generating a plurality of sub-file lists for at least a portion of the plurality of containers listed in the IFL; and combining the plurality of sub-file lists to generate the second file list; and enabling the backup server to reference the data of the plurality of files in the plurality of containers based on the second file list to create the snapshot backup, wherein the snapshot backup comprises a synthesis of the plurality of files specified in the second file list, The data for causing the backup server to reference the plurality of files in the plurality of containers based on the second file list comprises: sending a first operation request to the backup server to cause the backup server to open the first container, wherein in order to open the first container, the first container is represented as a file in a file system of the backup server; After the first operation, sending at least one operation request to the backup server to cause the backup server to reference the data of the set of files in the first container; making a determination that the at least one operation request is complete; and Based on the determination, sending a second operation request to the backup server to cause the backup server to close the first container, Wherein after the second operation and during the creation of the snapshot backup, the first container is no longer opened.
8. The electronic device of claim 7, wherein each sub-file list indicates that a group of files among the plurality of files is included in a corresponding container among the plurality of containers and indicates corresponding offsets and sizes of the group of files, The information indicates a location of a third container to which each file in the second plurality of files belongs, and an offset and a size of each file in the second plurality of files in the third container, wherein the third container is a container in the plurality of containers, and each file in the second plurality of files is a file in the plurality of files.
9. The electronic device according to claim 8, wherein the set of files includes the first file, and The sending of the at least one operation request to the backup server comprises: Determine a first starting position and a first ending position of the first file in the first container; as well as A third operation request is sent to the backup server, so that the backup server references the data in the first container between the first starting position and the first ending position.
10. The electronic device according to claim 9, wherein the set of files further comprises a third file and a fourth file, and The sending of the at least one operation request to the backup server comprises: Determining a second starting position and a second ending position of the third file in the first container, and a third starting position and a third ending position of the fourth file in the first container; and If it is determined that the second end position is the same as the third start position, a fourth operation request is sent to the backup server, so that the backup server references the data between the second start position and the third end position in the first container through a single reference operation.
11. The electronic device according to claim 10, wherein sending the at least one operation request to the backup server further comprises: If it is determined that the second end position and the third start position are different: Sending a fifth operation request to the backup server, so that the backup server references the data between the second starting position and the second ending position in the first container; as well as A sixth operation request is sent to the backup server, so that the backup server references the data in the first container between the third starting position and the third ending position.
12. A computer-readable storage medium comprising machine-executable instructions, which when executed by a device cause the device to perform a method comprising: At a backup client, obtaining a first file list corresponding to a snapshot backup to be created, the first file list indicating a plurality of files to be referenced by the snapshot backup, a path identifier of a first file among the plurality of files, and a first identifier of a first backup file associated with the first file, and data of the plurality of files are stored in a plurality of containers at a backup server, wherein a user of the backup client initiates a request to the backup client to generate the snapshot backup, wherein the request includes the first file list as an input of the user; Generating a second file list by sorting the plurality of files indicated in the first file list according to the containers to which they belong, the second file list indicating that each of the plurality of containers includes data of at least one file among the plurality of files, wherein the second file list indicates that the plurality of containers includes a first container, and the first container includes data of a group of files among the plurality of files, wherein generating the second file list includes: acquiring information related to the plurality of files from the backup server; generating an intermediate file list IFL for creating the snapshot backup based on the information and the first file list, wherein the IFL includes an entry associated with a second file among the plurality of files, wherein the entry specifies at least a path identifier of the second file, a second identifier of a second backup file associated with the second file, a path to a second container hosting the second file, and an offset and a size of the second file in the second container, wherein the second container is a container among the plurality of containers; Based on the IFL, generating a plurality of sub-file lists for at least a portion of the plurality of containers listed in the IFL; and combining the plurality of sub-file lists to generate the second file list; and enabling the backup server to reference the data of the plurality of files in the plurality of containers based on the second file list to create the snapshot backup, wherein the snapshot backup comprises a synthesis of the plurality of files specified in the second file list, The data for causing the backup server to reference the plurality of files in the plurality of containers based on the second file list comprises: sending a first operation request to the backup server to cause the backup server to open the first container, wherein in order to open the first container, the first container is represented as a file in a file system of the backup server; After the first operation, sending at least one operation request to the backup server to cause the backup server to reference the data of the set of files in the first container; making a determination that the at least one operation request is complete; and Based on the determination, sending a second operation request to the backup server to cause the backup server to close the first container, Wherein after the second operation and during the creation of the snapshot backup, the first container is no longer opened.
13. The computer-readable storage medium of claim 12, wherein each sub-file list indicates that a group of files in the plurality of files are included in a corresponding container in the plurality of containers and indicates corresponding offsets and sizes of the group of files, and The information indicates a location of a third container to which each file in the second plurality of files belongs, and an offset and a size of each file in the second plurality of files in the third container, wherein the third container is a container in the plurality of containers, and each file in the second plurality of files is a file in the plurality of files.
14. The computer-readable storage medium according to claim 13, wherein the set of files includes the first file, and The sending of the at least one operation request to the backup server comprises: Determine a first starting position and a first ending position of the first file in the first container; as well as A third operation request is sent to the backup server, so that the backup server references the data in the first container between the first starting position and the first ending position.
15. The computer-readable storage medium according to claim 14, wherein the set of files further comprises a third file and a fourth file, and The sending of the at least one operation request to the backup server comprises: Determining a second starting position and a second ending position of the third file in the first container, and a third starting position and a third ending position of the fourth file in the first container; and If it is determined that the second end position is the same as the third start position, a fourth operation request is sent to the backup server, so that the backup server references the data between the second start position and the third end position in the first container through a single reference operation.
16. The computer-readable storage medium of claim 15, wherein sending the at least one operation request to the backup server further comprises: If it is determined that the second end position and the third start position are different: Sending a fifth operation request to the backup server, so that the backup server references the data between the second starting position and the second ending position in the first container; as well as A sixth operation request is sent to the backup server, so that the backup server references the data in the first container between the third starting position and the third ending position.
17. The computer-readable storage medium of claim 12, wherein the first container is opened by making the data accessible to the backup server.
Citation Information
Patent Citations
System and method for high speed device access
US20080010324A1
Storage system and deduplication control method
US20160291877A1
Simplified database / log backup and restore
US9235606B1