{"id":3211,"date":"2021-04-20T08:02:55","date_gmt":"2021-04-20T07:02:55","guid":{"rendered":"https:\/\/kudzia.eu\/b\/?p=3211"},"modified":"2021-04-20T08:05:24","modified_gmt":"2021-04-20T07:05:24","slug":"changing-source-url-of-the-svn-repository-replica","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2021\/04\/changing-source-url-of-the-svn-repository-replica\/","title":{"rendered":"changing source url of the svn repository replica"},"content":{"rendered":"<p>i have bunch of svn read-only replicas. they were created using:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# all to be executed on the server that will become a replica\r\nmkdir \/path\/to\/local\/replica\/on\/this\/server \r\nsvnadmin create \/path\/to\/local\/replica\/on\/this\/server \r\ncd \/path\/to\/local\/replica\/on\/this\/server \r\nchmod +x hooks\/pre-revprop-change\r\nchmod +x hooks\/start-commit\r\n\r\necho -e '#!\/bin\/bash\\nexit 0' &gt; hooks\/pre-revprop-change\r\necho -e '#!\/bin\/bash\\nexit 0' &gt; hooks\/start-commit\r\n\r\nsvnsync 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\r\n# note that during the initial sync you need to have \r\n<\/pre>\n<p>replication [ fetching of earlier not downloaded revisions ] is done via:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsvnsync --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 \r\n<\/pre>\n<p>to check from which url my replica repo fetches updates:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsvnlook pg --revprop -r0 \/path\/to\/local\/replica\/on\/this\/server\/ svn:sync-from-url\r\n<\/pre>\n<p>to change it &#8211; run:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\necho -n 'https:\/\/new.server.name\/whatever\/address\/of\/repo' &gt; \/tmp\/url\r\nsvnadmin setrevprop \/path\/to\/local\/replica\/on\/this\/server -r0 svn:sync-from-url \/tmp\/url\r\n<\/pre>\n<p>that&#8217;s it &#8211; next execution of svnsync will fetch the data from the new origin url<\/p>\n<p>based on:<\/p>\n<ul>\n<li>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.<\/li>\n<li>https:\/\/stackoverflow.com\/questions\/4155262\/how-to-change-svn-url-in-svnsync<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8216;#!\/bin\/bash\\nexit 0&#8217; &gt; hooks\/pre-revprop-change echo -e &#8216;#!\/bin\/bash\\nexit 0&#8217; &gt; hooks\/start-commit svnsync initialize file:\/\/\/path\/to\/local\/replica\/on\/this\/server http:\/\/10.1.2.3\/source\/respository\/ulr &#8211;source-username=user_with_access_to_source_repo &#8211;source-password=password_of_that_user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[113],"class_list":["post-3211","post","type-post","status-publish","format-standard","hentry","category-unimportant","tag-svn"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=3211"}],"version-history":[{"count":5,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3211\/revisions"}],"predecessor-version":[{"id":3216,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3211\/revisions\/3216"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=3211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=3211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=3211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}