Export phase

The export phase of the replica creation process occurs at the original site. This phase consists of running the export form of the mkreplica command, taking a backup of the original VOB (specifically including the fact that the VOB has now been replicated), and verifying that the replica-related changes occurred.

Before you begin

Before you can start the export phase of VOB replica creation, you must have satisfied all of the prerequisites described under Prerequisites for creating a new VOB replica.

About this task

These steps take place at the original site.

Procedure

  1. Enter the export form of the mkreplica command on a single line.

    For information about restrictions on the command, see the mkreplica reference page.

    In this example, the administrator uses the –fship option to send the packet immediately.
    MINUTEMAN% multitool mkreplica –export –workdir /tmp/ms_wkdir
    –fship goldengate:sanfran_hub@/vobs/dev
    Enabling replication in VOB.
    Comments for "sanfran_hub":
    First time replication for dev VOB
    Creating new replica, sanfran_hub, on host goldengate
    .
    
    Generating replica creation packet /opt/hcl/ccm/versionvault/shipping/ms_ship/
    outgoing/repl_boston_hub_1
    6-Aug-03.09.49.36_14075_1
    - shipping order file is
     /var/adm/hcl/versionvault/shipping/ms_ship/outgoing/
    sh_o_repl_boston_hub_16-Aug-03.09.49.36_14075_1
    Dumping database...
    ...
    
    Dumper done.
    Attempting to forward/deliver generated packets...
    -- Forwarded/delivered packet /opt/hcl/ccm/versionvault/shipping/ms_ship/
    outgoing/repl_boston_hub_1
    6-Aug-03.09.49.36_14075_1
    
  2. Back up the original VOB.

    This backup records the fact that the VOB is replicated. If you have to restore a VOB replica from a backup copy that was made before the VOB was replicated, the MultiSite replica restoration procedure fails. (Although the restorereplica command may succeed, you will not be able to import update packets from other replicas because the original VOB is marked as unreplicated.)

  3. (Optional) Verify the replica-related changes.
    These commands show the work you have done so far. The mkreplica command creates a new replica object in the VOB database. This object is similar to the VOB object that represents the entire VOB in the database, and its properties are listed by the lsreplica command.
    MINUTEMAN% multitool lsreplica –invob /vobs/dev
    For VOB replica "/vobs/dev":
    15-Aug.14:19   susan       replica "boston_hub"
    16-Aug.09:49   susan       replica "sanfran_hub"
    
    MultiSite commands process replica objects similarly to the way that HCL VersionVault commands process type objects. The rename command renames a replica object, as described in the renaming step of the procedure described under Prerequisites for creating a new VOB replica. The cleartool lshistory command lists events associated with replica objects.
    MINUTEMAN% cleartool lshistory replica:boston_hub@/vobs/dev
    16-Aug.09:45   susan     rename replica "boston_hub"
    "Changed name of replica from "original" to "boston_hub"."
    15-Aug.14:19   susan     make attribute "FeatureLevel" on replica "boston_hub"
    "Added attribute "FeatureLevel" with value 2."
    ...
    

What to do next

Attention: Do not modify any properties of the new replica at this point. If you must change any properties, you must first import the replica-creation packet at the new site, export an update packet from the new replica, and import the packet at the original replica.

If you specified the –fship (force ship) option to the mkreplica command (as shown in the preceding example code), you can proceed to the import phase of the replica creation process. The transport phase of the replica creation process has already been executed because the –fship option causes the packet to be shipped automatically.

Note: Although our example did not show this method, you could have used the–ship option to the mkreplica command, which would have placed the replica-creation packet in the storage bay, rather than sending it immediately to the new replica's site. If you specified –ship when creating the replica, you would be required to ship the packet manually using the procedures shown in the transport phase of the replica creation process before you could go to the import phase.