Copies journal data from a master server to the local file system of a standby replica. The copy is identical, byte-for-byte, to the original.
Displays information about the current copy position.
p4 [g-opts] journalcopy -l
p4 [g-opts] journalcopy [-i n] [-b wait]
The p4 journalcopy
provides two syntax variants:
An operator may run the p4 journalcopy -l,
p4 pull -l -j,
and p4 pull -l -s
commands. This makes it possible for an operator to confirm the state of
a replica.
The output of the p4 journalcopy -l
command is shown
below. The sequence number indicates the offset position in the journal
that the copy has reached.
Current replica persisted journal state is: Journal 2, Sequence 6510347
You can compare this offset with the output for the p4 pull
-l
command for the replica. The latter indicates the
offset position in the journal that has been written to the database.
In order for a standby replica to take over for the master server, it must have a copy of the master server’s metadata and access to versioned files. To do this, you must run the following commands:
p4 journalcopy
command to copy the master’s
journal file to the local file system of the standby replica. This
command does not apply the copied journal records to the replica’s
database.p4 pull -L
command to retrieve the journal
records from journal files created by the p4
journalcopy
and to apply these to the replica’s
database.The combination of the p4 journalcopy
command and
the p4 pull -L
command accomplish the same result as
using the p4 pull
command,
with the following differences:
Copied files are physically identical to the master’s journal, not just logically equivalent.
Having an identical copy of the journal files is useful for failover because other servers in your installation, which will have stored physical byte offsets into the master journal files in their state files, do not have to adjust those offset positions during failover; they just switch their target to the new master and continue replicating from it.
p4 pull
command.p4
journalcopy
and the p4 pull -L
commands.The p4 journalcopy
command runs very quickly, so
journal records can be transferred from the master server to the standby
replica with very little lag and with very little overhead on the master
server.
By default when p4 journalcopy
detects an error with
its connection to the master, it sleeps for one second and then attempts
to reconnect and resume transferring journal records. You can set the
default value when it sets a p4 journalcopy
startup
thread like this:
$ p4 -p depot_master_p4port configure set standby#startup.1 = journalcopy -i 0 -b 1+
|
Wait the specified number of seconds to retry the |
|
Repeat the If you set |
|
Report on the current position in the copied journal. |
|
See Global Options. |
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
NA |
NA |
|
|
Show information about the current copy position from the master’s journal to the replica’s journal. |
To make a copy of the master’s versioned files. |
|
To get information about replication status from the point of
view of the master server, use the |