p4 journalcopy

Copies journal data from a master server to the local file system of a standby replica.


p4 [g-opts] journalcopy -l
p4 [g-opts] journalcopy -i N [-b wait] 

Syntax conventions


The p4 journalcopy command has two syntax variants:

  • To get a report of the current copy position from the master’s journal to the replica’s journalcopy, use p4 journalcopy -l

    where the output of the p4 journalcopy -l command includes the sequence number, which indicates the byte offset position in the journal that the journalcopy has reached:

Current replica persisted journal state is: Journal 2, Sequence 6510347

  • To copy journal data (the journalcopy) to the local file system of a standby replica, use p4 journalcopy -i N with or without the -b option.

An operator or superuser can confirm the state of a replica by running the p4 journalcopy -l, p4 pull -l -j, and p4 pull -l -s commands.


-b wait

Wait the specified number of seconds before retrying the p4 journalcopy command after a failed attempt.

Setting this option overrides the default value of 60 seconds. For example, to set the value of the startup.N configurable so that the wait time is 30 seconds:

$ p4 -p depot_master_p4port configure set standby#startup.1="journalcopy -i 0 -b 30"

-i N

Repeat the p4 journalcopy command every N seconds.

  • If you do not use this option, the command runs once.
  • If you set N to 0, the command runs as frequently as possible rather than sleeping between runs. This is useful for a high availability (HA) standby server.


Report the current position in the copied journal.


See Global options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required



  • super


p4 journalcopy -l

Show information about the current copy position from the master’s journal to the replica’s journal.

Related Commands

To make a copy of the master’s versioned files.

p4 pull -u

To retrieve the journal records from the journalcopy files created by the p4 journalcopy and to apply these to the standby’s database

p4 pull -L

To get information about replication status from the point of view of the master server, use the -J option of the p4 servers command.

p4 servers

To fail over to a new master server p4 failover