我需要备份 TortoiseSVN 中的存储库并将其移动到新 PC。创建备份的步骤是什么?
我在菜单中找不到备份选项,我唯一找到的是命令行方式:
svnadmin dump C:\SVN\MyProject > C:\tmp\MyProject.bak
我假设 C:\SVN\MyProject 是存储库目录?如果是这样,我不知道我的位置在哪里,也不知道如何找到(菜单中根本没有给出任何指示)。
如果有人知道如何使用明确的步骤备份和恢复存储库,那就太好了!
编辑:
我的 SVN 使用文件系统
file:///D:/svn/myproject
svnadmin
命令不起作用
最简单和最简单的方法值得赞赏。
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 that 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.
发布评论
评论(3)
如果您通过 svn:// 协议访问存储库,则意味着它由 svnserve 服务提供服务。
尝试在服务管理器中查找该服务并查看用于启动它的命令行。该命令行包含磁盘上存储库目录的路径。这就是您要备份的目录。
svnserve 的命令行选项已记录在 此处。您对root选项感兴趣。
如果您的存储库由 Apache(http:// 协议)提供服务,那么您可以在 Apache 配置文件中找到存储库路径,如 此处。查找SVNPath。
通常,您只需将给定的存储库目录复制到新 PC 并将 svnserve 或 Apache 指向该新目录。
由于 svn 版本的差异,这可能不起作用。因此,您可能需要使用记录的转储 / 加载方法此处。
这非常简单:
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:
您需要做的就是复制实际存储库所在位置的文件系统文件。根据为您的 Subversion 存储库提供服务的内容(Apache 或 IIS Web 服务器),应该有一个配置文件 (apache) 或设置 (iis),其中包含存储库的路径。
例如我有一个存储库网址,例如:
https://server/svn01p/svn/ Repositories/MyStuff/MyProject/branches/December2011
无论 Web 服务器正在处理该 url,都需要知道实际存储库在哪里位于所以您应该能够从那里返回。
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.
你不备份乌龟。您备份实际的存储库文件,然后使用菜单中的“重新定位”命令将 tortoise 指向新位置。
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.