Issue
There are many factors to consider when planning to migrate your on-prem Liferay installation to Liferay Cloud. One of these factors is your Staging configuration. Below is the recommended method to migrate a staged local installation to Liferay Cloud.
The best way to migrate your Staging setup to Liferay Cloud, whether local or remote, is to first disable the Staging feature. This may seem counter intuitive, but is it much simpler to migrate a single "un-staged" environment than it is to migrate two linked staged environments. Once Staging is disabled, you can transfer the Staging environment(not the Live environment) to the Cloud. The Staging environment has all of the data and can be used to re-publish the Live site once in the Cloud.
Environment
- Liferay Cloud - Version 4 Workspace
Resolution
Below are the steps to perform the migration. These steps assume that 2 local instances of Liferay have been configured for Remote Staging. One is the Live instance and one is the Staging instance.
- Disable Remote Staging(you can either enable local Staging here, or do so once in the cloud, though doing so in the cloud may be faster)
- Deploy version 4 stack with the latest Liferay image matching your local environment(it is best to use the latest versions of all images where possible)
- Create local backup(database & Document Library) of the Staging environment
- Upload backup to Liferay Cloud
- Restore backup to Liferay Cloud environment
Additional Information
- You will need to republish your sites to match the current production environment(this can be the part where you enable Local Staging).
- You'll need to bring over your production portal.ext.properties file as opposed to your Staging file(some merging may be necessary depending on what you've added but we'll leave this to your discretion).
- The upload process may take some time if you have a large database or Document Library.
- As with any migration process, before running executing on production, it is a good idea to test each step with a development backup to ensure the process works as expected.
- It may be beneficial to review the full Liferay Cloud Migration documentation article for reference.