Moving clients and labels
To move clients and labels between servers in a commit/edge environment, use the p4 unload and p4 reload commands.
Client Examples
The general form of the command to move a client between servers is:
p4 reload -c client -p P4PORT
p4 reload -c client -p serverID
where:
- P4PORT or
serverID
specifies the server the client will be moved from - the server the p4 reload command is directed at specifies the server the client is moved to
- If a
serverID
is specified, the server spec for that server must contain the correctP4PORT
value in itsAddress
field
The process is a single step with more recent versions of Helix Core server:
2014.2 and later | 2014.1 and earlier |
---|---|
The p4 reload commands above implicitly run the p4 unload command against the server the client is being moved from before processing the reload. |
|
User bruno
moves client projectX_dev
from a remote Edge Server to his local Edge Server:
p4 -p edge_local:1666 reload -c projectX_dev -p edge_remote:1666 Client projectX_dev unloaded. Client projectX_dev reloaded.
Helix Core Administrator admin
moves client bruno_dev
from the Commit Server to an Edge Server:
p4 -p edge:1666 reload -f -c bruno_dev -p commit:1666 Client bruno_dev unloaded. Client bruno_dev reloaded.
where the -f
option for p4 reload
is required for administrators to work with clients they don't own.
Helix Core Administrator admin
moves client bruno_dev
from the Edge Server to the Commit Server:
p4 -p commit:1666 reload -f -c bruno_dev -p edge:1666 Client bruno_dev unloaded. Client bruno_dev reloaded.
where:
- the
-f
option forp4 reload
is required for administrators to work with clients they don't own - The Commit Server must have a configured service user
-
The service user must be logged in from the commit to the edge
Otherwise the following error will occur:
p4 -p commit:1666 reload -f -c bruno_dev -p edge:1666
Client bruno_dev unloaded.
Access for user 'remote' has not been enabled by 'p4 protect'.
Label Examples
For labels, both p4 unload
and p4 reload
are required.
User bruno
moves global label bruno_hotFix
from the Commit Server to an Edge Server.
p4 -p commit:1666 unload -l bruno_hotFix Label bruno_hotFix unloaded. p4 -p edge:1666 reload -l bruno_hotFix -p commit:1666 Label bruno_hotFix reloaded.
Helix Core Administrator admin
moves global label
from the Commit Server to an Edge Server:bruno_hotFix
p4 -u admin -p commit:1666 unload -f -l bruno_hotFix Label bruno_hotFix unloaded. p4 -u admin -pedge:1666
reload -f -l bruno_hotFix -pcommit:1666
Label bruno_hotFix reloaded.
where the -f
option for p4 reload
is required for administrators to work with clients they don't own.