When a repository is deleted, Plastic SCM only removes it from the list of known repositories. The repository is never physically deleted to let you undo the operation (if desired). But, what if you really want to remove it? Read on to find out how.
Finding the repository directory
Jet is a filesystem backend; all the repositories are stored inside the Jet storage path. The default locations are:
- Linux: /var/lib/plasticscm/jet/
- Windows: C:\Program Files\PlasticSCM5\server\jet
If you use a custom path, check the location stored inside the Plastic SCM server "jet.conf" configuration file:
basepath=C:\plasticdbs
prefix=
suffix=
maxcachedtrees=50
datafilesize=4
See below for for an example of what the Jet base path looks like:
The repositories directories are named with the "rep_" prefix followed by the repository ID. To find the repository directory that needs to be removed, you have to know first the repository ID.
How to get the repository ID?
If the repository is not deleted from Plastic SCM, use the "cm lrep" command to find the repository ID.
Run the "cm lrep" command with the following formatting parameters: --format="id:{0}, name={1}". The formatting parameters allow you to get extra information from the objects you query. In this case, "{0}" gets the repository ID and "{1}" the repository name.
cm lrep --format="id:{0}, name={1}"
Use the command output to search for the repository name you are about to delete; the repository ID will be before the repository name.
If the repository was already deleted, you can obtain the repository ID from the Plastic SCM audit log. Search inside the log file for the "Repository deleted: LIDAR_ART" string, where in this case, "LIDAR_ART" is the name of the deleted repository. The repository ID, in brackets, follows the repository name.
Kh9Om5638mXbI6eCqLbStgxbHXyqnUWvrq1KI3bNeR8= manu (BABIECA) 2/22/2019 4:57:34 PM [LIDAR]: Changeset '100' deleted
hjPFyQkfiCKkVM5J4rcmf8ztg29/AzndNRxbAuSOi7U= manu (BABIECA) 2/27/2019 10:06:51 AM []: Repository deleted: TerrainGeography (539)
0/Uee45GgiCTaUGCAA+KqR6ZKoPZNx95t14ygP7IjH0= manu (BABIECA) 3/8/2019 12:23:14 PM []: Repository deleted: LIDAR_ART (415)
How to properly delete a Plastic SCM repository?
The repository must be first deleted from Plastic SCM; you can either use the CLI or the GUI. After removing the repository from Plastic SCM, you can then delete it from the file system as well.