Messed up migration

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

Moderator: SourceGear

Post Reply
shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Messed up migration

Post by shaulbehr » Wed Jun 02, 2010 2:43 am

Hi,
I wanted to migrate my vault db to a different server. So I dutifully backed up my sgvault DB, shut down the old server, fired up the new one and restored the sgvault DB. Then installed Vault. All good so far.
But when I try to log in, using the admin username and password supplied during installation, it didn't work.
Then I searched on the support forum and found this question, where I learned that you're also supposed to backup and restore your sgmaster database.
Oops.
I don't have access to the old sgmaster database anymore.
Big oops.
Does that mean I'm totally screwed now, or is there some kind of workaround?
Thanks,
Shaul

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

Re: Messed up migration

Post by Beth » Wed Jun 02, 2010 12:55 pm

This isn't the best scenario.

If you have a fairly recent backup, you might consider using that instead and having users check in their latest code. What kind of schedule do you have your backups on?

I have something else you could try, but it's not something tested. Here's what you might do:
1) Make sure you still have the sgvault backup.
2) Uninstall Vault on the server allowing it to delete the databases.
3) Install Vault allowing it to create brand new databases.
4) Restore the sgvault backup.

Then test it and see what your results are.
Beth Kieler
SourceGear Technical Support

shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Re: Messed up migration

Post by shaulbehr » Thu Jun 03, 2010 2:38 am

OK, thank so much for your help!
I'm trying your workaround now - reinstalled Vault with a clean db, then deleted the sgvault DB and restored my version.
I also had to manually add user rights to the sgvault db for "IIS APPPOOL\VaultAppPool" and "NT AUTHORITY\IUSR" in order to get the login working.
So now I can login, and I can see all the repositories from the admin util. Had to re-enter my license key and ... oh dear... had to re-enter the users. Warning bells. What will be with the history?
Logged in to the client as one of the users, could only access a partial list of the repositories. Cannot access any file history through the client, though I can see it through the admin client.
Any suggestions where to go from here?
Thanks again - I really appreciate your help fixing up the mess I've made... :oops:

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

Re: Messed up migration

Post by Beth » Thu Jun 03, 2010 7:17 am

Essentially the sgmaster database had all your users and security settings.

When you are viewing history in the Vault client, are you logged in as admin or as a user you created? Try logging in as admin on the client and see if you can use the client fully.
Beth Kieler
SourceGear Technical Support

shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Re: Messed up migration

Post by shaulbehr » Thu Jun 03, 2010 7:55 am

Beth,
We found a backup of sgmaster!
All is well.
Thank you so much for all your help - very much appreciated!
:)
Shaul

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

Re: Messed up migration

Post by Beth » Thu Jun 03, 2010 1:00 pm

Thank you for the update.
Beth Kieler
SourceGear Technical Support

Post Reply