Updating P4 Server

This page explains how to update an existing P4 Server installation on Linux when the server was installed using OS package managers:

  • Ubuntu (apt)

  • CentOS / Red Hat Enterprise Linux (RHEL) (yum or dnf)

  • SUSE Linux Enterprise Server (SLES) (zypper)

To complete the update:

  • Check if an update is available.

  • Preparing your P4 Server for an upgrade.

  • Update the P4 Server.

  • Verifying the new server version.

Before you update

Updating P4 Server using Linux packages is not the same as running a general OS update.

The package manager only updates the P4 Server binaries. You are responsible for:

  • Stopping the server

  • Taking a checkpoint (database backup)

  • Verifying database compatibility

Updating packages without completing these steps can leave the server unable to start or operating in an unsafe state. To learn more, see Upgrade the server.

Check whether an update is available

To check if an update for your P4 Server is available, run one of the following:

  • For Ubuntu:

    sudo apt-get update
    apt-cache madison helix-p4d
  • For CentOS/RHEL:

    yum --showduplicates list helix-p4d
  • For SUSE Linux Enterprise Server:

    sudo zypper search -s helix-p4d

If a newer version of P4 Server is available, it is listed in the terminal.

Prepare the server for upgrade

You will need to stop your P4 Server before upgrading it.

  1. To get a list of the service names of your P4 Server, enter:

    sudo -u perforce p4dctl list
  2. To check if your P4 Server is running, enter:

    sudo -u perforce p4dctl status <service-name>
  3. To stop your P4 Server is running, enter:

    sudo -u perforce p4dctl stop <service-name>
  4. Expected output:

    Stopped 1 services

Take a checkpoint

Before upgrading, take a checkpoint of the P4 Server database.

  1. To take a checkpoint, enter:

    sudo -u perforce p4dctl checkpoint <service-name>

Upgrade the P4 Server

Use one of the following based on your Linux distribution:

  • For Ubuntu:

    sudo apt install helix-p4d
  • For CentOS/RHEL:

    sudo yum install helix-p4d
  • For SUSE Linux Enterprise Server:

    sudo zypper install helix-p4d

Verify database compatibility

After the package install completes:

  • If you see instructions telling you to upgrade the database, follow them exactly.

  • If no database-upgrade instructions are shown, the existing database is already compatible with the new server version.

The latest P4 Server packages often detect database compatibility automatically.

Do not start your P4 Server until you are certain database compatibility has been addressed.

Start the server

  1. To start up your P4 Server, enter:

    sudo -u perforce p4dctl start <service-name>
  2. To check P4 Server is running, enter:

    sudo -u perforce p4dctl status
  3. Expected output:

    <service-name> running

Check the new server version

  1. To check that the server is running the upgraded version, enter:

    p4 -p localhost:1666 info
  2. In the output, check the line Server version.