ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Perforce - Moving Server Components on the Same Machine
    프로그래밍/프로그래밍 관련 2011. 8. 19. 11:20

    Moving Server Components on the Same Machine

    Changing the Perforce server root, depot, executable, journal and log paths


     

    TASK

    How can I move various components of the Perforce Server to different disks or directories on the same machine?


     

    SOLUTION

    Moving the P4ROOT Location

    The server root is defaulted to the p4d executable file's directory. You change the server root with the -r option or the P4ROOT environment variable when the server is restarted.

    If the server is started as a Windows Service, you can change the server root by using p4 set, for example:

    p4 set -S "Perforce" P4ROOT=directory
    

    Note: The default svcname is "Perforce". If you are running multiple Perforce service instances, you will need to specify P4ROOT for each instance separately.

    Moving the Depot Location

    By default, new Depot directories are created relative to the Perforce server root directory (P4ROOT). You can change the depot location by changing the "Map:" field of the depot specification with the following command:

    p4 depot <depot_name>
    

    The "Map:" field is relative to the server root (P4ROOT) setting for your server. To store a depot on another drive, please specify an absolute path in the "Map:" field.

    For detailed steps on how to move the depot location safely, see the following:

    KB Article #459: Having the Depot on Windows Network Drive

    KB Article #960: Moving depot files to a different location

    Moving Journal File Location 

    The live journal defaults to "journal" in the Perforce server root directory (P4ROOT). You can change its name and path with the -J option or the P4JOURNAL environment variable when the server is restarted. If a relative path is provided, it should be relative to the server root.

    Note: Shutdown the server to copy the journal file to its new location before modifying the journal file location.

    Example:

    p4 admin stop
    
    copy P4ROOT\journal  D:\JOURNAL\perforce_journal
    
    p4d -r P4ROOT -J D:\JOURNAL\perforce_journal
    
    del P4ROOT\journal
    

    Moving Log File Location

    The server log is defaulted to the standard error. You can change its name and path with the -Loption or the P4LOG environment variable when the server is restarted.

    Example:

    p4 admin stop
    
    p4 set -S perforce P4LOG=D:\LOG\perforce_log
    
    net start perforce

    Moving p4d/p4s executable Location

    In general, the Perforce Server executable is located in a directory that can be found by your operating system's search path. For example, it can be located in "/usr/local/bin" on UNIX, or the default "C:\Program Files\Perforce\Server\" on Windows. You can move the p4d executable to its new location, and then make sure that it can be located by your startup script or command.

    The Perforce Server on Windows is usually started as a Windows Service, and the path to the p4s.exe executable is set in the registry. The easiest way to change this is by running the installer to move the Perforce Service executable's location.

    댓글