p4 serverid

Get or set the unique ID associated with a Helix Server.

Syntax

p4 [g-opts] serverid [serverID]

Description

Important

We recommend that you use p4 serverid instead of P4NAME.

Unless a P4NAME value has been specified for the server, the server uses the serverid to determine the appropriate configuration settings. See p4 configure.

Important

To avoid configuration problems, the value of serverID should always match the value of P4NAME if both are set. We recommend setting serverID, but support P4NAME for backward compatibility.

p4 serverid retrieves or sets the unique ID of a Helix Server by reading or writing the server.id file in the server’s root directory.

When you configure servers in a multi-server installation, assign to each server its own serverid and specify the server configuration for that serverid.

Use this command to create or update the server.id file after first generating a unique ID for the server with the p4 server command.

Important

The server.id file is in the server’s root directory, and this file must be backed up. If you are using the p4 server command to configure your servers, and one of your servers suffers a catastrophic data loss, any attempt to restart the restored server requires that the server.id file be present (or be re-created).

To reset the serverid

Before you can reset the value of the server's ID, you need to stop the shared service and remove the existing server.id file.

p4 admin stop
cd your/server/root/directory
rm server.id
./startperforce
p4 serverid yourNewNameForTheServer

Options

serverID

If supplied, update server.id with the unique ID of the server.

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

list, or
super to set the server ID

Related Commands

To edit or view a server specification

p4 server

To list all known servers

p4 servers