Code to Purge

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
btd
Posts: 324
Joined: Fri May 13, 2005 1:50 pm

Code to Purge

Post by btd » Tue Mar 16, 2010 1:05 pm

We are going to upgrade to Vault 5.0.3_18802 soon.

Our existing vault database is very large and we want to delete/purge forever files/labels.

Does anyone know of any Vault API code to purge data?

If so can you share with us?

Thanks

BTD

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Code to Purge

Post by Beth » Wed Mar 17, 2010 7:23 am

We already have that ability built in.

Just as a warning first, that obliterating data makes the repository incompatible with our Export/Import Tool. If you plan on using the Export/Import Tool, then do all exports you think you need before obliterating.

To permanently remove files and their history, first you delete them, then you go to the Vault admin web page, expand the repository on the left that you wish to remove the files from and click the Obliterate link. In there, you can find and select each deleted item to permanently remove.

If you have branches, then before you can obliterate the folder the branches were made from, you have to delete and obliterate each branch.

On deleting labels, in the Vault GUI client, select a path in the tree or just $ and then go to View - Show Labels. Right-click a label and select Delete.
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Code to Purge

Post by Beth » Wed Mar 17, 2010 8:06 am

Sorry, I mis-understood the question. I will move this to our API section.
Beth Kieler
SourceGear Technical Support

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Code to Purge

Post by jeremy_sg » Wed Mar 17, 2010 9:32 am

In the ClientAPI zip, the VaultClientIntegrationLib has a method called ServerOperations.ProcessCommandDeleteLabel(), which you could use to delete old labels.
Subscribe to the Fortress/Vault blog

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Code to Purge

Post by jeremy_sg » Wed Mar 17, 2010 9:33 am

You can also use the GUI client's Show Labels dialog to quickly delete multiple labels.
Subscribe to the Fortress/Vault blog

Post Reply