Previous Table of Contents Index Next
Perforce 2012.1: Command Reference

p4 replicate
Poll for journal changes on one Perforce Server for forwarding to another Perforce Server.
p4 replicate [-j token] [-s statefile] [-i interval] [-k -x -R] [-J prefix] [-T tables] [-o output] [command]
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.
-j token
Specify a journal number or position token of the form journalnum/byteoffset from which to start replicating metadata. If this flag is specified, it overrides any state file specification.
-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.
-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 prefix
-T tables
Supply a list of database tables (for example, db.have) to exclude from export.
Keep the pipe to the command subprocess open between polling intervals.
Exit the p4 replicate command when journal rotation is detected.
The -R flag 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.
-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.
Usage Notes
Can File Arguments Use
Revision Specifier?
Use p4 replicate in situations where you need to replicate server metadata (but not archived files), or when you need to perform filtering operations on server metadata. In most situations, server replication with p4 pull is preferable to p4 replicate.
For more information, see the System Administrator's Guide and the following Perforce Knowledge Base article:
Related Commands

Previous Table of Contents Index Next

Perforce 2012.1: Command Reference
Copyright 1999-2012 Perforce Software.