changing source url of the svn repository replica

i have bunch of svn read-only replicas. they were created using:

# all to be executed on the server that will become a replica
mkdir /path/to/local/replica/on/this/server 
svnadmin create /path/to/local/replica/on/this/server 
cd /path/to/local/replica/on/this/server 
chmod +x hooks/pre-revprop-change
chmod +x hooks/start-commit

echo -e '#!/bin/bash\nexit 0' > hooks/pre-revprop-change
echo -e '#!/bin/bash\nexit 0' > hooks/start-commit

svnsync initialize file:///path/to/local/replica/on/this/server http://10.1.2.3/source/respository/ulr --source-username=user_with_access_to_source_repo --source-password=password_of_that_user --sync-username username_in_the_local_repo
# note that during the initial sync you need to have 

replication [ fetching of earlier not downloaded revisions ] is done via:

svnsync --non-interactive sync file:///path/to/local/replica/on/this/server/ --source-username=user_with_access_to_source_repo --source-password=password_of_that_user 

to check from which url my replica repo fetches updates:

svnlook pg --revprop -r0 /path/to/local/replica/on/this/server/ svn:sync-from-url

to change it – run:

echo -n 'https://new.server.name/whatever/address/of/repo' > /tmp/url
svnadmin setrevprop /path/to/local/replica/on/this/server -r0 svn:sync-from-url /tmp/url

that’s it – next execution of svnsync will fetch the data from the new origin url

based on:

  • http://www.emreakkas.com/linux-tips/how-to-change-svnsync-url-for-source-repository#:~:text=%E2%80%9Csvn%20switch%E2%80%9D%20is%20used%20to,syncing%20from%20the%20new%20URL.
  • https://stackoverflow.com/questions/4155262/how-to-change-svn-url-in-svnsync

Leave a Reply

Your email address will not be published. Required fields are marked *

(Spamcheck Enabled)