rsync 不会检测 svn 热复制备份中的文件重命名。有什么替代方案吗?
这一定是一个很常见的要求。我有一个 svn 存储库,数据大小约为 1GB。 为了备份,我首先在中午 12:00 向目录进行热复制,然后在凌晨 1:00,远程计算机使用 rsync 提取此备份。安装 svn 的源计算机具有 rsyncd 并且是 Windows 计算机。
所以,一切都工作正常,只是每天有太多的数据传输。即使有几个字节的单个提交。它传输超过 100 MB 的文件。 我的猜测是 svn 重命名文件过于频繁。
那么,遇到这种情况我该怎么办呢?
rsync 中是否有任何选项可以仅根据内容而不是文件名检测更改?或者 svn 中是否有任何选项可以不进行如此多的重命名?据我记得,有两种数据库选项。也许我正在使用 fsfs。
有什么想法吗? 问候, 桑迪普·吉里
It must be a pretty common requirement. I have an svn repository having around 1GB data size.
To backup I first do a hotcopy into a directory at 12:00AM and then at 1:00 AM, a remote machines pulls this backup using rsync.The source machine on which the svn is installed has rsyncd and is a windows machine.
So, everything is working fine, just that everyday there is too much data transfer. Even if there is a single commit of few bytes. It transfers more 100 MB of files.
My guess is the svn is renaming the files too frequently.
So, what should I do in such a case?
Is there any option in rsync which can just detect the change based on content rather than file names? Or is there any option in svn with which it would not do so many renames? As far I remember, there were two kind of Database options. Perhaps I am using fsfs.
Any ideas?
Regards,
Sandeep Giri
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用 svndump 进行备份。或者查看 Subversion 工具 的备份部分。
You should use
svndump
do do the backup. Or have a look at the backup section of Subversion Tools.rsync 是否正在访问 FAT 文件系统?
将 rsync 与 Windows FAT 文件一起使用时的考虑因素之一是文件的修改时间仅解析为大约一秒的精度。
文件可能会在不需要时被传输,因为 rsync 认为文件已被修改。
因此,
rsync
有一个--modify-window=NUM
选项,值为 1 将允许修改时间最多相差一秒。Is
rsync
accessing a FAT filesystem?One of the considerations when using rsync with Windows FAT files is that modification times for files is only resolved to about one second accuracy.
Files may be transferred when they don't need to be, because
rsync
believes the file has been modified.For this reason,
rsync
has a--modify-window=NUM
option, and a value of 1 would allow modification times to differ by up to one second.