[PATCH] Berkeley DB to FSFS migration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Berkeley DB to FSFS migration

Martin Tomes
[hidden email] wrote:
> Our FAQ could really use an item on such conversions.  Would you be
> willing to write a patch to http://subversion.tigris.org/faq.html?

As requested.

[[
   * www/faq.html
     (svnserve-win-service): Move closing of container div to end
     of faq entry.
     (bdb-fsfs-convert): Add entry describing how to convert
     between repository backends.
]]


--
Martin Tomes
echo 'martin at tomes x org x uk'\
 | sed -e 's/ x /\./g' -e 's/ at /@/'

The Subversion Wiki is at http://www.subversionary.org/

Index: faq.html
===================================================================
--- faq.html (revision 14955)
+++ faq.html (working copy)
@@ -120,6 +120,8 @@
 happened?</a></li>
 <li><a href="#svnserve-win-service">How do I run svnserve as a service
 on Windows?</a></li>
+<li><a href="#bdb-fsfs-convert">How do I convert my repository from using BDB
+to FSFS or from FSF to BDB?</a></li>
 </ul>
 
 <h4>Troubleshooting:</h4>
@@ -1828,13 +1830,61 @@
 Windows service, but there are a number of &ldquo;service
 wrappers&rdquo; that can do the job; for example:</p>
 
-</div>
 <ul>
 <li><a href="http://dark.clansoft.dk/~mbn/svnservice/">SVNService</a>
 is a free tool written by Magnus Norddahl</li>
 <li><a href="http://support.microsoft.com/kb/q137890/">SrvAny</a>
 is avaliable free of charge from Microsoft</li>
 </ul>
+</div>
+
+<![CDATA[=========================================================]]>
+
+<div class="h3" id="bdb-fsfs-convert" title="bdb-fsfs-convert">
+<h3>How do I convert my repository from using BDB
+to FSFS or from FSF to BDB?</h3>
+
+<p>There are two steps:</p>
+
+<ol>
+  <li>A <a href="#dumpload">dump/load</a> from the old format to the new
+  one.</li>
+  <li>Copy the hook scripts.</li>
+</ol>
+
+<p>Say you have a repository <tt>/svn/myrepos</tt> which is using the BDB
+backend and you would like to switch to using the FSFS backend:</p>
+
+<ol>
+  <li>Close down your server so that the data cannot change during this
+  procedure.</li>
+  <li>Make a new repository specifying the fsfs backend (it is the default
+  from 1.2 onwards), e.g., <tt>svnadmin create /svn/myreposfsfs --fs-type
+  fsfs</tt>.</li>
+  <li>Pipe the output of a dump from <tt>/svn/myrepos</tt> to the input of a
+  load into <tt>/svn/myreposfsfs</tt>, e.g., <tt>svnadmin dump /svn/myrepos
+  -q | svnadmin load /svn/myreposfsfs</tt>.  Windows users should dump
+  to a file and load from that file in two separate steps.</li>
+  <li>Copy any hook scripts which are active in <tt>/svn/myrepos/hooks</tt>
+  into <tt>/svn/myreposfsfs/hooks</tt>.  Don't mindlessly copy everything, the
+  templates generated by Subversion may have changed.</li>
+  <li>Compare the template scripts which the <tt>svnadmin create</tt> command
+  put in <tt>/svn/myreposfsfs/hooks</tt> with those in
+  <tt>/svn/myrepos/hooks</tt> and incorporate any changes which you would like
+  into your active hook scripts.</li>
+  <li>Rename <tt>/svn/myrepos</tt> to <tt>/svn/myreposbdb</tt> and then
+  <tt>/svn/myreposfsfs</tt> to <tt>/svn/myrepos</tt> ensuring that the
+  file permissions are the same as those  that the BDB version had.</li>
+  <li>Restart the server.</li>
+</ol>
+
+<p>Once you are happy that all is well with your new repository delete the old
+one.</p>
+
+<p>To do the reverse and migrate from FSFS to BDB change the <tt>svnadmin
+create</tt> command to specify BDB.</p>
+
+</div>
 
 <![CDATA[=========================================================]]>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Berkeley DB to FSFS migration

kfogel
Martin Tomes <[hidden email]> writes:

> [hidden email] wrote:
> > Our FAQ could really use an item on such conversions.  Would you be
> > willing to write a patch to http://subversion.tigris.org/faq.html?
>
> As requested.
>
> [[
>    * www/faq.html
>      (svnserve-win-service): Move closing of container div to end
>      of faq entry.
>      (bdb-fsfs-convert): Add entry describing how to convert
>      between repository backends.
> ]]

Committed in r14965 and r14967 (I separated the formatting fix from
the new material and made two separate commits).  The live web site
should update soon.

Thanks!

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]