p4 server

Synopsis

Create, modify, or delete a Perforce server specification.

Syntax


p4 [g-opts] server serverID
p4 [g-opts] server -g
p4 [g-opts] server -d serverID
p4 [g-opts] server -o serverID
p4 [g-opts] server -i

Description

A server specification describes the high-level configuration and intended usage of a Perforce server. For installations with only one Perforce server, the server specification is optional.

The ClientDataFilter:, RevisionDataFilter:, and ArchiveDataFilter: fields are intended for use in replicated environments where you wish to filter out unnecessary data. (For instance, a build farm replica has little need to replicate the state, including the have list, for every open client workspace on the master server.) For further information about filtering in replicated environments, see Perforce Server Administrator's Guide: Multi-site Deployment.

An operator type user may not execute this command.

Form Fields

Field Name

Type

Description

ServerID:

Read-only

A unique identifier for this server. This must match the contents of the server's server.id file as defined by the p4 serverid command.

Type:

Writable

Server executable type. One of:

  • server

  • proxy

  • broker

Services:

Writable

Services provided by this server. One of:

  • standard (a standard Perforce server)

  • replica (a read-only replica server)

  • broker (a p4broker process)

  • proxy (a p4p caching proxy)

  • commit-server (a central server in a distributed installation)

  • edge-server (a node in a distributed installation)

  • forwarding-replica (a replica that has been configured to forward commands that involve database writes to a master server)

  • build-server (a replica that supports build automation)

  • P4AUTH (a server that provides authentication)

  • P4CHANGE (a server that provides change numbering)

Name:

Writable

The P4NAME associated with this server.

Address:

Writable

The P4PORT used by this server.

ExternalAddress:

Writable

Optional field specifies the external address used for connections to a commit server. This field must be set for the edge server to enable parallel submits in a federated environment.

Description:

Writable

An optional description for this server.

User:

Writable

The service user that is used by the server. For additional information about the use of this field, see the section "Service users" in the chapter "Perforce Replication" in Perforce Server Administrator's Guide: Multi-site Deployment.

ClientDataFilter:

Writable

For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.

To include client data, use the syntax:

//client-pattern/...

To exclude client data, use the syntax:

-//client-pattern/...

All patterns are specified in client syntax.

RevisionDataFilter:

Writable

For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.

To include depot data, use the syntax:

//depot/pattern/...

To exclude depot data, use the syntax:

-//depot/pattern/...

All patterns are specified in depot syntax.

ArchiveDataFilter:

Writable

For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files will not be transferred until they are referenced by a replica command which needs the file content.

Files specified in ArchiveDataFilter: field are transferred to the replica regardless of whether any users of the replica have made requests for their content.

To automatically transfer files on submit, use the syntax:

//depot/pattern/...

To exclude files from automatic transfer, use the syntax:

-//depot/pattern/...

All patterns are specified in depot syntax.

Options

-d serverID

Delete the named server specification.

-g

Generate a new serverID as part of the form.

-i

Read a server specification from standard input.

-o

Write the named server specification to standard output.

g-opts

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

see discussion below

Only super can run p4 server in update mode (using -i, -g, and -d options). Non-operators can run p4 server in non-update mode (using -o or -o -goptions). Operators cannot run p4 server at all.

Related Commands

To change a server's ID after creation

p4 serverid

To list all known servers

p4 servers