Restoring Vault backup

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Posts: 29
Joined: Sat Feb 26, 2005 1:29 pm

Restoring Vault backup

Post by ROTRTechTeam » Wed Apr 13, 2005 6:17 pm

OK, one of our guys "accidentally" deleted an entire branch of code. I had a backup of this information, so first, I did a backup of the current information. My plan was to do a backup, get all the code, and then restore the current backup. So, I do a backup and name it "prior to restore", I confirmed that it was listed in the admin tool under "Backups" and then I restored to the previous backup. Prior to going in to retrieve the missing branch of code, I decided to see what would happen if I restored to the "prior to restore" backup. To my surprise, the "prior to restore" backup was not listed. Rather than panic, I went to the SQL database server where the Vault DB is stored. Thankfully, the "prior to restore" backup is there. However, I cannot do a restore from within SQL because a phantom user is holding a process open to the Vault database. I know I can wait and shut off the SQL service later tonight, but I'm concerned about why the "prior to restore" backup is no longer listed in the Vault admin tool. HELP!!!


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

Post by jeremy_sg » Wed Apr 13, 2005 6:42 pm

Before you start restoring backups, can you just undelete the code? Deletes in Vault are non-destructive, and only admins can fully remove something from the Vault database. To undelete the item, right click on the folder that it was deleted from, and choose Properties. In the Deleted Items tab, select the folder that was deleted, and hit the undelete button.

If you still want to try to restore a backup, then the user that is connected to the sgvault database is probably the Vault service. Perform an iisreset on the web server to have the web service disconnect from the database.

Posts: 3660
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear

Post by jclausius » Wed Apr 13, 2005 7:46 pm

Also note, with any restoration of a database you may want to delete the CacheMember_Repository and CacheMember_LastStructureGetTime of everyone's Vault cache. I'm not certain this is absolutely necessary, but I'd like to err on the side of caution.

For more information regarding these files see - Vault Client-Side Cache Files
Jeff Clausius