siliconpi
siliconpi

Reputation: 8287

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

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 that need to be cleared with the following command

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

Upvotes: 1

Views: 852

Answers (1)

Sander Rijken
Sander Rijken

Reputation: 21615

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.

Upvotes: 1

Related Questions