Device and method for multi-source recovery of items
A computer-implemented method of backup and restore in a network data storage system is provided. The method includes generating, at a predefined time interval, a series of one or more virtual snapshots including, for each item in the network data storage system: (i) a strong hash of the item data, and (ii) one or more metadata elements related to the item. The method includes, in response to a request to restore a particular item: (i) searching the series of virtual snapshots for all available sources of the particular item, (ii) identifying the best source for the particular item, and (iii) recovering item data for the particular item from the identified best source.
1 . A computer-implemented method of backup and restore in a network data storage system, applied to a processor of a backup and restore device, the method comprising:
generating, at a predefined time interval, a series of one or more virtual snapshots including, for each item in the network data storage system:
a strong hash of item data, wherein the strong hash is determined by using message digesting algorithm 5 (MD5), and
one or more metadata elements related to the item;
wherein the one or more virtual snapshots comprise a digest of the item in a form of the strong hash with the one or more metadata elements; and
wherein the one or more virtual snapshots do not include real backups of original items;
in response to a request to restore a particular item that is corrupted and is not backed-up:
searching the series of virtual snapshots for all available sources of the particular item and determining a virtual snapshot that includes a digest of the particular item with a strong hash associated with the particular item prior to being corrupted,
based on the determined virtual snapshot being found, preventing deletion of any of the series of virtual snapshots that are associated with the determined virtual snapshot;
identifying a best source for the particular item based on the determined virtual snapshot, wherein the identified best source is closest to an original version of the particular item prior to being corrupted, and
recovering item data for the particular item from the identified best source based on a strong hash of the recovered item data and the strong hash associated with the particular item prior to being corrupted comprised in the determined virtual snapshot.
2 . The method of claim 1 , wherein searching for all the available sources of the particular item includes: preventing deletion of any available source of the particular item.
3 . The method of claim 1 , wherein the predefined time interval is based on a file type for each item in the network data storage system.
4 . The method of claim 1 , wherein the one or more metadata elements includes an access latency for each item, and identifying the best source for the particular item is based on the access latency.
5 . The method of claim 1 , wherein the one or more metadata elements includes an access availability for each item, and identifying the best source for the particular item is based on the access availability.
6 . The method of claim 1 , wherein the one or more metadata elements includes a storage reliability for each item, and identifying the best source for the particular item is based on the storage reliability.
7 . The method of claim 1 , wherein the one or more metadata elements includes a last update time for each item, and identifying the best source for the particular item is based on the last update time.
8 . The method of claim 1 , wherein the one or more metadata elements includes a number of changes made to each item, and identifying the best source for the particular item is based on the number of changes.
9 . The method of claim 1 , further comprising: generating the request to restore the particular item in response to detecting corruption of the particular item.
10 . The method of claim 1 , wherein recovering the item data for the particular item includes:
validating the item data for the particular item by determining the strong hash for the item data for the particular item, and
comparing the determined strong hash with the strong hash associated with the particular item prior to being corrupted comprised in the determined virtual snapshot.
11 . A backup and restore device for a network data storage system, the backup and restore device comprising:
a memory having instructions stored thereon; and
a processor configured to execute the instructions in the memory to perform by the backup and restore device operations comprising:
generating, at a predefined time interval, a series of one or more virtual snapshots including, for each item in the network data storage system:
a strong hash of item data, wherein the strong hash is determined by using message digesting algorithm 5 (MD5), and
one or more metadata elements related to the item;
wherein the one or more virtual snapshots comprise a digest of the item in a form of the strong hash with the one or more metadata elements; and
wherein the one or more virtual snapshots do not include real backups of original items;
in response to a request to restore a particular item that is corrupted and is not backed-up:
searching the series of virtual snapshots for all available sources of the particular item and determining a virtual snapshot that includes a digest of the particular item with a strong hash associated with the particular item prior to being corrupted,
based on the determined virtual snapshot being found, preventing deletion of any of the series of virtual snapshots that are associated with the determined virtual snapshot,
identifying a best source for the particular item based on the determined virtual snapshot, wherein the identified best source is closest to an original version of the particular item prior to being corrupted, and
recovering item data for the particular item from the identified best source based on a strong hash of the recovered item data and the strong hash associated with the particular item prior to being corrupted comprised in the determined virtual snapshot.
12 . The backup and restore device of claim 11 , wherein searching for all the available sources of the particular item includes: preventing deletion of any available source of the particular item.
13 . The backup and restore device of claim 11 , wherein the predefined time interval is based on a file type for each item in the network data storage system.
14 . The backup and restore device of claim 11 , wherein the one or more metadata elements includes an access latency for each item, and identifying the best source for the particular item is based on the access latency.
15 . The backup and restore device of claim 11 , wherein the one or more metadata elements includes an access availability for each item, and identifying the best source for the particular item is based on the access availability.
16 . The backup and restore device of claim 11 , wherein the one or more metadata elements includes a storage reliability for each item, and identifying the best source for the particular item is based on the storage reliability.
17 . The backup and restore device of claim 11 , wherein the one or more metadata elements includes a last update time for each item, and identifying the best source for the particular item is based on the last update time.
18 . The backup and restore device of claim 11 , wherein the one or more metadata elements includes a number of changes made to each item, and identifying the best source for the particular item is based on the number of changes.
19 . The backup and restore device of claim 11 , wherein the operations further include:
generating the request to restore the particular item in response to detecting corruption of the particular item.
20 . The backup and restore device of claim 11 , wherein recovering the item data for the particular item includes:
validating the item data for the particular item by determining the strong hash for the item data for the particular item, and
comparing the determined strong hash with the strong hash associated with the particular item prior to being corrupted comprised in the determined virtual snapshot.