Techniques for replicating data involve: determining overwritten probabilities of a plurality of data blocks of a source storage device. The techniques further involve: classifying the plurality of data blocks as cold data blocks or hot data blocks based on the overwritten probabilities in the plurality of data blocks. The techniques further involve: replicating at least a portion of the cold data blocks to a target storage device prior to the hot data blocks. Accordingly, transmission resources used to re-replicate overwritten data during an initial replication period can be reduced, thereby achieving efficient data replication.