开发者

TortoiseSVN backup and restore

开发者 https://www.devze.com 2023-04-09 16:49 出处:网络
I need to backup repository in TortoiseSVN and move it to a new PC. What are the steps to do create the back up?

I need to backup repository in TortoiseSVN and move it to a new PC. What are the steps to do create the back up?

I can't find backup option in the menu, the only thing I found was the command-line way:

svnadmin dump C:\SVN\MyProject > C:\tmp\MyProject.bak

I am assuming t开发者_Go百科hat C:\SVN\MyProject is the repository directory? If so, I don't know where mine is located and don't know how to find out (no indication is given in the menu at all).

If someone knows how to backup and restore a repository using clear steps that would be great!

EDITED: My SVN is served with file system

file:///D:/svn/myproject

svnadmin command doesn't work

The easiest and simplest way is appreciated.


If you access you repository through svn:// protocol then it means it's served by the svnserve service.

Try to look up that service in the services manager and see the command line used to start it. That command line contains the path to the repository directory on disk. That's the directory you want to back up.

Command line options for svnserve are documented here. You're interested in the root option.

If your repository is served by Apache (http:// protocol) then you can find out the repository path in the Apache configuration files, as described here. Look for SVNPath.

Usually you can just copy the given repository directory to a new PC and point svnserve or Apache to that new directory.

This may not work due to differences in svn versions. Thus you may want to go with dump / load approach documented here.

It's pretty straightforward:

svnadmin dump C:\SVN\MyProject > dumpfile
# copy the dumpfile to a new PC
svnadmin load C:\SVN\MyNewProject < dumpfile


All you should need to do is copy the filesytem files of where the actual repository is located. Depending on what is serving your subversion repository (Apache or IIS web servers) there should be a configuration file (apache) or setting (iis) that has the path to the repository in it.

for example I have a repository url like:

https://server/svn01p/svn/Repositories/MyStuff/MyProject/branches/December2011

Whatever web server is processing that url will need to know where the actual repository is located so you should be able to work your way back from there.


You don't backup tortoise. You backup the actual repository files, and then you point tortoise to the new location using the "relocate" command in the menu.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号