Create and start the edge servers

Now that the commit server configuration is complete, we can seed the edge server from a commit server checkpoint and complete a few more steps to create it.

  1. Take a checkpoint of the commit server, and use -K to filter out the database content not needed by an edge server. (The -z flag creates a zipped checkpoint.)

    $ p4d -r /chicago/p4root -K <LIST OF TABLES> -z -jd edge.ckp
    

    using the appropriate string for the <LIST OF TABLES>

    Release

    <LIST OF TABLES>

    2020.2 - 2021.2 "db.have,db.working,db.locks,db.resolve,db.revsh,db.workingx,db.resolvex,db.stash,db.haveg,db.workingg,db.locksg,db.resolveg,db.storagesh,db.storagesx"
    2019.1 - 2020.1 "db.have,db.working,db.locks,db.resolve,db.revsh,db.workingx,db.resolvex,db.stash,db.haveg,db.workingg,db.locksg,db.resolveg,db.storagesh"
    2018.2 "db.have,db.working,db.locks,db.resolve,db.revsh,db.workingx,db.resolvex,db.stash,db.haveg,db.workingg,db.locksg,db.resolveg"
    2015.1 - 2018.1 "db.have,db.working,db.locks,db.resolve,db.revsh,db.workingx,db.resolvex,db.stash"
    2013.2 - 2014.2 "db.have,db.working,db.locks,db.resolve,db.revsh,db.workingx,db.resolvex"
  2. Recover the zipped checkpoint into the edge server P4ROOT directory.

    $ p4d -r /tokyo/p4root -z -jr edge.ckp.gz
  3. Set the server ID for the newly seeded edge server:

    $ p4d -r /tokyo/p4root -xD tokyo_edge
  4. To enable the tokyo edge service user to connect to the chicago commit server, create a login ticket for the svc_tokyo_edge service user in the P4TICKETS file configured for the tokyo edge server. If the commit server uses SSL, trust must first be established:

    $ p4 -E P4TRUST=/tokyo/p4root/.p4trust -u svc_tokyo_edge -p ssl:chicago.perforce.com:1666 trust

    before creating the service user login ticket and explicitly indentifying this P4TRUST file:

    $ $ p4 -E P4TRUST=/tokyo/p4root/.p4trust -E P4TICKETS=/tokyo/p4root/.p4tickets -u svc_tokyo_edge -p ssl:chicago.perforce.com:1666 login
  5. Copy the versioned files from the commit server to the edge server. Files and directories can be moved using rsync, tar, ftp, a network copy, or any other method that preserves the files as they were on the original server.

    For Linux:

    Run rsync (or the equivalent):

    cd /chicago/p4root rsync -avz ./depot [email protected]:/tokyo/p4root

    where

    • /chicago/p4root is the commit server root
    • ./depot is one of the directories to be copied on the original server
    • [email protected] is the user and hostname of the new edge server
    • /tokyo/p4root is the Helix Server root directory on the new edge server

    Copy over all the versioned file directories.

    For Windows:

    Run xcopy (or the equivalent):

    cd <Perforce original root>

    cd depot

    xcopy *.* S:\perforce /s /d /c /e /i /h /y

    where

    S:\perforce is the network drive that contains the corresponding directory on the new server.

    Copy over all the versioned file directories.

    Note

    For Linux and Windows:

    • It is possible to copy most of the files before the server move, then update the versioned files later. To update the versioned files, run the same rsync command. The rsync flags used by this command will only transfer files updated since the command was last run.
    • If you do not know where the versioned files are located, run the command: p4 depots. For each depot listed, run the command: p4 depot -o depot and look at the Map: field for the depot versioned files location.
  6. Start the edge server using syntax appropriate for your platform.

    For example:

    $ p4d -r /tokyo/p4root -d

    See the installation/upgrading instructions for Starting the Helix Server and Starting and stopping the Perforce service in Upgrading the server.

  7. Check the status of replication by running the following command against the edge server.

    $ p4 pull -lj
  8. At the commit server host machine, to enable the chicago commit service user to connect to the tokyo edge server, create a login ticket for the svc_chicago_commit service user in the P4TICKETS file configured for the chicago commit server. This is required for some parallel operations initiated on the edge server, such as submitting or shelving file revisions.

    If the edge server uses SSL, trust must be established:

    $ p4 -E P4TRUST=/chicago/p4root/.p4trust -u svc_chicago_commit -p ssl:tokyo.perforce.com:1666 trust

    before creating the service user login ticket:

    $ p4 -E P4TICKETS=/chicago/p4root/.p4tickets -u svc_chicago_commit -p ssl:tokyo.perforce.com:1666 login
    Note