This recipe is dedicated to administrators who have to change from one store implementation to another for any reason. This example shows you how we can migrate binary files stored in the document library to other storage repositories. In our example, we will examine migration from S3Store (Amazon S3) to the local FileSystemStore
repository hook.
Liferay has a built-in functionality to migrate documents between storage hooks. Let's assume that our Liferay instance is already started, and the library is connected to the Amazon S3 cloud. In order to migrate documents to the filesystem, go through the following steps:
Log in as an administrator to the Liferay instance.
Go to Admin | Control Panel.
Then go to Configuration | Server Administration | Data Migration.
Scroll to the Migrate documents from one repository to another section.
Select a new repository hook called com.liferay.portlet.documentlibrary.store.FileSystemStore.