A system and method for inserting checkpoints into a data stream and for restarting
an asynchronous transmission of a data stream from a source file system to a destination
file system is provided. The data stream can be a set of changes between a base
snapshot and incremental snapshot of the source file system for update of a replicated
file system on the destination. State information relating to the progress of the
source in processing and transmitting the data stream is stored at regular intervals,
and a checkpoint number associated with each stored segment of the state information
is inserted into the data stream. The destination tracks the fall commitment of
each segment of the data stream to persistent storage on the replicated file system.
If an error or communication loss requires the data transfer to be restarted, the
destination sends the checkpoint number associated with the last fully committed
segment of the data stream. The source reinitializes its data gathering processes
using the state information associated with the particular checkpoint number. The
changes sent from the source file system to the destination file system relate
to a sub-organization of a volume on the source such as a qtree, identified by
a qtree identifier (ID) in the associated inodes and data stream.