Is is possible to restore a deleted label?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
dwhite
Posts: 4
Joined: Thu Apr 23, 2009 1:07 pm

Is is possible to restore a deleted label?

Post by dwhite » Mon Aug 16, 2010 1:39 pm

We have Vault Client Version 5.0.1

We depend on labels to know the exact contents of each of our production builds. If a label for one of these production builds is accidentially erased, we lose the ability to re-create that project. I can't find the label creation or deletion in the history explorer or I would be able to find the exact folder version that was originally labeled and create a new label to replace the deleted one. This leads to a few questions:

1. Is it possible to find the exact folder version that was labeled after the label is deleted?
2. Is it possible to lock labels or deny users the ability to delete labels?
3. Is the only solution in this situation to use the file and folder dates to try to guess which version was the production release?
4. What do others do to protect against this? Snapshots, branches, backups outside of Vault, etc.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Is is possible to restore a deleted label?

Post by lbauer » Mon Aug 16, 2010 5:07 pm

1. Is it possible to find the exact folder version that was labeled after the label is deleted?
Once the label is deleted, it does not appear in history, so there's no way to find it. If you know the folder version, you could always do a history search by folder version and re-label that version. But if you don't know the version or a specific date and time of the transaction, it might be difficult to know what to label.
2. Is it possible to lock labels or deny users the ability to delete labels?
If you're using Folder Security, users with only RC rights would not be able to label or delete a label. However they also could not add or delete any items from the repository, they could only modify existing items.
3. Is the only solution in this situation to use the file and folder dates to try to guess which version was the production release?
If you have some idea of the check-in time of the version that was labeled, you can re-label from folder history. Right click on the folder and select Show History. In the History Query dialog, select View folder history by version. This will give you a list of versions with their dates. Select the version that corresponds to the date you want, and click on Label from the buttons on the right.
4. What do others do to protect against this? Snapshots, branches, backups outside of Vault, etc.
We haven't had other reports of this kind of problem with labels. It's not that easy to accidentally delete a label.
A label is a tag, so deleting a label does not affect the source code at all. But I can see where this can be problematic when someone inadvertently or deliberately deletes an important label.

I've logged feature request 15524 to track label adds and label deletes in History. (Labels are currently tracked, but if you delete a label, it no longer appears in history).

You could restore a backup of the Vault database to different machine/SQL Server, then login to use the Show Labels command. This will give you the folder version that was labeled.

Going forward, the person labeling could add a comment to the folder version prior to creating the label. To do this, user Folder History by Version, as described above, Click the Details tab, which will list the transaction details, and use the Edit button to add or edit the change set comment with info about the label, like "Version 17 labeled." This comment will remain in the folder history by version even if the label is deleted.
Linda Bauer
SourceGear
Technical Support Manager

dwhite
Posts: 4
Joined: Thu Apr 23, 2009 1:07 pm

Re: Is is possible to restore a deleted label?

Post by dwhite » Tue Aug 17, 2010 1:27 pm

I think your feature request 15524 is the best solution but I really like your last suggestion for now.

In fact, I don't see any reason we can't go back and add comments to older labeled folders just to be safe.

Is there some reason you specified to add the comment prior to creating the label?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Is is possible to restore a deleted label?

Post by lbauer » Tue Aug 17, 2010 1:49 pm

You can add the comment before or after -- just make sure you are commenting the right version.
Linda Bauer
SourceGear
Technical Support Manager

StaticAge
Posts: 1
Joined: Wed Jun 01, 2011 11:57 am

Re: Is is possible to restore a deleted label?

Post by StaticAge » Wed Jun 01, 2011 12:01 pm

I would like to see this feature as well. Rational people might not accidentally or intentionally delete emails, but remember most of us work in an office environment. Separating the create rights from the delete rights would make the system a little more idiot-proof.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Is is possible to restore a deleted label?

Post by lbauer » Fri Jun 03, 2011 9:01 pm

Rational people might not accidentally or intentionally delete emails, but remember most of us work in an office environment.
Are you using Vault?
Linda Bauer
SourceGear
Technical Support Manager

Post Reply