Legacy Knowledge Base
Published Jul. 2, 2025

Using the Data Migration Tool in Liferay Portal

Written By

Liferay Support

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

This article describes the two uses of the data migration tool in the system administration section of Liferay Portal. The Data Migration Tool is fully supported for Liferay Portal 6.2 and below. It has been deprecated in DXP 7.0.

Note: The tool migrates only Liferay data; that is, data built through the Liferay platform's service builder. It will not migrate custom data.

Resolution

Changing your document library directory location

If you would like to have your document library store location be in a different location than the default location set in Liferay Portal, ${liferay.home}/data/document_library:

Liferay Portal 6.2 and older versions.

  1. Shut down Liferay Portal.
  2. Add the following portal property to the portal-ext.properties with the path to the desired file storage root directory
    dl.store.file.system.root.dir=
  3. Restart the application server.

Switching File System Store Method

  1. Navigate to the Admin > Control Panel > Server Administration > Data Migration option. Select the desired file store system option, such as Advanced File Store, then click Execute.
  2. Watch the logs to know when the process is complete, and make special note of any exceptions.
  3. Verify the data was written to the appropriate document library store location; ${liferay.home}/data/document_library if not changed or the path entered into the dl.store.file.system.root.dir in portal-ext.properties, or whichever system now holds the documents. 
  4. Shut down Liferay Portal.
  5. Comment out the current dl.store.impl property and add the add a new dl.store.impl property with the value of the file store system option chosen in step 4,
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore
    #Switch to AFS after migration from DBStore...
    dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore
    dl.store.file.system.root.dir=/mnt/nfs/lrdocs
  6. Restart Liferay Portal.

Switching from one Database to another Database

  1. Go to the Control Panel > Server Administration > Data Migration (if using Portal 6.2).
  2. Set the the following values into the fields for the database to which you will migrate. For example, if the target database is MySQL:
    • JDBC Driver Class Name: com.mysql.jdbc.Driver
    • JDBC URL: jdbc:mysql://[IP address]/[DB Name]?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    • JDBC User Name: [user name]
    • JDBC Password: [Password]
  3. Administrators who plan to migrate to SQL Server 2008 and onwards can enter the following values:
    • JDBC Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    • JDBC URL: jdbc:sqlserver://localhost;databaseName=lportal
    • JDBC User Name: sa
    • JDBC Password: [Password]
  4. Click the Execute button.
  5. When the process finishes, you will see this message in the log:
    	16:07:24,745 DEBUG [liferay/convert_process-1][MaintenanceUtil:64] Please change your JDBC settings before restarting server 16:07:24,746 INFO [liferay/convert_process-1][ConvertProcess:47] Finished conversion for com.liferay.portal.convert.ConvertDatabase in 48619 ms
    	
  6. Shut down the server and update the portal-ext.properties to connect to the new database from Step 2 before starting the portal.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base