Replication commands and configurables
Replication of P4 Servers depends upon these commands, environment variables, and configurables:
| Command or Feature | Typical use case | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
A command that can replicate both metadata and versioned files, and report diagnostic information about pending content transfers. A replica server can run multiple To replicate both
metadata and file contents, run two
|
|||||||||||
|
A configuration mechanism that supports multiple servers. Because |
|||||||||||
|
A configuration mechanism that defines a server in terms of its
offered services. To be effective, the
|
|||||||||||
|
A command to set or display the unique identifier for a
P4 Server. On
startup, a server takes its ID from the contents of a
|
|||||||||||
|
|
Causes the replica to schedule a transfer of the contents of any damaged or missing revisions. The command reports For the transfer to work on a replica with
You can also run the p4 verify -S -t command on a replica to request re-transfer of a shelved archive that is missing or bad. Re-transferring a shelved archive from the target server only works if the shelved archive is on the target server because:
|
||||||||||
|
Server names
|
P4 Servers can be identified and configured by using a serverID. When you use p4 server or p4 configure on the target server, you can specify different sets of configurables for each
named server. Each named server, upon startup, reads the |
||||||||||
|
Service users |
A type of user intended for authentication of server-to-server communications. Service users have extremely limited access to the depot and do not consume P4 Server licenses. To make logs easier to read, create one service user on the target server for each replica or proxy in your network of P4 Servers . |
||||||||||
|
Metadata access |
Replica servers can be configured to automatically reject user
commands that attempt to modify metadata ( In |
||||||||||
|
Metadata filtering |
Replica servers can be configured to filter in (or out) data on client workspaces and file revisions.
|
||||||||||
|
Depot file access |
Replica servers can be configured to automatically reject user commands that attempt to modify archived depot files.
|
||||||||||
|
Target server |
As with the P4 Proxy, you can use P4TARGET to specify the target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'. or another replica server to which a replica server points when retrieving its data. You can set A replica server with Alternatively, use the equivalent configurables:
|
||||||||||
|
Startup commands
|
Use the |
||||||||||
|
State file |
Replica servers track the most recent journal position in a small text file that holds a byte offset. When you stop either the target server or a replica server, the most recent journal position is recorded on the replica in the state file. Upon restart, the replica reads the state file and picks up where it left off. Do not alter this file or its contents. (When the state file is written, a temporary file is used and moved into place, which should preserve the existing state file if something goes wrong when updating it. If the state file is empty or missing, the replica server will re-fetch from the start of its last used journal position.) By default, the state file is named |
||||||||||
|
P4 Broker |
The P4 Broker can be used for load balancing, command redirection, and more. See P4 Broker for details. |
p4d -jc -z command breaks replication. Instead, use the
-Z flag instead to prevent journals from being
compressed.