How to change where Subversion repositories are stored?
Asked Answered
T

3

16

Newbie question: I just installed VisualSVN Server and created a repository. I noticed that it created it at C:\Repositories. I need it stored on my D drive instead as there is more space there. I Googled around but can't figure out how to do it.

This is a new installation so - if it is easier - I could delete the repository first.

In a nutshell: How do I get Subversion to store repositories at D:\Repositories instead of C:\Repositories?

Thanks, Roger

Thoria answered 10/7, 2009 at 3:59 Comment(1)
Answer by @Ivan Zhakov should be accepted instead.Tachyphylaxis
L
-15

Uninstall your VisualSVN Server, move the files, reinstall it.

When you reinstall, choose new repository location.

Lordship answered 10/7, 2009 at 4:3 Comment(2)
It's not recommended to uninstall/install VisualSVN Server, because you loose all server settings, like authentication type, listening port and etc.Illogic
This is not the correct answer as there is indeed a way to change the location as described by Ivan Zhakov (in his answer below).Maxey
I
76
  1. Open VisualSVN Server Manager
  2. Right-click on root node and select Properties
  3. Change repositories location on Storage page
  4. Click OK
Illogic answered 30/8, 2009 at 16:0 Comment(4)
Do not forget to move all files from the old repository folder to the new one. This solution is better than uninstall-install. Nice find Ivan.Blepharitis
@kamikaze_pilot I totally agree!Innocency
and if you forget to move your files ull have to use @j-16 answerExtend
In version 3.x, there is no general page/tab. The repo location is present in "storage" tab.Nick
M
8

I got myself in a bind where the repository was moved before I could make a change on the server. All I got was an error on my VisualSVN Server Manager that said "Can't open directory ..."

My solution, after trying those already provided, which did not work in my case, was to access the registry and modify the RepositoriesRoot entry to the correct path under

"HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/VisualSVN/VisualSVN Server"

This may be under the "HKEY_LOCAL_MACHINE/SOFTWARE/VisualSVN/VisualSVN Server" location if you're not running a 64 bit OS

Changing the value in that location got me back up and running.

... A little more detail as to why the other solutions didn't work: 1. I couldn't uninstall and then re-install because the uninstall attempted to access the original source location, which no longer existed. 2. Because of the state of my server I wasn't able to perform access the "Properties" menu option.

Munafo answered 22/3, 2012 at 6:18 Comment(3)
If you find that the SVN server will not start after changing the key, it's because not everything updated. To fix this. Follow the instructions in Ivan's solution above and click "apply". Then the SVN service will start.Ger
In my case I couldn't follow Ivan's solution because of the error message I was getting when attempting to open the VisualSVN interface. But good to clarify that my solution is for a special case.Munafo
@Ger is right. Even after changing the registry value , you will have to open VisualSVN and open properties and then manually select the location again though it will show correct location and click apply as that is when it updates the htpasswd and other config urls.Mihrab
L
-15

Uninstall your VisualSVN Server, move the files, reinstall it.

When you reinstall, choose new repository location.

Lordship answered 10/7, 2009 at 4:3 Comment(2)
It's not recommended to uninstall/install VisualSVN Server, because you loose all server settings, like authentication type, listening port and etc.Illogic
This is not the correct answer as there is indeed a way to change the location as described by Ivan Zhakov (in his answer below).Maxey

© 2022 - 2024 — McMap. All rights reserved.