title: How to switch jackrabbit persistence from filesystem to database?
body: <p>I have a Liferay portal that was configured to use filesystem persitence for jackrabbit.</p>
  
  <p>It seems like this persistence mode creates a lot of files on the <strong>filesystem</strong> (so far something like 113'000) and I'm slowly reaching the file count quota of the server. </p>
  
  <p>I would like then to switch to <strong>database</strong> persistence. I know how to <a href="http://docs.sun.com/app/docs/doc/820-7054/giast?a=view" rel="nofollow">configure it</a> but <strong>I don't know how to migrate the existing content</strong>. </p>
  
  <p>Exporting and importing the various libraries (document, images, etc.) sounds like a lot of work and very error-prone, especially because it's a multi-homed deployment. Plus, I don't know if it will recreate the same exact URL for the documents, which is important to me. </p>
  
  <hr>
  
  <p>Short update: </p>
  
  <p>I managed to upgrade to Liferay 6. There is however no way to migrate the jackrabbit data from file system to database from within Liferay; what the Data Migration panel offers is to migrate from jcr hook to another persistence hook. </p>
  
  <p>My initial issue was not to have the data in a database but to reduce the number of files on the filesystem (quota limit). I then switched to the <code>FileSystemHook</code>. </p>
  
  <p>Here is the file count number (<code>find . | wc -l</code>). </p>
  
  <ul>
  <li>JCRHook: 107566</li>
  <li>FileSystemHook: 2810. </li>
  </ul>
  
  <p>Don't know why Jackrabbit creates so much files...   </p>