p4 replicate

Synopsis

Poll for journal changes on one Perforce server for forwarding to another Perforce server.

Syntax


p4 replicate [-j token] [-s statefile] [-i interval] [-k -x -R] [-J prefix]
             [-T tables] [-o output] [command]

Description

This command polls for new journal entries from a Perforce server, and either outputs them to standard output, or, if a command is specified, pipe the journal records to the command, which is spawned as a subprocess.

Options

-i interval

Specify a polling interval, in seconds. The default is two seconds. To disable polling (that is, to check once for updated journal entries and then exit), specify an interval of 0.

-j token

Specify a journal number or position token of the form journalnum/byteoffset from which to start replicating metadata. If this option is specified, it overrides any state file specification.

-J prefix

Specifies a filename prefix for the journal, such as that used with p4d -jc prefix

-k

Keep the pipe to the command subprocess open between polling intervals.

-o savefile

Specify a file for output. If a command subprocess is specified, both the subprocess and the specified savefile are provided with the output.

-R

The -R option causes p4 replicate to attempt reconnection to the server in the event of connection loss or serious error. A polling interval must be specified with -i interval.

-s statefile

Specify a state file which tracks the most recent journal position. You can also use the statefile configurable to specify the state file.

-T tables

Supply a list of database tables (for example, db.have) to exclude from export.

-x

Exit the p4 replicate command when journal rotation is detected.

g-opts

See “Global Options”.

Usage Notes

Can File Arguments Use Revision Specifier?

Can File Arguments Use Revision Range?

Minimal Access Level Required

N/A

N/A

super

Related Commands

To update file content as well as journal records

p4 pull

To display journal or checkpoint records in raw form

p4 export