Patent ID: 7689607

Claim:
An automatic data backup system that facilitates generating mirror copies of data pages, the system comprising: a processor; system memory; a data store comprising: an original database, a first instance of a first data page being located in the original database; a mirror database that is a complete backup of the original database, a second instance of the first data page being located in the mirror database; and a buffer memory, a plurality of data pages being located in the buffer memory, each of the plurality of data pages having an individually associated counter, the plurality of data pages in the buffer memory including a third instance of the first data page; and a mirroring component that, in response to a modification of the third instance of the first data page in the buffer memory, replaces the second instance of the first data page in the mirror database with the modified third instance of the first data page, and initializes a counter associated with the modified third instance of the first data page in the buffer memory; and utilizes a flush sequence number technique to maintain an I/O latch on the instances of the first data page for a duration of a single I/O write, the mirroring component including: a checkpoint component that generates a transaction log comprising recorded modification events for each modified data page and a log sequence number assigned to each page update, and truncates the transaction log for the data page upon the checkpoint and initiates a new transaction log for the data page; and a lazy writer component that repeatedly passes over the plurality of data pages in the buffer memory, that incrementally adjusts each of the counters individually associated with the plurality of data pages in the buffer memory after each pass over, and that, in response to the counter associated with the third instance of the first data page in the buffer memory reaching a predetermined value after being incrementally adjusted, replaces the first instance of the first data page in the original database with the modified third instance of the first data page and then evicts the third instance of the first data page from the buffer memory.