Data Replication - How To

Topics How To  
Table of Contents

Start Data Replication Activity

Before You Begin

Required Capability: Capabilities and Permitted Actions

To start Data Replication Activity:

  • In the CommCell Browser, click the ContinuousDataReplicator.
  • Select Replication Set, right-click a Replication Pair, and select any one from the following options:

    Start, or Start Full Resync.

Change the State of Replication Pair

Before You Begin

Required Capability: Capabilities and Permitted Actions

To change the state of a Replication Pair:

  • You can change the state of one or more Replication Pairs at once from the Replication Set level.
    1. In the CommCell Browser, right-click a Replication Set in the source machine, and select All Tasks, then select Change State.
    2. In the Change States dialog box, select the Replication Pair(s), and click Start, Start Full Resync, Suspend, Resume, or Abort.
    3. When your changes are complete, click Close.

Configure Orphan File Processing

Before You Begin

Required Capability: Capabilities and Permitted Actions

To configure orphan file processing for a Replication Set:

  1. From the CommCell Browser, right-click the Replication Set on a source computer, and select Properties.
  2. From the Replication Set Properties (Orphan Files) tab, perform the following selections:
    • Select Log orphan file names to create a log of all orphan files found on the destination computer. If this option is not selected, orphan files will not be identified on the destination.
    • Select Automatically deleted orphan files to automatically log and delete all orphan files found on the destination.
  3. Click OK.

View Orphan Files

Before You Begin

Required Capability: Capabilities and Permitted Actions

To view the orphan files for a Replication Pair:

  1. In the CommCell Browser, right-click the ContinuousDataReplicator icon on a source computer, and from All Tasks, select Data Replication Monitor.
  2. In the Data Replication Monitor, right-click a Replication Pair and select View Orphan Files.

Perform Replication Prediction

Each listed command should be run from a command line prompt, in the folder where the base package resides.

Before You Begin

Required Capability: Capabilities and Permitted Actions

Start monitoring

All active Replication Pairs are automatically monitored from the time they are configured. To monitor an object not configured using CDR, you will need to add the path of the object to the list of monitored objects by executing this command.

Windows: predict -folder <full path and folder name>

Examples:

  • predict -folder G:\data
  • predict -folder G:\

UNIX: cdrp -start <fname>

View data for a monitored volume, folder, or mount point

View the data for a monitored volume, folder, mount point, or file system by executing this command.

Windows: predict -getdata <full path and folder name>

If you specify a volume for this command, all monitored paths in this volume will be reported.

Examples:

  • predict -getdata G:\data
  • predict -getdata G:\

Sample Output:

predict -getdata L:\

Vol Name: L:\
Folder \test1\
Monitored Interval From <time_stamp> to <time_stamp>
Monitored area Bytes Changed 00863744 Change in MB = 0.823730 MB

Folder \test\
Monitored Interval From <time_stamp> to <time_stamp>
Monitored area Bytes Changed 60018688 Change in MB = 57.238281 MB

UNIX: cdrp -q[uery] [[-c] <fname>]

Queries replication statistics for the file system that the specified file belongs to. If a file name is not provided, the program will enumerate all mounted watched file systems and will provide statistics for each of them. You may pass a "-c" option along with the file name. This will make the tool perform continuous queries -- refreshing the screen every several seconds.

Reset data for a volume, folder, or mount point

Reset the data for a monitored volume, folder, mount point, or file system by executing this command.

Windows: predict -getdata <full path and folder name> -c

If you specify a volume for this command, the data for all monitored paths in this volume will be reset.

Examples:

  • predict -getdata G:\data -c
  • predict -getdata G:\ -c

UNIX: cdrp -r[eset] [<fname>]

Resets replication statistics for the file system that the specified file belongs to. If a file name is not provided, the program will reset replication statistics for all mounted, monitored file systems.

Stop monitoring

For objects not configured using CDR, stop monitoring by executing this command.

Windows: predict -remove <full path and folder name>

Examples:

  • predict -remove G:\data
  • predict -remove G:\

UNIX: cdrp -stop <fname>

Out of Band Sync from the Replication Set

Before You Begin

  • All replication pairs within the replication set must be in new or stopped state.

Required Capability: Capabilities and Permitted Actions

To perform the Out Of Band Sync for a Replication Pair at Replication Set level:

  1. In the CommCell Browser, expand the Client computers and locate the ContinuousDataReplicator source client.
  2. Right-click the Replication Set, and from All Tasks, select Out Of Band Sync. Out Of Band Sync dialog box will be prompted.
  3. Select Setup for incremental replication without running a full sync option to replicate the data without running a full sync.
  4. Ensure that you copied the initial backup data on the destination computer, and then select Enable Incremental Sync option to start the Replication Pair with Smart Sync, so that only the data that is new or modified since the backup will need to be replicated.

Out of Band Sync from a Replication Pair

Before you Begin

  • To perform Out of Band Sync, replication pair must be in new or stopped state.

Required Capability: Capabilities and Permitted Actions

To perform the Out Of Band Sync for a Replication Pair:

  1. In the CommCell Browser, expand the Client computers and locate the ContinuousDataReplicator source client.
  2. Right-click a Replication Pair, and select Out Of Band Sync. Out Of Band Sync dialog box will be prompted.
  3. Select Setup for incremental replication without running a full sync option to replicate the data without running a full sync.
  4. Ensure that you copied the initial backup data on the destination computer, and then select Enable Incremental Sync option to start the Replication Pair with Smart Sync, so that only the data that is new or modified since the backup will need to be replicated.

Replicate the Destination Data Back to the Source Computer (Windows Only)

Required Capability: Capabilities and Permitted Actions

To temporarily use the replica as the production data set:

  1. On the Destination computer, query and record the USN for each Replication Pair destination volume using the CDRXHelp.exe -readUSN -cn <ClientName> -vm <InstanceName*> -path L:\ command, which returns the current USN of the specified volume. All Replication Pairs using this volume as a destination will share the same USN.

    Example:

    There are three Replication Pairs:
       E:\ => L:\E_drive
       F:\ => L:\F_drive
       N:\ => M:\N_drive

    Query the USNs of the L: and M: volumes (the first two Replication Pairs use the same destination drive, L:, and will thus use the same USN) by typing the following commands:

    • <software_installation_path>\Base> CDRXHelp.exe -readUSN -cn <ClientName> -vm <InstanceName*> -path L:

      Sample output:

      CDRXHelp 1.0 - CDR External Base Line Helper Tool
      Path: L:\
      USN: 0f4f5a68

    • <software_installation_path>\Base> CDRXHelp.exe -readUSN -cn <ClientName> -vm <InstanceName*> -path M:

      Sample output:

      CDRXHelp 1.0 - CDR External Base Line Helper Tool
      Path: M:\
      USN: 0f4f6b46

    Record both USNs for use later in this procedure.

  2. The replica on the Destination computer can now be used as the production data set.

When the original Source computer is operational again, proceed to the next section.

To replicate data back to the original Source computer:

  1. On the Source computer, record your Replication Pair configuration information, then delete the Replication Pair(s) and Replication Set(s). See Delete a Replication Pair and Delete a Replication Set.
  2. On the Destination computer, create a Replication Set and Replication Pair(s) -- reversing the source and destination for each Replication Pair that existed on the original Source computer -- and determine the Pair ID(s) using the CDRXHelp.exe -cn <ClientName> -vm <InstanceName*> -pairs command. See Create a Replication Set and Add or Edit a Replication Pair.

    Do not start the Replication Pair(s) yet.

    Example:
    Using the same example from Step 2, create three Replication Pairs on the Destination computer:
       L:\E_drive => E:\ 
       L:\F_drive => F:\
       M:\N_drive => N:\

    Determine the Replication Pair ID(s) using the CDRXHelp.exe -cn <ClientName> -vm <InstanceName*> -pairs command:

    <software_installation_path>\Base> CDRXHelp.exe -cn <ClientName> -vm <InstanceName*> -pairs

    Sample output:
    REPID PAIRID  SrcPath      DestPath
    91    177     L:\E_drive   E:\
    91    180     L:\F_drive   F:\
    92    183     M:\N_drive   N:\

  3. On the Destination computer, set the USN for each Replication Pair to the one returned for the original Replication Pair's destination volume (the USNs you recorded in Step 2) by executing the following command:

    CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName*> -pID <PAIRID> -USN <some_USN> - sets a Replication Pair with a Pair ID <PAIRID> to a specific USN, <some_USN>.

    If you miss this step your Replication Pair will have the default USN of 0 and when you start the Replication Pair, a Full Re-Sync will be performed.

    Example:

    Using the same example from Steps 2 and 4, execute the following three commands:

    <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName*> -pID 177 -USN 0f4f5a68
    <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName
    *> -pID 180 -USN 0f4f5a68
    <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName
    *> -pID 183 -USN 0f4f6b46

    Sample output:
    CDRXHelp 1.0 - CDR External Base Line Helper Tool
    PairId: 177
    Old JournalId: ffffffffffffffff
    Old USN: ffffffffffffffff
    New JournalId: 1c625d8d392c299
    New USN: 0f4f5a68

  4. By default, orphan files will be automatically deleted. If there were files on the original Source computer which were never replicated to the Destination computer, you may not want such files to be deleted as orphans. See View Orphan Files and Data Replication - Orphan Files.
  5. On the Destination computer, start the Replication Pair(s) using Smart Re-Sync, by using the Start command. See Start/Suspend/Resume/Abort Data Replication Activity.
  6. Baselining will begin; all the data added, deleted, or modified since the saved USN will be copied back to the original Source computer.
  7. When the Baselining phases end, stop using the Destination computer as a production server and create a Consistent Recovery Point to ensure all the data has been replicated back to the source. See Create a Recovery Point.
  8. On the Destination computer, abort and delete the Replication Pair(s). See Start/Suspend/Resume/Abort Data Replication Activity and Delete a Replication Pair. Also, delete the Replication Sets; see Delete a Replication Set.

    When the Replication Set is deleted, any Recovery Points or Consistent Recovery Points that were created from the Destination will be deleted as well, which is necessary in order for SmartSync to succeed when you start replication on the original Source computer again. If you want to preserve the data in such Recovery Points, back them up before deleting the Replication Set. See Back up a Recovery Point.

  9. On the original Source computer, recreate the original Replication Set and Replication Pair(s). See Create a Replication Set and Add or Edit a Replication Pair.

    Do not start the Replication Pair(s) yet.

  10. To avoid transferring all the data again, set the USN for each Replication Pair before you start replication. Perform the following on the original Source computer:
    • Determine the Replication Pair ID(s) using the CDRXHelp.exe -cn <ClientName> -vm <InstanceName*> -pairs command as shown in Step 3. For this example, assume that the command returned Pair IDs of 200, 205, and 210.
    • Set the USN for each Replication Pair to the current USN for its source volume, by executing the following commands:
      <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName*> -pID 200 -USN 200
      <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName*> -pID 205 -USN 205
      <software_installation_path>\Base> CDRXHelp.exe -setUSN -cn <ClientName> -vm <InstanceName*> -pID 210 -USN 210
  11. On the original Source computer, start the Replication Pair(s) using Smart Re-Sync, and begin using the Source computer as the production server again.

* InstanceName is the name used for a CDR instance (by default it is Instance001). If multiple instances of CDR are installed use the corresponding instance name, see Multi Instancing for more information.