Data Domain - How MTree Replication Works
Summary: The article describes how replication works. It describes about Mtree replication-periodic snapshots and user-created snapshots.
Instructions
How MTree Replication works
PURPOSE
Explain how MTree replication works.
APPLIES TO
- All Data Domain systems
- Software Release 5.1 and higher.
SOLUTION:
One of the fundamental differences between MTree and Directory replication is the method used for determining what must be replicated from the source to the destination. MTree replication leverages snapshots to ensure that the destination Data Domain system will always be a point-in-time image of the source Data Domain system. Snapshots are point-in-time images of the MTree. For each MTree replication context, the system auto-creates (and auto-deletes) snapshots of the MTree.
In contrast, Directory replication does not use snapshots, it uses a replication log. It must replicate every change that has been done to the content of the source directory in the sequence that it was changed. So for example, if file_1 is created, then modified, and then deleted. The directory replication replicates the creation of file_1, the modification, and the deletion steps to the destination DDR.
One advantage of MTree replication is that by using snapshots, some of the intermediate changes to the files may be skipped, reducing the amount of data that has to be sent over the network, and reducing replication lag.
MTree replication usesthe following steps:
- A snapshot is created at the source of the MTree replication context. This snapshot is compared to the last snapshot, and the changes are sent across to the destination.
- On the destination, the MTree is updated but the files will not be exposed to the user until ALL the changes for the latest snapshot are received.
The above steps are repeated every time a snapshot is created on the MTree which can occur in one of the two ways:
- When the replication lag is more than 15 minutes and there is no snapshot being currently replicated (system-generated-periodic-snapshots)
- At user-specified times (for example after the completion of a backup job) (user-created-snapshots).
- After the snapshot is replicated that connection on the destination is disconnected. A new connection is established between the source DD and destination DD when the next snapshot is replicated.
Example 1:
In this example we see how periodically generated snapshots behave.- S1, S2, and S3 are periodic system generated snapshots.
- S1 is generated and starts replicating to the destination.
- S1 takes more that 15 minutes to finish the replication.
- When the S1 replication is completed the connection on destination is disconnected.
- Because the time since S1 was created is longer than 15 minutes, a new periodic snapshot S2 is created and begins replicating. Replication of S2 completes in less than 15 minutes.
- The system waits until 15 minutes from the creation of S2 have elapsed before the creation of S3 (and deletion of S1).
- Replication of S3 begins immediately.

Example 2:
In this example we can see the interactions of user generated snapshots and the periodic generated snapshots:
- S1 is a periodic system generated snapshot. S2, and S3 are user generated snapshots
- S1 is generated and starts replicating to the destination.
- During the replication of S1 a user generated snapshot S2 is created.
- Because S1 is still replicating, the system continues replicating S1 until it is completed. Replication of S2 is on hold until S1 completes.
- When S1 completes replicating, replication of S2 begins immediately.
- If S2 replicates in less than 15 minutes the system goes back to waiting for 15 minutes since creation of S2 before the next system generated snapshot is created.
- However, in this example, a new user generated snapshot S3 is created before the 15 minutes are up.
- Because there is no replication in progress, the replication of S3 begins immediately after it is created.
- Because S2 and S3 are user generated snapshots, S1 is not deleted until a 3rd System generated snapshot is created.

REFERENCE
- MTree Replication FAQ 180842 .