如何设置 svnsync 在连接中断时不断重试? (需要unix脚本吗?)
我正在将 svnsync 作为后台进程运行,
nohup svnsync synchronize svn://www.example.com/repos &
但有时源 SVN 存储库/服务器会崩溃。我可以设置 svnsync 或配置一些定期重试同步的内容吗?
注意:
- svnsync 连接失败,错误信息:
svnsync:PROPFIND 请求失败 '/repos/abc'
svnsync: PROPFIND 的 “/repos/abc”:无法连接到 服务器(http://a.bc.de)
- 锁留在原处,需要使用以下命令清除
svn pdel --revprop -r 0 svn:sync-lock --username myusername svn://www.example.com/repos
I'm running svnsync as a background process,
nohup svnsync synchronize svn://www.example.com/repos &
But sometimes the source SVN repository / server crashes. Can I set svnsync or configure something that would periodically retry the sync?
Note that:
- svnsync fails to connect with the error message:
svnsync: PROPFIND request failed on
'/repos/abc'svnsync: PROPFIND of
'/repos/abc': could not connect to
server (http://a.bc.de)
- Locks are left in place that need to be cleared with the following command
svn pdel --revprop -r 0 svn:sync-lock --username myusername svn://www.example.com/repos
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您运行此操作的方式意味着它会在完成后停止,因此它绝不是连续的。
我会使用 cron 作业每隔一段时间重复调用 svnsync 。我不建议自动清洁锁,因为它们的存在是有充分理由的。
服务器/存储库以什么方式崩溃?尝试在存储库上运行 svnadmin verify 。
The way you're running this means that it'll stop after it's done, so it's by no means continuous.
I would use a cron job to repeatedly call svnsync at intervals. I wouldn't recommend cleaning the locks automatically, because they're there for a good reason.
In what way does the server/repository crash? Try running
svnadmin verify
on the repository.