Perforce Public Knowledge Base - Splitting a Single Server into Two Servers
Reset Search
 

 

Article

Splitting a Single Server into Two Servers

« Go Back

Information

 
Problem

This article describes how to take a single Perforce server and split a portion of that server into its own unique server instance.

Solution

There are times when it is necessary to take a portion of a server (a branch or depot) and move or copy it so that some data is on its own server instance, retaining this data's file history, integration records, changelist data, user data, and so on.

Use the supported tool Perfsplit++ to extract the portion of the server you need. The process is:

  1. Create a second, duplicate Perforce server from the latest checkpoint and archive file backup, using the instructions provided in the Backup and Recovery chapter of the Perforce System Administrator's Guide.

    Note: A duplicate Perforce license file may be required for this task. Please use the duplicate license request form, or contact sales@perforce.com to request a duplicate server license.

  2. On the duplicate server, extract the data and versioned files for the desired depot paths to a new directory using Perfsplit++. See the Perfsplit++ documentation for details and available options.

  3. On the original server, obliterate everything you do not want to keep there. For example, if you have two depots, //foo and //bar, and you want to keep the contents of //bar, then you will obliterate //foo:

    p4 obliterate //foo/...
    

    Note: Perforce strongly recommends taking a checkpoint and backing up the versioned file tree archive on the original Perforce server before performing any obliterates.

    Note: Always run the p4 obliterate command in a preview mode first to confirm the command will remove only the intended files. Add the -y flag to confirm the removal of the files and database records from Perforce.

    Note: The obliterate might be more complicated when selectively obliterating multiple embedded directories. In that case, the temporary client trick described in the Tuning Perforce for Performance chapter of the Perforce System Administrator's Guide may be useful.

  4. Move the extracted server to its new location and reorganise the depot, database, journal and log file locations for best performance on the new server (see Planning Your Perforce Server Installation).

Alternative Method

The Perfsplit++ tool is only available for Perforce server version 2014.2 or later. To split a pre-2014.2 Perforce server while retaining its metadata, do the following:

  1. Create a second, duplicate Perforce server from the latest checkpoint and archive file backup as described above.

  2. On the duplicate server, obliterate everything you do not want. Always run the p4 obliterate command in a preview mode first to confirm the command will remove the intended files. As with step 3 above, the temporary client technique can be used to simplify more complex obliteration operations.

  3. On the original server obliterate the material now stored on the new Perforce server.

Note: Due to the risk of data loss, Perforce strongly recommends taking a checkpoint and backing up the versioned file archive on the original Perforce server before performing any obliterates.

Please contact Technical Support if you have any questions.

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255