Upgrade Database From Liferay 5.2 SP 3 to Liferay 6.0

Leave a Comment

Here are the steps that can be used for migrating database of LR 5.2 SP3 into LR 6.0

First of all let me give you ideas on differenct components.

1) Image gallery
In LR 5.2 SP 3 by default stores images inside Database while LR 6.0 by default stores images inside FileSystem.

2) Permission Algoritham
Liferay 6 uses permission algorithm 6 while, Liferay 5.2EEsp3 was using 5 permission algorithm.
While upgrading we need to change permission algorithm to 5.

Ok lets start with migration. First of all check which hook you have used in Liferay 5.2 Sp3  for Document Library(dl.hook.impl).
If its AdvanceFileSystem Hook then Just use the same hook in Liferay 6 also.

You can also changes this hook . If you changes the hook then Liferay will automcatically upgrade documents .
Let say in LR 5.2 SP3 you were using Database to store documents and while upgrading if you specify FileSystemHook.
Then Liferay will automatically upgrade documents from Database to FileSystem.

We can also change this dl.impl.hook once the migration is done .Liferay provides utility for migrating documents from one repository to another.
Check (Control Pannel -- > Server Administration -- > Data Migration .)

Setup LR 6.0 and add below property in your portal-ext.properties file of LR 6.0
In you portal-ext of LR 6.0 you need to point database of LR 5.x.
At the time of server start up Liferay automatically detects the Database is of current version or any other downgraded version.
(check release_ table for more inforamtion)

Once you start the server upgrade process will automatically start because we have pointed database of LR 5.X.
You will see serveral upgrade logs . Wait for upgrade process to complete .

Upgrade Permission Algorithm to 6

Once server is up Go to Control Panel - > Server Administration -- > Data Migration.

At the bottom click on execute button to Convert Legacy Permission Algoritham.
Once alogoritham is successfully upgraded(check logs to verify) remove permissions.user.check.algorithm property from Portal-ext.

Restart your server once you change the proerty.

Upgrade Image Gallery

To move images from Database to file system go to

Control Panel - > Server Administration -- > Data Migration.
Check for Migrate Images from One Repository to Another tab.
Now select FileSystemHook from the dropdown and click on execute button .

Now wait for upgrade to complete once it done change image.hook.impl property to FileSystemHook.

Restart server once you change this property.

Upgrade Document Library

if you want to change to database hook then go to

Control Panel - > Server Administration -- > Data Migration.
(if you have used same hook during upgrade process as in LR 5.X then no need to use this tool)

Change hook from drop down and click on execute button.
Modify portal-ext according to your hook selection.

Best Practices

- Don't attempt upgrade if there are already obvious issues with your current environment. The current issues might create larger problems if you attempt to upgrade. Fix all problems first.

- If you fail an upgrade attempt , do not continue to attempt upgrade on same database. Fix the upgrade problems , then attempt upgrade on the database on which you have never attempted an upgrade yet.

- As a pre-requisites make sure you backed up all your data including database , document library and image gallery.

Next PostNewer Post Previous PostOlder Post Home


Post a Comment