Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Overview of this book

Table of Contents (19 chapters)
Liferay 6.x Portal Enterprise Intranets Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Data migration between storage hooks


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.

How to do it…

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:

  1. Log in as an administrator to the Liferay instance.

  2. Go to Admin | Control Panel.

  3. Then go to Configuration | Server Administration | Data Migration.

  4. Scroll to the Migrate documents from one repository to another section.

  5. Select a new repository hook called com.liferay.portlet.documentlibrary.store.FileSystemStore.

  6. Click on the Execute...