[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Questions about a script for regular backups

From: Anton Shepelev <anton.txt_at_gmail.com>
Date: Mon, 14 Oct 2019 16:25:55 +0300

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.
Received on 2019-10-14 15:26:16 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.