掲示板

How to upgrade Liferay 7 from GA1 to GA2?

7年前 に František Řezáč によって更新されました。

How to upgrade Liferay 7 from GA1 to GA2?

New Member 投稿: 5 参加年月日: 14/03/31 最新の投稿
There is an upgrade manual for Liferay 7 https://dev.liferay.com/discover/deployment/-/knowledge_base/7-0/upgrading-to-liferay-7 but it seems to me that it covers upgrading from Liferay 6.2 or older. Upgrading to higher minor version should be much easier, but I can't find such manual for Liferay 7.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Hot to upgrade Liferay 7 from GA1 to GA2?

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Same upgrade process as it used to be...

Point your GA2 at the same database and data directory as GA1 and fire it up.
7年前 に František Řezáč によって更新されました。

RE: Hot to upgrade Liferay 7 from GA1 to GA2?

New Member 投稿: 5 参加年月日: 14/03/31 最新の投稿
I haven't done minor upgrade before so maybe I'm doing something wrong, but if I unzip the GA2 bundle and I set up portal-ext.properties with the right database and liferay.home pointed to where previous GA1 is unzipped, then startup fails with

java.lang.RuntimeException: You must first upgrade to Liferay Portal 7001.
at com.liferay.portal.tools.DBUpgrader.checkRequiredBuildNumber(DBUpgrader.java:86)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:190)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:85)
at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1290)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:234)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)

Thath's why I'm asking this question.

Maybe "point data directory" means something different than setting up liferay.home property, I don't know
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Hot to upgrade Liferay 7 from GA1 to GA2?

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Well, normally the liferay home also contains the "osgi" directory where all of the new goodies are, so you have a GA2 core pointed at GA1 modules.

Instead, in your portal-ext.properties file you specifically want to change the values which point within the data directory. For example, you'd go from:

image.hook.file.system.root.dir=${liferay.home}/data/images

to:

image.hook.file.system.root.dir=/path/to/old/liferay/home/data/images

Etc.

But I guess it would actually be so much easier on you if you copy your GA1 data directory, replacing the data directory from the GA2 bundle. That way you don't have to worry about properties management.

Even better, if you're on linux put your data directory in a standard location, i.e. /var/lib/liferay then create softlinks in your $LIFERAY_HOME directory to point to the shared location. That way you won't have to copy the folder around anymore, you just create the right soft link.

As far as that entry goes, that seems to indicate that you're pointing at a database that needs an update, that it couldn't update manually. Give the commands a spin here to force it to perform the minor upgrade, but be sure you're using the jars/paths from your GA2 bundle.
7年前 に František Řezáč によって更新されました。

RE: Hot to upgrade Liferay 7 from GA1 to GA2?

New Member 投稿: 5 参加年月日: 14/03/31 最新の投稿
I have found the answer buried in the middle of the document I was linking myself. This confirms that the upgrade procedure is NOT the same, at least regarding the database:

If you’ve upgraded Liferay in the past, once you’ve prepared your system for the upgrade, the upgrade process ran when you started the new version for the first time. Liferay Portal instead ships with a tool for upgrading. You must use this tool to upgrade your database. Starting the server to run the upgrade is no longer supported.