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 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.
精彩评论