A method, system and computer program product for data backup such that:
for each block of a storage device to be backed up to an image,
generating a hash function value corresponding to contents of that block;
generating a map of links between blocks in the image and corresponding
blocks the storage device; using the hash function values to identify
blocks of the storage device with identical contents, such that links for
the blocks in the storage device with identical contents point to a
single block in the image; and modifying the link in the map when a block
in the storage is moved (for example, due to defragmentation) but its
contents is not altered, so that the link points to the same backed up
block.