SVN 存储库的 Windows 备份

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/419511/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:47:30  来源:igfitidea点击:

Windows Backup for SVN Repositories

windowssvnbackup

提问by Dscoduc

I am running a SVN server on my Windows Server and want to schedule an automated backup procedure. I will always be the only one working on the repository. Should I bother with hotcopy or can I use a simple Windows backup application to backup the repositories? What about xcopy or robocopy?

我在我的 Windows Server 上运行一个 SVN 服务器并且想要安排一个自动备份过程。我将永远是唯一一个在存储库上工作的人。我应该使用 hotcopy 还是可以使用简单的 Windows 备份应用程序来备份存储库?xcopy 或 robocopy 怎么样?

采纳答案by Ryan Smith

I find simply copy / pasting (XCopy) the repositories is the easiest solution. You may want to consider dumping the repository to a single file before you copy it as I find copying a single large file is much quicker than copying a bunch of smaller files. This probably isn't an issue if your repository is small, but something to consider:

我发现简单地复制/粘贴 (XCopy) 存储库是最简单的解决方案。您可能需要考虑在复制之前将存储库转储到单个文件中,因为我发现复制单个大文件比复制一堆小文件要快得多。如果您的存储库很小,这可能不是问题,但需要考虑:

svnadmin dump /path/to/repository > repository-name.dmp

回答by VonC

Kind of duplicate SVN backups..is hotcopy enough or should I worry about full and incremental dumps?question.

那种重复的SVN 备份..热拷贝就足够了还是我应该担心完整和增量转储?题。

Do not forget to think about:

不要忘记考虑:

  • the frequency of your backups (what happens if it crashes between two backups ?)
  • the cleaning process (how many backups do you want to keep over time ?)
  • the free space management (what kind of disk space each backup takes ?)
  • the restore procedure: TEST it ;) A backup which has never been tested is not a "real" backup ;)
  • 备份的频率(如果它在两次备份之间崩溃会怎样?)
  • 清理过程(随着时间的推移,您希望保留多少备份?)
  • 可用空间管理(每个备份需要什么样的磁盘空间?)
  • 恢复程序:测试它;) 从未测试过的备份不是“真正的”备份;)

回答by gbarry

You would be OK as the only user, since you know you would never be committing a change during the backup, (right? :) Still, there doesn't seem to be any "bother" in using hotcopy or dump. They're just as easy to use.

您可以作为唯一的用户,因为您知道您永远不会在备份期间提交更改,(对吗?:) 尽管如此,使用热复制或转储似乎没有任何“麻烦”。它们同样易于使用。

Plus you get two bonuses if you use it. One is if your situation changes (you get more people using your repository) you don't have to remember and go back and change the way you do it. And two is, if there is ever a problem with restoring, you don't really want to post a question that starts with, "I made my backup by just making copies of the repo..."

另外,如果您使用它,您将获得两个奖金。一种是如果您的情况发生变化(您让更多人使用您的存储库),您不必记住并返回并更改您的操作方式。第二个是,如果恢复出现问题,你真的不想发布一个以“我只是通过制作回购副本来制作我的备份......”开头的问题。

回答by M4N

As long as you are sure that no one is accessing (especially committing to) the repository while it is being backed-up, there is no need to use hotcopy. You can simply copy/backup the repository with any tool you want.

只要您确定在备份存储库时没有人访问(尤其是提交)存储库,就没有必要使用热复制。您可以使用您想要的任何工具简单地复制/备份存储库。

回答by JustinT

I use Mozy Hometo back up all of my personal development files (Subversion, Visual Studio projects, etc.) It's simple, doesn't take up too many resources, is easily configurable, and best of all: free.

我使用Mozy Home来备份我所有的个人开发文件(Subversion、Visual Studio 项目等)。它很简单,不占用太多资源,易于配置,最重要的是:免费。

I thought about writing my own backup solution using xcopy or something similar, but why reinvent the wheel?

我想过使用 xcopy 或类似的东西编写自己的备份解决方案,但为什么要重新发明轮子呢?

回答by Jose Manuel Ojeda

if the SVN lives in your computer you can use a simple file copy, the safest way is to use a dump backup.

如果 SVN 存在于您的计算机中,您可以使用简单的文件副本,最安全的方法是使用转储备份。

remember that you have to keep the backups out of your computer, there is a free svn backup tool here

请记住,你有保留的备份你的电脑的,有一个免费的SVN备份工具在这里

It does both kind of backups, hotcopy and dump and send it to your email or FTP

它进行两种备份、热复制和转储并将其发送到您的电子邮件或 FTP

回答by Suppaman

Here a GUI Windows tool for make a dump of local and remote subversion repositories:

这是一个用于转储本地和远程 subversion 存储库的 GUI Windows 工具:

SVN Backup Tool

SVN备份工具

The tool description says:

工具说明说:

This simply tool allow to make a dump backup of a local and remote subversion repository. The software work in the same way of the "svnadmin" but is not a GUI frontend over it. Instead use directly the subversion libraries for allow to create dump in standalone mode without any other additional tool.

这个简单的工具允许对本地和远程 subversion 存储库进行转储备份。该软件的工作方式与“svnadmin”相同,但不是它的 GUI 前端。而是直接使用 subversion 库来允许在独立模式下创建转储,而无需任何其他附加工具。

The problem in your case is this tool need to manually started for make the backup and, currently, there is no automatic schedule of backup.

您的问题是此工具需要手动启动才能进行备份,目前没有自动备份计划。