如何从备份恢复 SVN 存储库?
我们有一台 Windows 2003 服务器,安装了 Subversion(特别是 SlikSVN)。 svnserve.exe 进程设置为作为 Windows 服务运行。
服务器有 2 个硬盘,一个用于操作系统(C:盘),一个用于数据(D:盘)。我们的 SVN 存储库位于 D:\SVN,但 D: 驱动器最近崩溃了,并且不再启动。 SVN Windows 服务也拒绝启动(大概是因为它无法找到存储库)。
幸运的是,虽然我们有存储库的备份(每晚通过 XCOPY 备份到外部驱动器),但我们现在需要将最新备份恢复到 C: 驱动器的 C:\SVN。
我该怎么做呢?有人可以给我详细的解释吗?我需要做的就是将最新的存储库备份恢复到同一服务器上的不同位置(在本例中为 C:\SVN)。
我需要运行哪些命令行命令。我需要取消 D:\SVN 位置的映射吗?
We've got a Windows 2003 server, with Subversion (specifically SlikSVN) installed. The svnserve.exe process is setup to run as a Windows Service.
The server has got 2 hard drives, one for the OS (C: drive), and one for data (D: drive). Our SVN repository was located at D:\SVN, but the D: drive crashed recently, and no longer starts up. The SVN Windows Service also refuses to start up (presumably because it can't locate the repository).
Fortunately though we have backups of the repository (backed up to to an external drive via XCOPY every night), and we now need to restore the latest backup to the C: drive at C:\SVN.
How do I go about doing this? Can someone please provide me with a detailed explanation. All I need to do is restore the latest repository backup to a different location (in this case C:\SVN) on the same server.
What are the command line commands that I need to run. Do I need to unmap the D:\SVN location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
备份 Subversion 存储库的正确方法是使用 svnadmin hotcopy 命令。在这种情况下:
http://svnbook.red -bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup
您说您刚刚将文件复制到其他地方。我建议你尝试将它们复制回来。我建议您随后运行 svnadmin verify 。
我不熟悉 svnserve.exe,但鉴于它是 Windows 服务,您可以随时更改其指向 regedit 的参数:
The proper way to backup a Subversion repository is the
svnadmin hotcopy
command. In such case:http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup
You say that you just copied the files somewhere else. I suggest you just try and copy them back. I recommend you run
svnadmin verify
afterwards.I'm not familiar with
svnserve.exe
but, given it's a Windows service, you can always change its parameters pointingregedit
at: