51Testing软件测试网M4tv)Y!Zu+H8zzA&[Pushmi - Subversion repository replication tool
KV:n(?Ex0
pushmi mirror /var/db/my-local-mirror http://master.repository/svn
pushmi sync /var/db/my-local-mirror
I)E)btYd.m0Pushmi provides a mechanism for bidirectionally synchronizing Subversion repositories. The main difference between Pushmi and other replication tools is that Pushmi makes the "slave" repositories writable by normal Subversion clients.
@/[R!s"jc{0
- Set up your local repository
-
CfGe-~-K0Create /etc/pushmi.conf and setup username and password. See t/pushmi.conf for example.51Testing软件测试网5n$z6ir]}l,pK
pushmi mirror /var/db/my-local-mirror http://master.repository/svn
- Bring the mirror up-to-date.
pushmi sync --nowait /var/db/my-local-mirror
2`)_bVlu0Configure a cron job to run this command every 5 minutes.51Testing软件测试网:JJ
xy{!m I6Jcs9G J
- Configure your local svn
-
51Testing软件测试网3\@^9k2vi,].g
Set up your svn server to serve /var/db/my-local-mirror at http://slave.repository/svn
51Testing软件测试网7n/s5H-_/F.L
o%jq{j
X.RA0For your existing Subversion checkouts, you may now switch to the slave using this command:51Testing软件测试网 c ~!@%SZ$k7?f.I
svn switch --relocate http://master.repository/svn http://slave.repository/svn
&b4K]{#{1v&~&K~0From there, you can use normal svn
commands to work with your checkout.
^N_`Aq.e7N0
|J6au
}.Jpo.N0The above section describes the minimum setup without authentication and authorisation.51Testing软件测试网 `,D4d0q\
xOL
4[V~8p
B#E @
_^#Wm0To support auth*, you need to start memcached on the authproxy_port
port specified in pushmi.conf. For exmaple:51Testing软件测试网Yr}7kW d
{
memcached -p 7123 -dP /var/run/memcached.pid
- For authz_svn-controlled master repository
-
51Testing软件测试网K8Sy-e&U4hS
You need to use an external mechanism to replicate the authz file and add a AuthzSVNAccessFile
directive in the slave's slave httpd.conf
, along with whatever authentication modules and configurations. You will need additional directives in httpd.conf
using mod_perl2:
`K$F;G~KA pW$i0 # replace with your auth settings
AuthName "Subversion repository for projectX"
AuthType Basic
Require valid-user
# here are the additional config required for pushmi
PerlSetVar PushmiConfig /etc/pushmi.conf
PerlAuthenHandler Pushmi::Apache::AuthCache
- For public-read master repository
-
51Testing软件测试网3ue x!{4E f+O
You can defer the auth* to the master on write. Put the additional config in httpd.conf
:
X0I"Q%t k3l0 PerlSetVar SVNPath /var/db/my-local-mirror
PerlSetVar Pushmi /usr/local/bin/pushmi
PerlSetVar PushmiConfig /etc/pushmi.conf
<LimitExcept GET PROPFIND OPTIONS REPORT>
AuthName "Subversion repository for projectX"
AuthType Basic
Require valid-user
PerlAuthenHandler Pushmi::Apache::AuthCommit
</LimitExcept>
Ug@
E8m{eg$j0pushmi
looks for /etc/pushmi.conf or wherever PUSHMI_CONFIG
in environment points to. Available options are:51Testing软件测试网&^!v!yS} F0b!k
- username
-
51Testing软件测试网
\ssYRKV"g&j
The credential to use for mirroring.
R N9}%z#u
Q i|0
- password
-
51Testing软件测试网0UK8pXV-g;Zl:Q9g
The credential to use for mirroring.
.L+Vv,Av)V(G0
- authproxy_port
-
51Testing软件测试网c&~~;Z`*u
The port memcached is running on.
)Y.o0r6Gg0
- use_cached_auth
-
51Testing软件测试网WO*L(T0v6o$Gq%@^
If pushmi should use the cached subversion authentication info.51Testing软件测试网MRj!^Ed3fIeyE
c"\c] @!w0Some mirror-related options are configurable in svk, in your ~/.subversion/config's [svk]
section:
/Vm&lBf0
- ra-pipeline-delta-threshold
-
5tq m `2v%Th]0The size in bytes that pipelined sync should leave the textdelta in a tempfile. Default is 2m.
n Q?OQ)t
r)P9c {0
- ra-pipeline-buffer
-
/KVQ*~2?dR0The max number of revisions that pipelined sync should keep in memory when it is still busy writing to local repository.51Testing软件测试网*M:HH0U,k9K&{:}-z0]5m
g;mt(\'i0pushmi
uses Log::Log4perl as logging facility. Create /etc/pushmi-log.conf. See t/pushmi-log.t as exmaple. See also Log::Log4perl::Config for complete reference.51Testing软件测试网KxF4D
a7S9W
51Testing软件测试网#H-t'I&\b^1?XdCopyright 2006 Best Practical Solutions, LLC.
~#mLk J8I0
ET*J0Q&l)|8@?c DI0Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at51Testing软件测试网D/N/w_u)QRd
http://www.apache.org/licenses/LICENSE-2.0
51Testing软件测试网L#XWc^$vyUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.51Testing软件测试网U['G*V_(tCY6s'u3L
"\[n-Fd
H IC0To inquire about commercial support, please contact sales@bestpractical.com.
4h8G8Fw YI5m8|&m0
^~&l:H)MP|1m0Chia-liang Kao
%cC1c _0u8F
S0