Antonis Savvidis Posted January 26, 2021 Report Share Posted January 26, 2021 I'm still rather new with Plastic but it seems lovely! So forgive me if that's somehow too obvious but I missed it. Imagine this git example: 1. New git repository (local) 2. I add a file 3. I commit this 4. I remove that file 5. I commit this The file is hidden in the .git folder existing at the same place, however in Plastic's case it doesn't as it keeps a central database in it's installation folder. In git's case I can move that folder to another PC or keep it as a backup on a hard drive/blueray and not lose the repository. How can I have that old-school safety with Plastic? Link to comment Share on other sites More sharing options...
calbzam Posted January 26, 2021 Report Share Posted January 26, 2021 Hi, In Plastic, the local repos are stored by default at "C:\Program Files\PlasticSCM5\server\jet\rep_x". You can use these databases as repo backups and move them to a different Plastic server to keep the repo. Please let us know if it helps. Regards, Carlos. Link to comment Share on other sites More sharing options...
Antonis Savvidis Posted January 26, 2021 Author Report Share Posted January 26, 2021 Thank you for the fast answer! However all I see there are rep_1...rep_n 1. How do I know which rep is which? 2. What if I move a rep folder, will I be able to change it's number when I bring it back to this or other system so it's automatically seen as another repo? Thank you in advance! Link to comment Share on other sites More sharing options...
calbzam Posted January 27, 2021 Report Share Posted January 27, 2021 Quote 1. How do I know which rep is which? Please run the fullowing command to match the repo name with the folder id: cm lrep --format=TABLE Quote 2. What if I move a rep folder, will I be able to change it's number when I bring it back to this or other system so it's automatically seen as another repo? You can change the number and then link the database to the new server using the following command: cm addrep --help Please let us know if it helps. Regards, Carlos. Link to comment Share on other sites More sharing options...
Sarynth Posted January 30, 2021 Report Share Posted January 30, 2021 Can you give an example of cm addrep? In a local scenario, if "C:\Program Files\PlasticSCM5\server\jet\rep_x" is moved to "F:\Repos\rep_x" What's the command to link it up? cm repository add rep_x myname local ? cm repository add F:\Repos\test\rep_4 another local There has been an unexpected error "Invalid directory name: 'F:\Repos\test\rep_4'. It must start with 'rep_'". For more information check the server log. Link to comment Share on other sites More sharing options...
calbzam Posted February 1, 2021 Report Share Posted February 1, 2021 The command should be something like the following: cm repository add rep_4 myrepository local Regards, Carlos. Link to comment Share on other sites More sharing options...
Sarynth Posted February 1, 2021 Report Share Posted February 1, 2021 I tried copying rep_4 to another folder, then tried to add it as "mynewtest" but it failed. So, I renamed the folder to rep_6 and tried to run the command again. It still failed. C:\Docs\test>cm repository add rep_4 mynewtest local There has been an unexpected error "Repository with ID 4 already exists.". For more information check the server log. C:\Docs\test>cm repository add rep_6 mynewtest local There has been an unexpected error "Repository rep_6 doesn't exist". For more information check the server log. Link to comment Share on other sites More sharing options...
calbzam Posted February 2, 2021 Report Share Posted February 2, 2021 Are you copying the "rep_6" it inside the "jet" folder? It seems it's not found. Regards, Carlos. Link to comment Share on other sites More sharing options...
Sarynth Posted February 2, 2021 Report Share Posted February 2, 2021 Carlos, Earlier in the thread we discussed copying the repo to a new folder and linking it up as a new repository. I've copied these to C:\Docs\test for testing. I copied rep_4 and tried linking it with a new repo name, but it said it already existed. I made a duplicate of rep_4 and called it rep_6, and it says it doesn't exist. The concept discussed earlier in this thread is that we can work in a "distributed" way by copying the source folder (in jet/rep_x) to other locations, and link it up with cm repository add, but that is giving problems. Do you have a more comprehensive example of how that might be achieved? Thanks. Link to comment Share on other sites More sharing options...
calbzam Posted February 2, 2021 Report Share Posted February 2, 2021 Hi, In Plastic it's very important to differentiate between repos and workspaces: https://www.plasticscm.com/documentation/user/plastic-scm-version-control-introduction-guide#:~:text=or SQL Server.-,Workspaces,the most recently created one). The repositories (rep_x) are the databases and they are linked to a Plastic server. If you want to follow a distributed workflow, you don't have to manually copy the repository databases between different Plastic servers. You can use the Plastic replica operation for that purpose. If you actually need to move the workspace (not the repository): If you actually need to move repositories from one Plastic server to other, you can move the "rep_x" folder and link it into the new server with "cm addrep --help" command. Let's clarify first if you need to move the repo databases or the workspaces. Regards, Carlos. Link to comment Share on other sites More sharing options...
Sarynth Posted February 2, 2021 Report Share Posted February 2, 2021 I was trying not to get this thread off topic, as the OP's question was about moving a repository. Quote 2. What if I move a rep folder, will I be able to change it's number when I bring it back to this or other system so it's automatically seen as another repo? This is what I was trying to reproduce in this thread. I moved the rep_4 out of the "jet" folder and changed the number from 4 to 6 and tried cm repository add rep_6 mynewtest local But, it errored out. I'll read up on the replica idea and create another thread if that's applicable, but for now I was trying to finish up the initial concept of copying the repository to a different drive, and re-linking it with the Plastic server. That doesn't seem to work, can you provide a working example with the folder moved out of the "jet" folder? Link to comment Share on other sites More sharing options...
calbzam Posted February 3, 2021 Report Share Posted February 3, 2021 Hi, Quote This is what I was trying to reproduce in this thread. I moved the rep_4 out of the "jet" folder and changed the number from 4 to 6 and tried The "rep_4" needs to be always inside another "jet" folder. If you want to move the repo from one server to the other. You need to move the "rep_x" folder from the original "jet" folder to the "jet" folder of your new server. The repositories are always linked to a Plastic server. Regards, Carlos. Link to comment Share on other sites More sharing options...
Sarynth Posted February 3, 2021 Report Share Posted February 3, 2021 Okay, with this information, I can now copy "jet/rep_4" to "jet/rep_6" and run "cm repository add rep_6 mynewtest local" and it successfully created a mynewtest repository inside of PlasticSCM. (Minor success! Yay.) This is still on the C:\ drive. Is there any way to move the repository to a different drive? On 1/26/2021 at 6:22 AM, calbzam said: In Plastic, the local repos are stored by default at "C:\Program Files\PlasticSCM5\server\jet\rep_x". So instead of C:\... move it to D:\... or F:\... etc. like "F:\jet\rep_x" ? Link to comment Share on other sites More sharing options...
calbzam Posted February 4, 2021 Report Share Posted February 4, 2021 Hi, In the server webadmin you select the outout path for the databases. Or you can manually edit the "jet/jet.conf" file using the following entry: basepath=c:\Users\maria\plasticdb Regards, Carlos. Link to comment Share on other sites More sharing options...
Antonis Savvidis Posted February 8, 2021 Author Report Share Posted February 8, 2021 Hello again. I tried this: My out put was cm lrep --format=TABLE 2 Caves 3d local but I have folders rep_1 to rep_11 (I made/deleted a lot of repos doing tests). Does that "2" mean I'm actually looking for rep_2??? Link to comment Share on other sites More sharing options...
calbzam Posted February 8, 2021 Report Share Posted February 8, 2021 Quote Does that "2" mean I'm actually looking for rep_2??? Yes, this is the id of the "rep_x" folder. Regards, Carlos. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now