Issue
- After restoring a database and document library backup to a Liferay Cloud PaaS environment, the documents and images are missing.
Environment
- Liferay DXP.
- Liferay Cloud PaaS
- Google Cloud Storage (GCS)
Resolution
- Liferay Cloud PaaS environments use Google Cloud Storage (GCS) by default for improved backup restore performance.
- GCS relies on Simple File System Store directory structure:
- If your on-premise instance uses the AdvancedFileSystemStore (or any other), a file store migration is required in order to upload the backup.
- Follow these steps to migrate your document library to be compatible with the structure used in GCS.
- Start your on-premise Liferay DXP server.
- Go to Control Panel > System Settings > File Storage > Simple File System Store Configuration and configure a new destination path.
- For example,
[Liferay Home]/data/SFSS/document_library
. - Ensure the final directory is named "
document_library
", and is different from the directory used by the current used store.
- For example,
- Go to Control Panel > Server Administration > Data Migration > Migrate Documents from one repository to another.
-
- Select
com.liferay.portal.store.file.system.FileSystemStore
. - Do not check "Delete files from previous repository" and ensure sufficient storage space in the destination file system.
- Select
-
- Execute the migration and monitor the logs for the following message:
-
Finished conversion for com.liferay.document.library.internal.convert.document.library.DocumentLibraryConvertProcess in <time>
-
- Update the file store configuration by adding the following to your
portal-ext.properties
file to verify that the migration was successful.-
dl.store.impl=com.liferay.portal.store.file.system.FileSystemStore
-
- Once verified, create and upload a new backup with the migrated document library using the Liferay Cloud CLI command:
lcp backup upload --project [Project name] --environment [Environment] --doclib [Path to document library folder] --database [Path to database .gz file]