SVN持续转储/备份
我们这里有一台SVN服务器,多年来已经积累了数十万次修改,大小达到>40GB。我们希望对存储库进行连续备份,但每次将整个存储库转储或复制到备份服务器需要太长时间。
有没有办法将存储库的最新版本自动添加到现有转储文件中?我知道使用 --incremental
选项可以手动完成,但我想知道是否有一个命令基本上可以像这样工作:
svnadmin dump repo --revision dumpfile_latest:repo_latest --incremental >> dumpfile
这里 dumpfile_latest
将是修订版备份的最新版本号(名为 dumpfile
)和 repo_latest
将是我正在备份的存储库的最新版本号(名为 repo
) >)。感谢您的任何建议!
We have a SVN server here that over the years has accumulated hundreds of thousands of revisions and reached a size of >40 GB. We'd like to do a continuous backup on the repository, but it just takes too long to dump or copy the whole repository to our backup server each time.
Is there a way to add the latest revisions of the repository to an existing dump file automatically? I know with the --incremental
option this can be done manually, but I was wondering if there was a command that would essentially work like so:
svnadmin dump repo --revision dumpfile_latest:repo_latest --incremental >> dumpfile
Here dumpfile_latest
would be the revision number of the latest revision of the backup (named dumpfile
) and repo_latest
would be the latest revision number of the repository I am backing up (named repo
). Thanks for any suggestions!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我目前正在工作中使用此设置。我们使用客户托管的 SVN 服务器,该服务器有时会出现一些连接问题。我们还想确保我们也有一份本地副本。我们在本地设置一个 SVN 存储库,然后运行作为持续集成服务的结果执行的 svnsync 命令,以将远程存储库的更改同步到本地镜像。您可以在此处了解有关 svnsync 命令的更多信息。这会生成存储库的精确副本,因为它基本上会将变更集回放到镜像中。这对我们也很有帮助,因为如果连接“问题”返回,我们有一个只读存储库可用于从中提取工作副本以继续工作,直到连接恢复(您可以执行 svn switch/relocate 来关闭镜像,同时主人挂了)。这可能比您想要的更复杂,但我喜欢我们的设置,它不止一次地拯救了我的培根。我想我会分享一个选择。祝你好运
I currently have this setup at work. We use a customer hosted SVN server that at times has had some connectivity issues. We also want to make sure we have a local copy of things as well. We setup a SVN repo locally, and then run the svnsync command that is executed as a result of a continuous integration service to sync changes from the remote repo to the local mirror. You can read more about the svnsync command here. This generates an exact replica of the repo as it basically plays back the changeset into the mirror. This is also helpful for us in that if the connectivity "issues" return, we have a readonly repo available to pull working copies from to continue work until connectivity is restored ( you can do a svn switch/relocate to work off the mirror while the master is down ). This may be more complex then you are looking for, but I love the setup we have and it has saved my bacon more than once. Figured I would share an option. Good luck
您是否考虑过rsync?
Have you considered rsync?