Johan Corveleyn >Just to mention another option: Since 1.8 there is the >command 'svnadmin freeze', which locks the repository for >writing while you run another command. That way, you can >use regular backup / copy commands (like rsync) to create a >consistent copy.
I think `freeze' is also helpful for atomic runs of `verify' and `hotcopy' in order to ensure you do not accidentally copy a corrupt repository. Without `freeze', how can I make sure that `hotcopy' applies exclusively to verified data? >See the example mentioned in the 1.8 release notes [1]: > > svnadmin freeze /svn/my-repos -- rsync -av /svn/my-repos /backup/my-repos Hmm. I should also expect a simple freeze/unfreeze pair with the caller resposible for unfreezing a fronzen repo... >Of course, in contrast with hotcopy, the original >repository is locked for a (hopefully short) while, so >users might experience errors/timeouts if this takes too >long. This is why I am going to apply it to a mirror kept in sync with the main repo via an incremental hopcopy invoked from the post-commit hook. How can I skip synchronisation of the mirror in the hook if it is currently frozen without making other possible errors? Does SVN provide a reliable lock facility, or must I invent it myself in my backup script/program using e.g. lock files? -- Please, do not forward replies to the list to my e-mail.