It's all about the answers!

Ask a question

How to delete a snapshot using scm command line - version 4.0.3


Gael CROVA (2145) | asked Apr 10 '14, 4:51 a.m.
Hi,

First of all, current RTC server version (and then cli) is 4.0.3.

On some build workspaces, we now have several thousands of snapshots and we want to script something in order to remove old and useless snapshots.
We detected than, even specifying --max to big value such as 10000, the server is returning 2048 items max starting from the first one we created -> this means we don't have access to last one, which is a big issue for us.

Using scm command line help, I cannot see any way to delete a snapshot, is it a defect or is it a known limitation ?
Do you have any hidden way to perform such cleanup ?
Thanks in advance for your help

Regards
Gael

2 answers



permanent link
Tim Mok (6.6k38) | answered Apr 10 '14, 10:15 a.m.
JAZZ DEVELOPER
Snapshot deletion in the CLI was added in RTC 4.0.4. For your version, you can use the Eclipse client to delete snapshots.

Comments
Gael CROVA commented Apr 10 '14, 10:20 a.m.

Ok so the reply to my question is "not possible".
As I said, we have thousands of snapshots to delete so I will not start to delete all manually one by one :-)
Is there any way, using scm, to say to RTC server to return the snapshots in reverse order to have the latest ones instead of oldest ones ?

Thanks again !


Tim Mok commented Apr 10 '14, 10:57 a.m.
JAZZ DEVELOPER

The Eclipse client can multi-select snapshots to delete after searching for them. There isn't an option to retrieve the latest by create date but the search results can be sorted. Also, you're dealing with a lot of snapshots so there is a limit of 1024 results for the search. Paging hasn't been implemented for the Eclipse client so you won't be able to see it all at once. A date range is supported by the server but also has not been implemented in the Eclipse client.

Since you mention that these are snapshots on the build workspaces, I would suggest moving notable snapshots of builds to a different owner. What my team does is we move the snapshot that represent releases to the main development stream. We leave the other snapshots in the build workspaces.

If the volume of snapshots is still an issue, please open an RFE.


Gael CROVA commented Apr 10 '14, 11:26 a.m.

Hi,
"The Eclipse client can multi-select snapshots to delete after searching for them": in fact I just tried and I cannot delete multiple snapshots using the search, you might be talking about eclipse client for 4.0.6, which I can't use for now as our IT team cannot upgrade server for the moment.

Regarding build workspaces, we cannot (as per delete) change owner to several snapshots, the only way we have to change owner is to delete the workspace, indicating new owner for workspace snapshots and then recreate the workspace. Moreover, the snapshots taken on these workspaces are used for continuous integration and only last 50 ones are "usefull" for us.

I think that I don't need to create a RFE as problem I'm encountering seems "resolved" in latest releases so the only solution I have seems to be to wait for upgrade.

I was just hoping a trick to do it, or maybe to have a workaround for this problem, maybe using a higher version of command line with our 4.0.3 server.

If you see anything that can help us, I'm interested !

Thanks again for your support


permanent link
Jeff Care (1.0k3833) | answered Apr 10 '14, 7:15 a.m.
To my knowledge, snapshots can not be deleted (by design).

Comments
Gael CROVA commented Apr 10 '14, 7:21 a.m.

Hi,
When you say "by design", are you talking about RTC itself or about command line ?
In Eclipse, I know this is possible to delete a snapshot - using right click then delete but this action is limited to one snapshot for each action (and we don't want to delete thousand of snapshots by hand and one by one).
Our major problem is that RTC server is returning max 2048 items ... in incorrect order so we have to delete the first ones that are useless for us.
Thanks


Jeff Care commented Apr 10 '14, 7:24 a.m.

I stand corrected; I thought that snapshots were immutable.

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.