{"id":1221,"date":"2014-08-24T16:38:12","date_gmt":"2014-08-24T14:38:12","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=1221"},"modified":"2014-08-24T16:38:12","modified_gmt":"2014-08-24T14:38:12","slug":"subversion-survival-guide","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=1221","title":{"rendered":"Subversion Survival Guide"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#To_create_a_repository\"><span class=\"toc_number toc_depth_1\">1<\/span> To create a repository<\/a><\/li><li><a href=\"#To_recover_a_database\"><span class=\"toc_number toc_depth_1\">2<\/span> To recover a database<\/a><\/li><li><a href=\"#To_launch_svn_as_daemon\"><span class=\"toc_number toc_depth_1\">3<\/span> To launch svn as daemon<\/a><\/li><li><a href=\"#To_dumpload_database\"><span class=\"toc_number toc_depth_1\">4<\/span> To dump\/load database<\/a><\/li><li><a href=\"#To_synchronize_database\"><span class=\"toc_number toc_depth_1\">5<\/span> To synchronize database<\/a><\/li><\/ul><\/div>\n<h1><span id=\"To_create_a_repository\">To create a repository<\/span><\/h1>\n<pre lang=\"bash\">\r\nsvnadmin create \/my\/svn\/database\r\nchown -R apache:apache \/my\/svn\/database\r\nchmod -R 750 \/my\/svn\/database\r\n<\/pre>\n<h1><span id=\"To_recover_a_database\">To recover a database<\/span><\/h1>\n<pre lang=\"bash\">\r\nsvnadmin recover \/my\/svn\/database\r\nchown -R apache:apache \/my\/svn\/database\r\nchmod -R 750 \/my\/svn\/database\r\n<\/pre>\n<h1><span id=\"To_launch_svn_as_daemon\">To launch svn as daemon<\/span><\/h1>\n<p>* You can launch svn as daemon instead of http. Launch the following command:<\/p>\n<pre lang=\"bash\">\r\n svnserve --daemon --root \"\/my\/svn\/repo\"\r\n<\/pre>\n<p>=> &#8220;Svnserve will now start waiting for incoming requests on port 3690. <br \/>\n   The <em>&#8212; daemon<\/em> switch tells svnserve to run as a daemon process, so it will run until it is manually stopped.<\/p>\n<p>* To launch svn serve as service:<\/p>\n<pre lang=\"bash\">\r\n sc create svnserve binpath= \"\/my\/svn\/repo\" --service --root \"\/my\/svn\" displayname= \"Subversion\" depend= tcpip start= auto\r\n<\/pre>\n<h1><span id=\"To_dumpload_database\">To dump\/load database<\/span><\/h1>\n<p>I recommand to create one dump file by revision.<br \/>\nWhen dumping the database, check for each dump if the endline exists: &#8212;&#8212;- R\u00e9vision 1 propag\u00e9e (commit) >>> <br \/>\nWhen loading the database, check if the last revision of the new repo is equals to the dump revision. <\/p>\n<p>* To dump database:<br \/>\nr1, r2 are two revisions:<\/p>\n<pre lang=\"bash\">\r\n svnadmin dump \/my\/svn\/repo -r r1:r2 > revs-r1-r2.fichier-dump \r\n<\/pre>\n<p>* To load database:<\/p>\n<pre lang=\"bash\">\r\nsvnadmin load \/my\/svn\/repo < dump-file\r\n<\/pre>\n<h1><span id=\"To_synchronize_database\">To synchronize database<\/span><\/h1>\n<pre lang=\"bash\">\r\n # 1st initialize new depot:\r\n  svnsync initialize http:\/\/myNewDepot http:\/\/myDepot\r\n # 2nd, launch synch:\r\n  svnsync synchronize http:\/\/myNewDepot\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 To create a repository2 To recover a database3 To launch svn as daemon4 To dump\/load database5 To synchronize database To create a repository svnadmin create \/my\/svn\/database chown -R apache:apache \/my\/svn\/database chmod -R 750 \/my\/svn\/database To recover a database svnadmin recover \/my\/svn\/database chown -R apache:apache \/my\/svn\/database chmod -R 750 \/my\/svn\/database To launch svn as daemon [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1219,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1221","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1221"}],"version-history":[{"count":1,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1221\/revisions"}],"predecessor-version":[{"id":1222,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1221\/revisions\/1222"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1219"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}