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.
- Shut down Liferay Portal.
- 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=
- Restart the application server.
Switching File System Store Method
- 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.
- Watch the logs to know when the process is complete, and make special note of any exceptions.
- 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 thedl.store.file.system.root.dir
inportal-ext.properties
, or whichever system now holds the documents. - Shut down Liferay Portal.
- Comment out the current
dl.store.impl
property and add the add a newdl.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 - Restart Liferay Portal.
Switching from one Database to another Database
- Go to the Control Panel > Server Administration > Data Migration (if using Portal 6.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]
-
JDBC Driver Class Name:
- 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]
-
JDBC Driver Class Name:
- Click the Execute button.
- 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
- 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
- See the Data Migration section of our 6.2 Official Documentation on Server Administration.
- See the Configuring Your Documents and Media section in the Upgrading to DXP 7.0 guide.