This article documents how to use the Data Migration tool in the Server Administration section of Liferay DXP 7.0. The Data Migration Tool allows administrators to migrate data quickly between Documents and Media repository to another, such as moving from File System Store or DB Store to Advanced File System Store.
There are two ways to accomplish this process. The first way is using a config|cfg
file based on the OSGi implementation in DXP 7.0. The second way is to use the Control Panel.
Important Note: The following configuration instructions depend significantly on which Fix Pack version of DXP 7.0 you currently have downloaded and installed.
Resolution
Method 1: Using OSGi
On DXP 7.0 Fix Pack 8 or Higher
- Shut down the application server running DXP 7.0
- Go to the
[Liferay Home]/osgi/configs
folder. - If you are migrating to the Advanced File System Store, create a new file called
com.liferay.portal.store.file.system.configuration.AdvancedFileSystemStoreConfiguration.config
.- By default, DXP 7.0 uses
dl.store.impl=com.liferay.portal.store.file.system.FileSystemStore
- By default, DXP 7.0 uses
- Open the newly created
.config
file and add the following configuration:rootDir=${document_library_path}
for example:
rootDir=/opt/lfr/docs
(Unix/Linux) or
rootDir=C:\liferay\data
(Windows) - Save the file.
- Next, in the
portal-ext.properties
, enter the following:dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
. - Save the file.
- Restart the application server.
Once the server has restarted, the documents will now be stored in the new repository.
On DXP 7.0 Fix Pack 7 or Prior
- Shut down the server running DXP 7.0.
- Go to the
[Liferay Home]/osgi/configs
folder. - If you are migrating to the Advanced File System Store, create a new file called
com.liferay.portal.store.file.system.configuration.AdvancedFileSystemStoreConfiguration.cfg
.- Important Note 1: There is a difference in file extensions; it uses the older
.cfg
. - Important Note 2: By default, DXP 7.0 uses
dl.store.impl=com.liferay.portal.store.file.system.FileSystemStore
)
- Important Note 1: There is a difference in file extensions; it uses the older
- Open the newly created
.cfg
file and add the following configuration:rootDir=${document_library_path}
for example:
rootDir=/opt/lfr/docs
(Unix/Linux) or
rootDir=C:\liferay\data
(Windows) - Save the file.
- Next, in the
portal-ext.properties
, enter the following:dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
. - Save the file.
- Restart the application server.
Once the server has restarted, the documents will now be stored in the new repository.
Method 2: Using the Control Panel's Server Administration
DXP 7.0 offers the ability to execute the same data migration process between file stores from the Control Panel.
- Navigate to the Admin → Control Panel → Server Administration.
- Click the Data Migration tab
- 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. The platform will be unavailable until it is restarted with the changes applied to
portal.properties
. - Verify the data was written to the appropriate document library store location;
- The default location is
${liferay.home}/data/document_library
. - Alternately, the library store location is whatever you set in your
.config|.cfg
(see the appropriate section above)
- The default location is
- Shut down Liferay DXP 7.0
- In the
portal-ext.properties
file, enter the following:
dl.store.impl={whatever the new file store system is}
(for example:dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
) - Save the file
- Start the application server again
The platform has migrated the data to the new file system store repository.