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 ;;
    esac

Cheers,

Daniel

[1] https://issues.apache.org/jira/browse/SVN-3750

Reply via email to