p4 failover
Fail over to a standby server.
Syntax
p4 failover [-y] [ -m | [-i] -s serverID ] [-w waitForQuiesce] [-v verificationTime] [failoverMessage]
Description
Allows the administrator of a standby server to initiate the process of failing over from the current target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'. to its standby server. In this context, the target server is the server from which the standby server makes its journalcopy (see p4 journalcopy).
The target server can also be an edge server or distribution server. The standby server can be either a standby server or forwarding-standby server.
Failing over to a "mandatory" (see p4 server Options:) standby when the target server is not part of the failover process ensures that none of the downstream replicas will be ahead of the new target server.
-
For the local High Availability standby server, we recommend
mandatory, but only after journalcopying is complete. -
For the remote Disaster Recovery standby server, we recommend
nomandatory
To learn more, see the Failover topic in the Backup and recovery chapter of P4 Server Administration Documentation.
| 2020.2 and later |
Prior to 2020.2 |
|---|---|
|
Failover from a mandatory standby server when the target server is not participating includes checking the |
Failover from a mandatory standby server when the target server is not participating used to require specifying |
|
Part of the failover process involves stopping the journalcopy and pull threads. If the failover process fails, any |
If the failover process fails, the journalcopy and pull threads needed to be restarted manually. |
Options
| Option | Description |
|---|---|
|
|
Perform the failover operation. Without this option,
Carefully consider the report of what failover would do BEFORE you include the |
|
|
Specifies the verificationTime as a number of seconds prior to the launch of the failover command. The default value of |
|
|
The waiting period in seconds for commands in the target server to complete. At the end of this quiesceWait period, all user commands, regardless of their activity, will be stalled. If You can set the waiting period to any integer value between To cancel the failover during the |
|
|
Ignore the original target server, even if it is accessible. This option and the Using the |
|
|
The target server is required to participate in failover, which excludes the |
|
|
If the existing target server participates in failover, the new target server automatically gets the Prior to 2020.2, if the standby server could not access the target server, this option was necessary to specify the For 2020.2 and later, if the standby server cannot access the target server, there is automatic checking the |
|
failoverMessage |
If the target server participates in the failover operation, failoverMessage is the text to display to end-users during the failover operation when end-users attempt to start new commands on the target server. The default message is:
The failoverMessage must be the final argument specified in the
and quotation marks are not required. |
|
|
See Global options |
Usage notes
|
Can file arguments use revision specifier? |
Can file arguments use revision range? |
Minimal access level required |
|---|---|---|
|
N/A |
N/A |
|
Related commands
|
To copy journal data from a target server to the local file system of a standby replica |
|
|
To copy the file content of the files that have been added or updated (according to the replicated journal data) |
|
|
To retrieve the journal
records from the journalcopy files created by the |
|
|
To reestablish the relationship between the commit server and the standby server to what it was prior to failover |