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

Re: Creating and Verifying a Reliable backup

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 02 Jun 2016 13:28:33 +0000

Pavel Lyalyakin wrote on Wed, Jun 01, 2016 at 19:29:14 +0300:
> Yes, hotcopy makes full repository copy with locks and hook scripts.
> Read SVNBook[2].

For FSFS repositories, 'hotcopy' doesn't backup locks atomically [1];
one workaround to that is to wrap it by a 'freeze', as in 'svnadmin
freeze r svnadmin hotcopy r r2'.

However, for BDB repositories, that command will deadlock instantly (can
be killed by ^\ SIGQUIT), so the safe idiom would be:

    # Workaround SVN-3750
    case "$(LC_ALL=C svnadmin info -- "$r" | sed -ne 's/^Filesystem Type: //p')" in
       fsfs) svnadmin freeze -- "$r" svnadmin hotcopy -- "$r" "$r.hotcopy";;
       bdb) svnadmin hotcopy -- "$r" "$r.hotcopy";;
       *) TODO ;;



[1] https://issues.apache.org/jira/browse/SVN-3750
Received on 2016-06-02 15:28:37 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.