Migrating File System Stores

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

  1. Shut down the application server running DXP 7.0
  2. Go to the [Liferay Home]/osgi/configs folder.
  3. 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
  4. 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)
  5. Save the file.
  6. Next, in the portal-ext.properties, enter the following: dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore.
  7. Save the file.
  8. 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

  1. Shut down the server running DXP 7.0.
  2. Go to the [Liferay Home]/osgi/configs folder.
  3. 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)
  4. 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)
  5. Save the file.
  6. Next, in the portal-ext.properties, enter the following: dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore.
  7. Save the file.
  8. 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.

  1. Navigate to the Admin → Control Panel → Server Administration.
  2. Click the Data Migration tab 
  3. Select the desired file store system option, such as Advanced File Store 
  4. Then click Execute 
  5. 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.
  6. 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) 
  7. Shut down Liferay DXP 7.0 
  8. 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)
  9. Save the file 
  10. Start the application server again 

The platform has migrated the data to the new file system store repository.

Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0