Sunday 7 November 2010

Switching the Perforce server from case insensitive mode (-C1) to case sensitive mode

How do I switch a Unix Perforce Server running in case insensitive mode (-C1) to case sensitive mode?

Switching a Unix Perforce Server running in case insensitive mode (-C1) to case sensitive mode is similar to migrating a Perforce server from the Windows platform (case insensitive server) to the Unix platform.

Verify the archive files.

To confirm that you do not have any missing or corrupted archive files prior to updating the server, run the following command: p4 verify -q //... > verify.errorsIf you encounter any errors, please contact Perforce support for assistance. Stop the server.

Run p4 admin stop to shut down the Perforce Server.

Take a checkpoint.

Run the following command on the server to take a checkpoint: p4d -r P4ROOT -C1 -jcIt is important to specify the correct path to the Perforce server's root directory (P4ROOT). For more information on how to take a checkpoint, consult the Perforce System Administrator's Guide. Backup the checkpoint and depot subdirectories.

The following steps permanently modify the metadata and archive files. Therefore it is critical that you backup the server's checkpoint and all of its depot subdirectories before proceeding.

Resolve case-related problems.

Inconsistent use of case is fine on a case-insensitive platform; it results in serious issues on a case-sensitive one. Conversely, filenames that differ only by case are allowed on case-sensitive platforms, but collide and cause corruption and data loss in case-insensitive environments. A Perforce tool called p4migrate can help you to find and resolve any case-related problems in your repository. You can download p4migrate from our ftp site:


Select the folder that corresponds with the platform of your original Perforce server.

You will also need to download the current p4migrate documentation


Move existing database.
Move the database files (db.*) to a temporary location that can be deleted when the Perforce server has been successfully switched to the case sensitive mode. Restore from checkpoint .

Run the following command to recreate the database (db.*) files from the server's checkpoint free of case-inconsistencies and conflicts: p4d -r P4ROOT -jr checkpoint.nFor more information on how to restore from a checkpoint, consult the Perforce System Administrator's Guide.

Re-verify the archive files.

Run p4 verify to check that depot filenames are still consistent with the restored database: p4 verify -q //... > verify.errorsIf you encounter any errors contact Perforce support for assistance. Update the script starting the Perforce server.
Remove from your Perforce server startup script any occurrence of the "-C1" flag associated with the "p4d" command. Restart the Perforce server.

You can now restart the Perforce server using your Perforce server startup script.


View the original article here

No comments:

Post a Comment