A method and system for generating a snapshot in a consistent state is
disclosed. The system comprises a host computer, a primary data storage,
a data protection unit, and a secondary data storage. The data protection
unit monitors a state of an application which is running on the host
computer. The data protection unit generates a snapshot of data stored in
a primary data storage when the application is in a consistent state, and
stores the snapshot on a secondary storage. In the event of a system
failure, the data is recovered using the last snapshot.