Liferay Database migration from 6.2 to 7.1/DXP
Step1-Create a separate database for migration in MySQL
--------------------------------------------------------
Step2:-Take backup and restore
-----------------------------
Create a database dump from liferay 6.2 database and restore that dump into a new liferay 7.1/DXP of database and then
To restore dump file into new DB(Liferay 7.1/DXP)
Step3:-Specify database connection properties
--------------------------------------------
Create a file ‘portal-setup-wizard.properties’ and specify the below DB connection properties within it:
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/liferay_dxp_db
jdbc.default.username=root
jdbc.default.password=root
Note: DO NOT START Liferay DXP server at this point. Otherwise, you will get an error like java.lang.RuntimeException
Step4:-Copy data
-------------------
Copy document_library (You can find from [Liferay Home]/data/) folder from Liferay 6.2 to Liferay 7.1/DXP,
copy images folders into data folder also.
This data will be stored in the default store and you can also choose your location,
it's up to your choice.
Step5:-Disable indexer and autoUpgrade:-
---------------------------------------
Now, we need to disable indexing since we are going to start the database upgrade process for our new environment.
Using this we can disable reindexing content and performance issues to be arised. For this, we have to follow below steps.
Need to create file in liferay 7.1/DXP :
"com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config" on this location [Liferay Home]/osgi/configs and add below content
indexReadOnly="true"
Then create another file in the same folder :
"com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config" and add below content
autoUpgrade="false"
Step6:-Configure the upgrade tool
--------------------------------
Now, we need to configure below files before running the upgrade:
1.app-server.properties -> tomcat server details
2.portal-upgrade-database.properties -> specify db details
3.portal-upgrade-ext.properties -> specify old lifeary ext property details
Step7:-Verify buildNumber
---------------------------
We have to check a release buildNumber from DB before running the upgrade tool, it will be incremented after each deployment in Service Builder
which is used for generating internal database persistence code.
Using this query you can find current buildNumber:
Run upgrade tool using below command (Path [Liferay Home]/tools folder) :
For window
Double click on “db_upgrade.bat” file
Step8:-Enabling indexer
------------------------
Now, The last and most important step is remaining which can only be taken post-upgrade and to enable indexer. For this, you have to modify the file "com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config" in the folder [Liferay Home]/osgi/configs with the following content
indexReadOnly="false"
No comments:
Post a Comment