开发者

How to set svnsync to continually retry if connection breaks? (unix scripting needed?)

开发者 https://www.devze.com 2023-02-05 11:11 出处:网络
I\'m running svnsync as a background process, nohup svnsync synchronize 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:

  1. 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)

  1. Locks are left in place tha开发者_运维百科t need to be cleared with the following command

svn pdel --revprop -r 0 svn:sync-lock --username myusername svn://www.example.com/repos


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号