如何从备份恢复 SVN 存储库?

发布于 2024-10-31 18:02:42 字数 411 浏览 4 评论 0原文

我们有一台 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海夕 2024-11-07 18:02:42

备份 Subversion 存储库的正确方法是使用 svnadmin hotcopy 命令。在这种情况下:

生成的备份是完整的
功能性 Subversion 存储库,能够
作为替代品加入
你的实时存储库应该有一些东西
犯了严重错误。

http://svnbook.red -bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup

您说您刚刚将文件复制到其他地方。我建议你尝试将它们复制回来。我建议您随后运行 svnadmin verify 。

我不熟悉 svnserve.exe,但鉴于它是 Windows 服务,您可以随时更改其指向 regedit 的参数:

HKLM\SYSTEM\CurrentControlSet\Services\snvserve\Parameters

The proper way to backup a Subversion repository is the svnadmin hotcopy command. In such case:

The resultant backup is a fully
functional Subversion repository, able
to be dropped in as a replacement for
your live repository should something
go horribly wrong.

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 pointing regedit at:

HKLM\SYSTEM\CurrentControlSet\Services\snvserve\Parameters
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文