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 |
Tracks the metadata pull thread position in the upstream journal stream, including the journal number and byte offset. The replica records this position in the state file and uses it to resume replication after a restart. The By default, the file is named The state file does not need to be included in checkpoint-based backups. The server manages this file automatically. Do not modify or edit the state file manually unless a recovery procedure explicitly instructs you to do so. When updating the state file, the server writes to a temporary file and then moves it into place to preserve the existing file if an error occurs. If the state file is missing, empty, or becomes corrupt:
The server creates a new state file during startup and resumes replication from a safe point in the most recent journal. As a result, some journal records might be processed more than once. |
||||||||||
|
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.