It's all about the answers!

Ask a question

How to delete unused file to free up CCM tablespace


Kevin Lou (311925) | asked Oct 24 '13, 11:00 a.m.
 Some of the projects have very large codebase (thousands of files) and our DB kept running into out-of-space issue. I am looking for a way delete the old, unused source files to free up the tablespace. I read the article https://jazz.net/library/article/1006 but it only covers how to delete content with individual file. Is there a way to to delete the contents of ALL the files that were added under a changeset (the one that initially loads the files to repository)?

2 answers



permanent link
Kevin Lou (311925) | answered Oct 29 '13, 11:46 a.m.
I found a "solution" to delete the contents of ALL the files in a component. I used the option "-j" (scm history -w streamUUID -c "componentName" -j) to output the component history in the JSON format (I hate the "scm list states" command since it run so slow), which has the "uuid" and "stateID" for each change.  I then wrote a Java program to parse the history JSON  file and grab "uuid" and "stateID" pairs for each change and produce the "scm delete state-content uuid stateID" command. I know this is not pretty (and very slow since the files need to be deleted one by one and I have 40K+ files), but it seems working for me at the moment. 

I really hope IBM provides a solution to remove/archive the unused source code to save the DB space. 

permanent link
Matt Lennon (61225) | answered Oct 24 '13, 12:59 p.m.
JAZZ DEVELOPER
Hi Kevin.

RTC will not let you delete files or file history once you've checked them in - you can only delete the content of individual file versions. Have you run a "Latest Metrics by Namespace" report to verify that it's file content and not something else (build results, attachments, etc.) taking up so much space?

-Matt

Comments
Kevin Lou commented Oct 24 '13, 1:45 p.m.

We don't have many builds managed by RTC. I am planing to move several "Learning" streams (each has 4GB+ code) to a different repository. Is there a way to delete the file contents all together? Note we have hundreds of files (this is Curam code) in the stream. 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.