Organizations may need to deal with a vast amount of business data these days, which could range from a few terabytes to multiple petabytes of data. Loss of data or inability to access data may impact an enterprise in various ways such as loss of potential business and lower customer satisfaction.
For a better understanding of the solution, embodiments will now be described, purely by way of example, with reference to the accompanying drawings, in which:
Organizations may back up their data for various reasons. For example, in order to recover data after its loss, or to recover data from an earlier time. Organizations may back up their data to a backup storage system or device. A backup storage system may include, for example, a secondary storage media such as external hard disk drives, solid-state drives (SSD), a storage array, USB flash drives, storage tapes, CDs, and DVDs.
In an example, an approach to data backup may include taking snapshots of a storage volume on a storage device, and then backing up the snapshots to a backup device. During a restore operation, the data stored in a backup may be copied from the backup device to the storage device. However, restoring a large storage volume in this manner by copying all data from the backup device to the storage device, especially over a network, may take a lot of time. Further, the process may use valuable network bandwidth and may duplicate data on the storage device as blocks holding the same data may be copied. Needless to say, neither of these aspects related to restoration of a storage volume is desirable from an organization's perspective.
To address these issues, the present disclosure describes various examples for restoring a storage volume from a backup. In an example, a backup of a snapshot of a storage volume on a storage device may be generated. The backup of the snapshot may be stored on a backup device. An allocation map for the snapshot may be generated. The allocation map may identify written blocks on the snapshot. The allocation map for the snapshot may be stored in a data store on the backup device. The respective backups of additional snapshots of the storage volume may be generated. The respective backups of additional snapshots may be stored on the backup device. For each additional snapshot that is backed up on the backup device, a difference map may be generated. The difference map for an additional snapshot may identify changed blocks on the additional snapshot relative to a previous snapshot last backed up on the backup device. Each difference map may be stored in the data store on the backup device. In response to a request to restore the backup of the snapshot, a latest snapshot of the storage volume may be generated. A difference map for the latest snapshot may be generated. The difference map for the latest snapshot may identify changed blocks on the latest snapshot relative to a last snapshot backed up on the backup device. A combined map may be generated based on the difference map for the latest snapshot and respective difference maps of the additional snapshots backed up on the backup device prior to the latest snapshot. The blocks that changed between the snapshot and the latest snapshot from the combined map may be identified. The changed blocks may be copied from the backup device to the storage device.
Thus, examples described herein provide an efficient mechanism of restoring a storage volume. For example, examples described herein may reduce the data transferred from a backup device during a restore operation, allow block reuse thereby speeding up the restore process, improve storage efficiency, and/or free up network bandwidth.
In some examples, storage device 102 and backup device 104 may each be an internal storage device, an external storage device, or a network attached storage device. Some non-limiting examples of storage device 102 and backup device 104 may each include a hard disk drive, a storage disc (for example, a CD-ROM, a DVD, etc.), a storage tape, a solid state drive, a USB drive, a Serial Advanced Technology Attachment (SATA) disk drive, a Fibre Channel (FC) disk drive, a Serial Attached SCSI (SAS) disk drive, a magnetic tape drive, an optical jukebox, and the like. In an example, storage device 102 and backup device 104 may each be a Direct Attached Storage (DAS) device, a Network Attached Storage (NAS) device, a Redundant Array of Inexpensive Disks (RAID), a data archival storage system, or a block-based device over a storage area network (SAN). In some examples, storage device 102 and backup device 104 may each be a storage array, which may include one or more storage drives (for example, hard disk drives, solid state drives, etc.).
Computing system 106 may be any type of computing device capable of executing machine-readable instructions. Examples of computing system 106 may include, without limitation, a server, a desktop computer, a notebook computer, a tablet computer, a thin client, a mobile device, a personal digital assistant (PDA), and the like. In an example, computer system may include a virtual machine (VM). In an example, the virtual machine may be present in a cloud system. In another example, the virtual machine may be present on storage device 102 or backup device 104.
In an example, the physical storage space provided by storage device 102 may be presented as a logical storage space. Such logical storage space (also referred as “logical volume”, “virtual disk”, or “storage volume”) may be identified using a “Logical Unit Number” (LUN). In another instance, physical storage space provided by storage device may be presented as multiple logical volumes. In such case, each of the logical storage spaces may be referred to by a separate LUN. Thus, if storage device 102 is a physical disk, a LUN may refer to the entire physical disk, or a subset of the physical disk or disk volume. In another example, if storage device 102 is a storage array comprising multiple storage disk drives, physical storage space provided by the disk drives may be aggregated as a logical storage space. The aggregated logical storage space may be divided into multiple logical storage volumes, wherein each logical storage volume may be referred to by a separate LUN. LUNs, thus, may be used to identify individual or collections of physical disk devices for address by a protocol associated with a Small Computer System Interface (SCSI), Internet Small Computer System Interface (iSCSI), or Fibre Channel (FC).
Computing system 106 may be in communication with storage device 102 and backup device 104, for example, via a computer network 140. Computer network 140 may be a wireless or wired network. Computer network 140 may include, for example, a Local Area Network (LAN), a Wireless Local Area Network (WAN), a Metropolitan Area Network (MAN), a Storage Area Network (SAN), a Campus Area Network (CAN), or the like. Further, computer network 140 may be a public network (for example, the Internet) or a private network (for example, an intranet).
Storage device 102 may be in communication with backup device 104, for example, via a computer network (not illustrated). Such a network may be similar to the network described above. Storage device may communicate with backup device 104 via a suitable interface or protocol such as, but not limited to, Internet Small Computer System Interface (iSCSI), Fibre Channel, Fibre Connection (FICON), HyperSCSI, and ATA over Ethernet.
In an example, computing system 106 may include a snapshot engine 160, a storage engine 162, a map engine 164, and a restore engine 166.
Engines 160, 162, 164, and 166 may include any combination of hardware and programming to implement the functionalities of the engines described herein. In examples described herein, such combinations of hardware and software may be implemented in a number of different ways. For example, the programming for the engines may be processor executable instructions stored on at least one non-transitory machine-readable storage medium and the hardware for the engines may include at least one processing resource to execute those instructions. In some examples, the hardware may also include other electronic circuitry to at least partially implement at least one engine of computing system 106. In some examples, the at least one machine-readable storage medium may store instructions that, when executed by the at least one processing resource, at least partially implement some or all engines of computing system 106. In such examples, computing system 106 may include the at least one machine-readable storage medium storing the instructions and the at least one processing resource to execute the instructions.
Snapshot engine 160 may be used to generate a snapshot(s) of a storage volume(s) on storage device 102. As use herein, a “snapshot” may refer to a point-in-time record of data on a storage device. Snapshot engine 160 may generate snapshots of a storage volume at different time periods.
In an example, snapshot engine 160 may generate a backup of a snapshot of a storage volume (for example, 120). In the event additional snapshots of storage volume 120 are generated, snapshot engine 160 may generate respective backups of some or all of the additional snapshots. As used herein, an “additional snapshot” may refer to any snapshot beyond the first snapshot. As used herein, the “first snapshot” refers to a snapshot at a reference point in time, not necessarily the first snapshot. As used herein, a “backup” may include a copy of data in a snapshot.
In an example, storage engine 162 may store the backup (for example, 131) of the first snapshot (for example, S1) of storage volume 120 to backup device 104. In an example, storage engine 162 may store the backup of the first snapshot to first data store 122 on backup device 104. As mentioned earlier, in examples where additional snapshots (for example, S2, S3, etc.) of a storage volume (for example, 120) are generated, snapshot engine 162 may generate respective backups of some or all of the additional snapshots. In these examples, storage engine 162 may store the respective backups (for example, B4 and B7) of the additional snapshots to first data store 122 on backup device 104.
In an example, map engine 164 may be used to generate an allocation map (for example, S1_alloc) for the first snapshot of storage volume 120. As used herein, an “allocation map” may identify written blocks on a snapshot. For example, an allocation map may identify all non-zero blocks on a snapshot. In an example, an allocation map may include a bit map of the storage volume where each bit may represent a block that has been written to. Storage engine 162 may store the allocation map for the first snapshot in second data store 124 on backup device 104.
In an example, for each additional snapshot that is backed up on the backup device 104 (e.g., B4, B7), map engine 164 may generate a difference map. As used herein, a “difference map” for an additional snapshot may identify changed blocks on the additional snapshot relative to the previous snapshot that was last backed up for storage volume 120. As used herein, a “previous snapshot” in relation to an additional snapshot may refer to a snapshot that was last backed up prior to the additional snapshot (e.g., S4 is a previous snapshot in relation to S7 because S4 was the last backed up snapshot in relation to S7). A difference map may identify changed blocks on a snapshot since the last backup. In an example, a difference map may include a bit map of the volume where the bits may represent blocks that have been changed since the last backup.
In examples where additional snapshots of the storage volume are backed up on backup device 104, map engine 164 may generate a difference map (for example, S1-S4_diff and S4-S7_diff) for each of the additional snapshots that are backed up. In an example, storage engine 162 may store each of the difference maps (for example, S1-S4_diff and S4-S7_diff) in second data store 124 on backup device 104.
Restore engine 166 may be used to restore a backup of a snapshot of storage volume 120 from backup device 104. The backup may include, for example, a backup of the first snapshot or a backup of any of the additional snapshots. In an example, restore engine 166 may receive a request to restore a backup on backup device 104. In an example, the request may be received from a user. In another example, the request may be system-generated. The request may relate to a restoration of the backup of the first snapshot of storage volume 120. In another example, the request may relate to a restoration of the backup of any of the additional snapshots of storage volume 120 that were backed up on backup device 104 (e.g., S4 or S7). Further, the request may relate to a restoration of a backup to storage device 102 or a new storage device (not illustrated). In an example, the request may relate to a restoration of a backup to a new snapshot on storage device 102. In another example, the request may relate to a restoration of a backup to the base volume of storage device 102.
In an example, restore engine 166 may receive a request to restore the backup of the first snapshot of storage volume 120 to a new snapshot on storage device 102. In an example, the request may be received in response to a determination that the first snapshot of storage volume 120 is not available. Restore engine 166 may forward the request to snapshot engine 160. In response to the request, snapshot engine 160 may generate a latest snapshot of storage volume 120. As used herein, a “latest snapshot” may refer to the most recent snapshot. A latest snapshot may include, for example, the first snapshot, an additional snapshot, or the last snapshot. In the context of
Map engine 164 may generate a difference map for the latest snapshot. The difference map for the latest snapshot may identify changed blocks on the latest snapshot relative to the last snapshot that was backed up on backup device 104. As used herein, a “last snapshot” may refer to a snapshot that was last backed up prior to the latest snapshot. For example, in the context of
Subsequent to the identification of changed blocks, restore engine 166 may copy the changed blocks from backup device 104 to storage device 102.
In another example, restore engine 166 may receive a request to restore the backup of the first snapshot of storage volume 120 to a new storage device (not illustrated). In response to the request, restore engine 166 may create a storage volume on the new storage device. In an example, the size of the storage volume on the new storage device may correspond to a size of the storage volume 120. Restore engine 166 may then refer to the allocation map for the first snapshot from second data store on backup device 104. Restore engine 166 may determine from the allocation map which blocks are non-zero (or written). Based on the determination, restore engine 166 may copy the non-zero blocks from backup device to the new storage device.
In another example, restore engine 166 may receive a request to restore the backup of an additional snapshot of storage volume 120 to a new storage device. In response to the request, restore engine 166 may read the allocation map for the first snapshot from second data store 124 on backup device 104. Restore engine 166 may also read the difference map for each additional snapshot backed up prior to the backup of the additional snapshot from second data store 124. For example, in the context of
There may be two types of combined map that may be formed. In an example, an allocation map comprised by combining an allocation map and a chain of difference maps to the required backup. This may be useful for identifying blocks that may be non-zero. In another example, a difference map comprised by combining only a subset of chained difference maps. This may be useful for identifying the differing blocks between any volume state that is to be restored over and any backup by combining only the difference maps that link them.
As mentioned earlier, second data store 124 may be a repository that may store an allocation map for the first snapshot of a storage volume (for example, 120), and respective difference maps for any additional snapshots of the storage volume (for example, 120).
Second data store 124 may also accommodate more complex snapshot relationships without any loss of functionality. For example, allocation maps or difference maps for snapshots of snapshots may be stored and represented in second data store 124. In this context, in an example, snapshot engine 160 may generate a snapshot of the snapshot of a storage volume (for example, 120). Storage engine 162 may store the snapshot of the snapshot in first data store 122. Map engine 164 map generate an allocation map for the snapshot of the snapshot, wherein the allocation map for the snapshot of the snapshot may identify written blocks on the snapshot of the snapshot. Storage engine 162 may store the allocation map for the snapshot of the snapshot in second data store 124. Snapshot engine 160 may generate a backup of the snapshot of the snapshot. Storage engine 162 may store the backup of the snapshot of the snapshot in first data store 122 on backup device 104. Map engine 164 may generate a difference map, wherein the difference map for the snapshot of the snapshot may identify changed blocks on the snapshot of the snapshot relative to the snapshot. In an example, the relationship between the allocation map for the snapshot of the snapshot and the difference map for the snapshot of the snapshot may be represented in the second data store via a graph structure (for example, a tree graph structure and a directed acyclic graph structure).
In an example, other than an allocation map for the first snapshot of a storage volume, additional allocation maps for one or more later snapshots of the storage volume may be generated by snapshot engine 160. The additional allocation maps may be stored in second data store 124 on backup device 104. The additional allocation maps may help shorten the creation of a combined map.
In an example, a backup stored in second data store 124 may be deleted. When a backup is deleted from second data store 124, a chain may be maintained between the snapshots to enable the construction of a combined map and/or a difference map. For example, in the context of
Computing system 400 may be any type of computing device capable of executing machine-readable instructions. Examples of the computing system 400 may include, without limitation, a server, a desktop computer, a notebook computer, a tablet computer, a thin client, a mobile device, a personal digital assistant (PDA), and the like.
In an example, computing system 400 may include a snapshot engine 160, a storage engine 162, a map engine 164, and a restore engine 166.
In an example, snapshot engine 162 may generate a backup of a snapshot of a storage volume (for example, 120) on a storage device (for example, 102). Storage engine 162 may store the backup of the snapshot in a first data store (for example, 122) on a backup device (for example, 104). Map engine 164 may generate an allocation map for the snapshot, wherein the allocation map may identify written blocks on the snapshot. Storage engine 162 may store the allocation map for the snapshot in a second data store (for example, 124) on the backup device. Snapshot engine 160 may generate respective backups of additional snapshots of the storage volume. Storage engine 162 may store the respective backups of additional snapshots in the first data store on the backup device. For each additional snapshot that is backed up on the backup device, map engine 164 may generate a difference map. The difference map for an additional snapshot may identify changed blocks on the additional snapshot relative to a previous snapshot last backed up on the backup device. Storage engine 162 may store each difference map in the second data store on the backup device. In response to a request to restore the backup of the snapshot to a new storage device, restore engine 166 may create a storage volume on the new storage device. Restore engine 166 may read the allocation map for the snapshot from the backup device. Restore engine 166 may identify written blocks on the snapshot from the allocation map, and copy the written blocks from the backup device to the new storage device.
Machine-readable storage medium 604 may store instructions 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, and 630. In an example, instructions 606 may be executed by processor 602 to generate a backup of a snapshot of a storage volume on a storage device. Instructions 608 may be executed by processor 602 to store the backup of the snapshot in a first data store on a backup device. Instructions 610 may be executed by processor 602 to generate an allocation map for the snapshot, wherein the allocation map may identify written blocks on the snapshot. Instructions 612 may be executed by processor 610 to store the allocation map for the snapshot in a second data store on the backup device. Instructions 614 may be executed by processor 610 to generate respective backups of additional snapshots of the storage volume. Instructions 616 may be executed by processor 610 to store the respective backups of additional snapshots in the first data store on the backup device. Instructions 618 may be executed by processor 610 to generate a difference map for each additional snapshot that is backed up on the backup device. The difference map for an additional snapshot may identify changed blocks on the additional snapshot relative to a previous snapshot last backed up on the backup device. Instructions 620 may be executed by processor 610 to store each difference map in the second data store on the backup device. Instructions 622 may be executed by processor 610 to read the allocation map for the snapshot from the backup device, in response to a request to restore the backup of an additional snapshot of the storage volume to a new storage device. In an example, the request may be received in response to a determination that the additional snapshot is not available. Instructions 624 may be executed by processor 610 to read the difference map for each additional snapshot backed up prior to a backup of the additional snapshot to the backup device. Instructions 626 may be executed by processor 610 to generate a combined map for the additional snapshot based on the allocation map for the snapshot and the difference map for each additional snapshot backed up prior to the backup of the additional snapshot. Instructions 628 may be executed by processor 610 to identify written blocks from the combined map. Instructions 630 may be executed by processor 610 to copy the written blocks from the backup device to the new storage device.
For the purpose of simplicity of explanation, the example method of
It should be noted that the above-described examples of the present solution is for the purpose of illustration only. Although the solution has been described in conjunction with a specific example thereof, numerous modifications may be possible without materially departing from the teachings and advantages of the subject matter described herein. Other substitutions, modifications and changes may be made without departing from the spirit of the present solution. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and/or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and/or steps are mutually exclusive.