Creates a replica
mkrep·lica –exp·ort –wor·kdir temp-dir-pname [ –max·size size ]
[ –c·omment comment | –cfi·le comment-file-pname | –cq·uery | –cqe·ach | –nc·omment ]
{ { –sh·ip | –fshi·p } [ –scl·ass storage-class ] [ –pex·pire date-time ] [ –not·ify e-mail-addr]
| –tape raw-device-pname
| –out packet-file-pname
}
hostname:replica-selector ...
mkrep·lica –imp·ort –wor·kdir temp-dir-pname –tag vob-tag
{ –vob vob-stg-pname [ –hos·t hostname –hpa·th host-stg-pname –gpa·th global-stg-pname ]
| –stgloc { stgloc-name | –auto } }
{ –pre·serve | –per·ms_preserve [–nprompt ] | –npr·eserve }
[ –c·omment comment | –cfi·le comment-file-pname | –cq·uery | –cqe·ach | –nc·omment ]
[ –tco·mment tag-comment ] [ –nca·exported ]
[ –reg·ion region-name ] [ –opt·ions mount-options ]
[ –pub·lic [ –pas·sword tag-registry-password ] ] [ –ign·oreprot ]
[ –poo·ltalk ] [ –vre·plica replica-name ]
{ –tap·e raw-device-pname | packet-file-pname [ search-dir-pname ... ] }
Note: The –tape and –ncaexported options are valid only on UNIX.
The creation of a new VOB replica is a three-phase process:
This command also creates a new replica object in the VOB database.
The VOB is locked for the entire length of time the mkreplica –export command runs.
Note: Creating multiple replicas in one mkreplica –export command is more efficient than using multiple mkreplica –export commands.
When a VOB is replicated for the first time, creating a second replica, the VOB’s operation log (oplog) is enabled. All operations to be replicated are recorded in the oplog. Logging of operations continues until all but one of the replicas are deleted. Note that creation of additional replicas is recorded in oplog entries. Existing replicas learn about a new replica through the standard synchronization mechanism. (See the syncreplica reference page.)
Note: Before entering a mkreplica –export command, verify that MultiSite licenses are installed at the original site. After you enable replication in the original VOB, developers cannot access the VOB without a MultiSite license (in addition to a ClearCase license).
When you enter a mkreplica –import command, you must choose the preservation mode. In any case, the user who enters the mkreplica –import command becomes the owner of the new replica. That user’s group is the primary group of the VOB, and the user’s group list becomes the VOB’s group list. Preservation affects only element ownership and permissions. For more information about preservation modes, see Identities and Permissions Strategy for VOB Replicas.
Restrictions:
Note: There are no restrictions on creating permissions-preserving replicas.
To create a replica that preserves identities and permissions, you should run mkreplica –export at an identities- and permissions-preserving replica. To create a replica that preserves permissions, you should run mkreplica –export at an identities- and permissions-preserving replica or a permissions-preserving replica.
Note: After you create a new replica with mkreplica –import –preserve or mkreplica –import –perms_preserve, we recommend that you run syncreplica –export to inform other replicas in the VOB family about the preservation mode of the new replica.
Each invocation of mkreplica –export creates a single logical replica-creation packet. (This is true even if you create several new replicas with one mkreplica command.) Each packet includes one or more replica specifications, each of which indicates the new replica’s name and the host on which a new replica is to be created.
The –maxsize option divides the single logical packet into multiple physical packets to conform to the limitations of the transfer medium.
Replica-creation packets are not deleted after import. After you import a replica-creation packet with mkreplica –import, you must delete the packet.
If the VOB you are replicating is linked to an administrative VOB, mkreplica –export prints a reminder that you must replicate all administrative VOBs in the hierarchy above the VOB you are replicating. The output lists the administrative VOBs. The command does not check whether these administrative VOBs are replicated, so you can ignore the message if you have already replicated them.
Identities: For mkreplica –export, you must have one of the following identities:
Locks: An error occurs if one or more of these objects are locked: VOB.
Mastership: No mastership restrictions.
Other:
Default
None.
–wor·kdir temp-dir-pname
Directory used as a temporary workspace; it is deleted when mkreplica finishes. This directory must not already exist. You must specify a location in a disk partition that has enough free space (at least the size of the VOB database directory plus its source pools; use cleartool space to display VOB disk space use).
Default
When you do not specify –maxsize, the default packet size depends on the shipping method you use:
The mkreplica command fails if it tries to create a packet larger than the size supported by your system or by the tape.
–max·size size
The maximum size for a physical packet, expressed as a number followed by a single letter; for example:
Default
Creates one or more event records, with commenting controlled by the standard ClearCase user profile (default: –cqe). See Event Records and Comments in the multitool reference page. To edit a comment, use cleartool chevent.
–c·omment comment-string | –cfi·le comment-file-pname | –cq·uery | –cqe·ach | –nc·omment
Overrides the default with the specified comment option.
Default
None. You must specify how the replica-creation packet created by mkreplica –export is to be stored and/or transmitted to other sites.
–shi·p
–fsh·ip
Stores the replica-creation packet in one or more files in a store-and-forward storage bay. A separate shipping order file accompanies each physical packet, indicating how and where it is to be delivered.
–fship (force ship) invokes shipping_server to send the replica-creation packet. –ship places the packet in a storage bay. To send the packet, invoke shipping_server or set up invocations of sync_export_list –poll with the schedule command. (See the schedule reference page in the Command Reference.)
Note: The disk partition where the storage bay is located (on the sending host and the receiving host) must have available space equal to or greater than the size of the VOB database and source pools.
–scl·ass class-name
Specifies the storage class of the packet and shipping order. mkreplica looks up the storage class in the MultiSite Control Panel (Windows) or the file ccase-home-dir/config/services/shipping.conf (UNIX) to determine the location of the storage bay to use.
If you omit this option, mkreplica places the packet in the storage bay location specified for the –default class.
–tap·e raw-device-pname (UNIX)
Writes the replica-creation packets to the specified tape device, which must be local to the VOB server host. You are prompted to load a separate tape for each physical packet. Use the –maxsize option to ensure that syncreplica does not exceed the capacity of the tapes you are using. Only one physical packet can be placed on each tape, regardless of packet size.
–out packet-file-pname
The name of the first physical replica-creation packet. Additional packets are placed in files named packet-file-pname_2, packet-file-pname_3, and so on.
The replica-creation packets are not delivered automatically; use an appropriate method to deliver them. You can create a packet using –out, and subsequently deliver it using the store-and-forward facility. See the mkorder reference page.
Default
If a packet cannot be delivered, it is sent through the store-and-forward facility to the administrator at the site of the originating replica. A mail message is sent to the store-and-forward administrator. This occurs after repeated attempts to deliver the packet have all failed and the allotted time has expired; it can also occur when the destination host is unknown or a data file does not exist. The store-and-forward configuration settings specify the expiration period, the e-mail address of the administrator, and the notification program.
–pex·pire date-time
Specifies the time at which the store-and-forward facility stops trying to deliver the packet and generates a failure mail message instead. This option overrides the expiration period specified for the storage class in the shipping.conf file (UNIX) or MultiSite Control Panel (Windows).
The date-time argument can have any of the following formats:
date.time | date | time | now
where:
Specify the time in 24-hour format, relative to the local time zone. If you omit the time, the default value is 00:00:00. If you omit the date, the default value is today. If you omit the century, year, or a specific date, the most recent one is used. Specify UTC if you want the time to be resolved to the same moment in time regardless of time zone. Use the plus (+) or minus (-) operator to specify a positive or negative offset to the UTC time. If you specify UTC without hour or minute offsets, the default setting is Greenwich Mean Time (GMT). (Dates before January 1, 1970 Universal Coordinated Time (UTC) are invalid.)
Examples:
22-November-2002
sunday
yesterday.16:00
8-jun
13:00
today
9-Aug.10:00UTC
–not·ify e-mail-address
The delivery-failure message is sent to the specified e-mail address.
If a failure occurs on a Windows host that does not have e-mail notification enabled, a message appears in the Windows Event Viewer. The message includes the e-mail-address value specified with this option and a note requesting that this user be informed of the status of the operation. For information about enabling e-mail notification, see the MultiSite Control Panel reference page.
Default
None.
hostname:replica-selector...
One or more arguments, each of which indicates one new replica to be created from this packet at another site.
Specify replica-selector in the form [replica:]replica-name[@vob-selector]
Default
None.
–wor·kdir temp-dir-pname
A directory for use by mkreplica as a temporary workspace; it is deleted when mkreplica finishes. This directory must not already exist. Make sure to specify a location in a disk partition that has enough free space. (See the description of –workdir in Options and Arguments — Export Phase .)
Default
Because mkreplica –import executes a cleartool mkvob command, you can use many of the options used with mkvob. The –tag option is required, and one of –vob or –stgloc is required. For more information, see the mkvob reference page in the Command Reference.
–tag vob-tag
The VOB tag (mount point) of the new VOB replica.
–vob vob-stg-pname
Location for the storage directory of the new VOB replica. On Windows, vob-stg-pname must be a UNC name.
–hos·t hostname | –hpa·th host-stg-pname | –gpa·th global-stg-pname
Sets the new VOB replica’s registry information. In most cases, mkreplica derives this information from the vob-storage-pname argument, but if your network topology is unusual or the network interface is not standard, you may have to use these options. If you have to use these options when creating a new VOB at the site, you have to use them when importing a replica-creation packet.
–stgloc { stgloc-name | –auto }
Specifies the name of a storage location for the new replica’s VOB storage directory. stgloc-name must be located on the same host on which you invoke mkreplica, and it must be one of the registered storage locations. To list registered locations, use cleartool lsstgloc. With –auto, mkreplica selects a location automatically.
–c·omment comment | –cfi·le comment-file-pname | –cq·uery | –cqe·ach | –nc·omment
Standard comment options.
–tco·mment tag-comment
A comment string to be included in the VOB tag registry entry for the new replica.
–nca·exported (UNIX)
Marks the new VOB replica for NFS export.
–reg·ion region-name
Specifies a registry region for the new replica’s VOB tag.
–opt·ions mount-options
Mount options for the new replica.
–pub·lic [ –pas·sword tag-registry-password ]
Creates a public VOB tag for the new replica.
Default
During import, if any data containers have a group that is not the primary group of the VOB, a failure occurs when mkreplica tries to set the protection of those containers. The import fails if protection failures occur.
–ign·oreprot
Completes the import even if protection failures occur. mkreplica prints a warning that the protection problems may make the replica unusable. You must run checkvob to find and fix any problems after creating a replica with this option.
Note: Instead of using this option, you can add the nonprimary groups to the group list of the user importing the packet.
Default
None.
–pre·serve
Creates a replica that preserves identities and permissions. The user who enters the mkreplica –import command becomes the owner of the new VOB, and identities and permissions are preserved for all the elements in the new VOB.
–per·ms_preserve [ –nprompt ]
Creates a replica that preserves permissions. The user who enters the mkreplica –import command becomes the owner of the new VOB, and permissions are preserved for all the elements in the new VOB. The –nprompt option suppresses the prompt.
–npr·eserve
Creates a replica that is nonpreserving. The user who enters the mkreplica –import command becomes the owner of the new VOB and of all the elements in the new VOB.
Default
The new replica is created with the same set of storage pools as the originating replica, and the assignments of elements to pools are preserved. The new replica’s storage pools are created within its storage directory, even if some of the originating replica’s pools are remote; the new pools have the default scrubbing parameters.
–poo·ltalk
Prompts you to specify locations and scrubbing specifications for the new replica’s storage pools.
Default
If the replica-creation packet includes one replica specification, you are prompted to confirm the replica name. If the packet includes multiple replica specifications, you are prompted to select one of the replica names.
–vre·plica replica-name
Specifies the replica name, bypassing the prompt step.
Default
None.
–tap·e raw-device-pname (UNIX)
Reads a replica-creation packet from the specified tape device, which must be local to the host on which you enter the mkreplica –import command. Before entering the command, place the tape in the tape drive. If a logical packet spans multiple tapes, you can start with any of them in the drive. You are prompted to switch tapes.
packet-file-pname [ search-dir-pname ... ]
Specifies a pathname of a replica-creation packet. For a logical packet that spans multiple disk files, mkreplica scans the directory containing packet-file-pname for related physical packets.
If you also specify one or more search-dir-pname arguments, mkreplica searches for additional packets in these directories.
In these examples, the lines are broken for readability. You must enter each command on a single physical line.
multitool mkreplica –export –workdir /tmp/ms_workdir –c "make a new replica for sanfran_hub" –out /tmp/sanfran_hub_packet goldengate:sanfran_hub Generating replica creation packet /tmp/sanfran_hub_packet Dumping database... ... Dumper done.
multitool mkreplica –export –c "make a new replica for sanfran_hub" –workdir /tmp/ms_workdir –ship goldengate:sanfran_hub Generating replica creation packet /opt/rational/clearcase/shipping/ms_ship/outgoing/repl_boston_hub_1 8-May-99.15:50:00_1 - shipping order file is /opt/rational/clearcase/shipping/ms_ship/outgoing/sh_o_repl_boston_ hub_18-May-99.15:50:00_1 Dumping database... ... Dumper done.
multitool mkreplica –export –workdir /tmp/ms_workdir –nc –fship ramohalli:bangalore mardelplata:buenosaires Generating replica creation packet /opt/rational/clearcase/shipping/ms_ship/outgoing/repl_boston_hub_1 5-Aug-00.14.26.17_6011_1 - shipping order file is /opt/rational/clearcase/shipping/ms_ship/outgoing/sh_o_repl_boston_ hub_15-Aug-00.14.26.17_6011_1 Dumping database... ... Dumper done. Attempting to forward/deliver generated packets... -- Forwarded/delivered packet /opt/rational/clearcase/shipping/ms_ship/outgoing/repl_boston_hub_1 5-Aug-00.14.26.17_6011_1
multitool mkreplica –import –workdir /tmp/ms_workdir –tag /vobs/dev –vob /net/goldengate/vobstg/dev.vbs –preserve –c "create sanfran_hub replica" /tmp/sanfran_hub_packet The packet can only be used to create replica "sanfran_hub" - VOB family is c3f47cf3.71b111cd.a4f2.00:01:80:31:7a:a7 - replica OID is 0c39c3b8.727b11cd.abb5.00:01:80:31:7a:a7 Should I create this replica? [no] yes Processing packet /tmp/sanfran_hub_packet... Loading database... ... Loader done. Registering VOB mount tag "/vobs/dev"... VOB replica successfully created. Host-local path: goldengate:/vobstg/dev.vbs Global path: /net/goldengate/vobstg/dev.vbs VOB ownership: owner ... group ...
multitool syncreplica –export –c "identities and permissions preserving" –fship boston_hub bangalore buenosaires ...
multitool mkreplica –import –workdir /tmp/ms_workdir –tag /vobs/dev –vob /net/goldengate/vobstg/dev.vbs –perms_preserve –c "create sanfran_hub replica" /tmp/sanfran_hub_packet multitool: Warning: In a permissions-preserving replica, cleartool protect operations will fail on client machines running ClearCase vesions associated with feature level 3 or lower. Should I create a permissions-preserving replica? [no] yes The packet can only be used to create replica "sanfran_hub" - VOB family is c3f47cf3.71b111cd.a4f2.00:01:80:31:7a:a7 - replica OID is 0c39c3b8.727b11cd.abb5.00:01:80:31:7a:a7 Should I create this replica? [no] yes Processing packet /tmp/sanfran_hub_packet... ...
multitool syncreplica –export –c "permissions preserving" –fship boston_hub bangalore buenosaires ...
multitool mkreplica –import –workdir /tmp/ms_workdir –tag /vobs/dev –vob /net/goldengate/vobstg/dev.vbs –npreserve –c "create sanfran_hub replica" –options rw,soft –public –password xxxxxx –vreplica sanfran_hub /tmp/sanfran_hub_packet Processing packet /tmp/sanfran_hub_packet... ... Registering VOB mount tag "/vobs/dev"... VOB replica successfully created. ...
multitool mkreplica –import –workdir c:\tmp\workdir –tag \dev –vob \\ramohalli\vobs\dev.vbs –npreserve –c "create bangalore replica" –pooltalk –vreplica bangalore "c:\Program Files\Rational\ClearCase\var\shipping\ms_ship\incoming\repl_boston_hu b_15-Aug-00.14.26.17_6011_1 Processing packet c:\Program Files\Rational\ClearCase\var\shipping\ms_ship\incoming\repl_boston_ hub_15-Aug-00.14.26.17_6011_1 The initial storage pools that will be used in the replica are: source pool sdft derived pool ddft cleartext pool cdft Configuration for pool "sdft" (source pool): Full pathname of directory to which pool "sdft" should be linked (none = not linked)? [none] <RETURN>
Configuration for pool "ddft" (derived pool): Full pathname of directory to which pool "ddft" should be linked (none = not linked)? [none] <RETURN>
Maximum size (in Kbytes) for the storage directory of pool "ddft" (0 = no maximum)? [0] <RETURN> Space (in Kbytes) to reclaim from pool "ddft" during scrubbing (0 = none)? [0] <RETURN>
Minimum age (in hours) of objects to scrub from pool "ddft" (0 = none)? [0] 12 Command to invoke if scrubbing does not reduce pool "ddft" below maximum size (none = no command)? [none] <RETURN> Comment for pool "ddft" (none = none)? [none] <RETURN> . . . (accept defaults for cleartext pool, cdft)
Max. Reclaim Min. Link To Pool Name Kind Size Size Age Directory --------- ---- ---- ---- --- --------- sdft source pool n/a n/a n/a ddft derived pool 0K 0K 12 cdft cleartext pool 0K 0K 96 Is this the correct configuration for the pools (yes/no/abort)? [no] yes ... Registering VOB mount tag "\dev"... ...
chmaster, chreplica, lspacket, lsreplica, mkorder, MultiSite Control Panel, shipping.conf, syncreplica, mkvob (in the Command Reference)
Troubleshooting MultiSite Operations