我可以创建一个“并行”托管 SVN 存储库吗?到我自己的办公室服务器上?
我们在办公室使用 DIY SVN 服务器已经大约一年了。这是一个简单的设置,只需在家庭服务器上安装 SVN。我们使用乌龟SVN来访问它,我只是希望几年前我就了解了版本控制系统。无论如何,当然,在办公室的1Gbps LAN上访问服务器是完美的,但在外面它可以使用,但很差,受限于我们的 ADSL 线路到网络的上传速度为 50k 字节/秒。我想有一天这可能会随着“无限”而改善,但我们可能会等死。
我想要托管一个“并行”存储库,我意识到我应该为此付费,访问速度要快得多。这也将为我们提供额外的备份。我的仓库大小略低于 40G,所以 100G 的限制就可以了。有没有办法做到这一点并使两者成为镜像,以便提交(至少很小)几乎立即在两者上可见?我已经使用 Svnbackup 命令在我们的服务器上创建并行镜像,那么这可以双向工作吗?
任何建议或替代方案表示赞赏。
TIA 布莱恩
We've been using a DIY SVN server in the office for about a year now. It's a simple setup with SVN installed on a home server. We use tortoise SVN to access it I just wish I'd learnt about a version contol system years ago.. Anyway, of course access to the server is perfect in the office on the 1Gbps LAN but outside it's useable but poor, limited by the 50k bytes/sec upload speed of our ADSL line to the web. I guess this may improve one day with 'infinity' but we may die waiting.
I'd like to have a 'parallel' repository hosted, for which I realise I shall pay, where access is much faster. This would also give us an additional backup. My repo is just under 40G, so a 100G limit would be ok. Is there a way of doing this and making the two as mirrors such that commits (small at least) are visible on both almost immediately? I'm alreadyusing the Svnbackup command to make a parallel mirror on our server so can this work both ways?
Any suggestions or alternatives appreciated.
TIA
Brian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您想要一台只读服务器,还是对多个服务器进行读+写访问?当您只需要只读镜像时,可以使用 svnsync 将您的办公服务器复制到镜像服务器。
当你想从不同的地方提交时,可以看看像 hg+hgsubversion 或 git-svn 这样的分布式工具,它们都可以用作 svn 的异步客户端。
Do you want a read-only server, or read+write access to more than one server? When you only need a read-only mirror, you can use svnsync to replicate your office server to a mirror server.
When you want to commit from different places, have a look at a distributed tool like hg+hgsubversion or git-svn, which both can be used as asynchronous clients for svn.
我认为你真正需要的是一个从代理 - 这是一个用于只读访问的颠覆服务器的副本,当你写入(向它)时,提交会直接传递给主服务器。由于您阅读的内容远多于写作,因此这提供了一种简单但有效的方法来实现您想要的目标。
网络上有很多教程,但它们全部要求您使用 http 访问(而不是 svnserve)运行 subversion。从机通过出色的 svnsync 和提交后挂钩保持最新状态。
What I think you really need is a slave proxy - this is a copy of a subversion server for read-only access, when you write (to it), the commits are passed straight to the master. As you read a lot more than write, this provides a simple but effective way to achieve what you want.
There's plenty of tutorials on the web, but they all require you to run subversion using http access (not svnserve). The slave is kept up to date through the excellent svnsync and a post-commit hook.
标准 Linux SVN 服务器具有允许您针对事件运行自己的脚本的挂钩。您可以使用提交后挂钩(只需将名为“post-commit”的脚本放置在“hooks”目录中)。
现在,您可以只发布整个存储库的热副本,这非常容易设置(
svnadmin hotcopy from to
),然后使用 ssh 等将存储库复制到互联网上的其他主机。您可以在两台机器上执行此操作,并且效果很好。缺点:
您可以通过将存储库保存到本地文件来加快速度只将差异传输到另一台机器。
The standard Linux SVN server has hooks that allow you to run your own scripts on events. You can use the post-commit hook (just place a script named "post-commit" in the "hooks"-directory).
Now you can either just issue a hotcopy of the entire repository, which is rather easy to setup (
svnadmin hotcopy from to
) and copy the repository to the other host on the internet using ssh or the like. You can do this on both machines and you are good.Drawbacks:
You may be able to speed things up by saving the repository to a local file and only transmit diffs to the other machine.