Patent ID: 7877628

Claim:
A method for synchronizing data between a primary storage managed by a primary server at a first site and a secondary storage managed by a secondary server at a second site, comprising: copying updates to segments of the primary storage at the first site to corresponding segments of the secondary storage at the second site as part of a first copy operation; providing codes generated from the segments in the secondary storage at the second site and a valid flag for at least one code indicating whether the code for the segment of data is valid; setting the valid flag to indicate one of the segments of data as invalid in response to receiving an update to the segment of data that results in the current code for the segment not reflecting the updated state of that segment; generating a new code for segments in the secondary storage whose valid flag indicates that the segment is invalid; setting the valid flag for the segment for which the new code is calculated to indicate that the code for the segment is valid; providing codes generated from segments of the primary storage at the first site; initiating a second copy operation to copy segments from the secondary storage at the second site to the primary storage at the first site; determining, for segments in the secondary storage at the second site, whether the valid flag for the code for the segment in the secondary storage at the second site indicates that the code is valid in response to initiating the second copy operation; and comparing the code for at least one of the segments in the secondary storage at the second site determined to be valid with the code for the corresponding segment in the primary storage at the first site to determine whether to copy the data from the segment in the secondary storage at the second site to the primary storage at the first site as part of the second copy operation.