Running the Upgrade Tool

The upgrade tool provides the easiest way to upgrade the core and installed modules. You can configure the upgrade from files or inside the tool’s command line interface. The upgrade tool lets you upgrade everything–the core and all the modules–together or separately.

Liferay DXP 7.1 bundles include the upgrade tool. If you installed Liferay DXP 7.1 manually, you can download the upgrade tool separately.

  • Liferay DXP: Go to the Help Center and select the DXP version and the Product/Service Packs file type. In the listing that appears, click Download for the Liferay DXP Upgrade Client.

  • Liferay Portal CE: Go to SourceForge, select 7.0 GA[version], and click liferay-ce-portal-tools-[version].zip.

Before running the upgrade tool, learn the tool’s usage and how to configure the core upgrade and non-core module upgrades.

Start with the tool’s usage.

Upgrade Tool Usage

The script (db_upgrade.bat on Windows) invokes the upgrade tool. It resides in the [Liferay Home]/tools/portal-tools-db-upgrade-client folder.

This command prints the upgrade tool usage: --help

To upgrade only the core, add a file called com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config to the [Liferay Home]/osgi/configs folder with the following content:


This configuration prevents automatic module upgrade, but causes the upgrade tool to open a Gogo shell for upgrading modules after finishing the core upgrade.

Here are the tool’s default Java parameters:

-Dfile.encoding=UTF-8 -Duser.language=en -Duser.timezone=GMT -Xmx2048m 

The -j option lets you override the JVM parameters. For example, these options set the JVM memory to 10GB, which is a good starting point for this process type: -j "-Dfile.encoding=UTF-8 -Duser.language=en -Duser.timezone=GMT -Xmx10240m"

The -l option lets you specify the tool’s log file name: -l "output.log"

Here are all the upgrade tool command line options:

–help or -h: Prints the tool’s help message.

–jvm-opts or -j + [arg]: Sets any JVM options for the upgrade process.

–log-file or -l + [arg]: Specifies the tool’s log file name—the default name is upgrade.log.

–shell or -s: Automatically connects you to the Gogo shell after finishing the upgrade process.

Before starting the upgrade, decide how to execute non-core module upgrades.

Configuring Non-Core Module Upgrades

You can configure the upgrade tool to upgrade all installed modules automatically or to open a Gogo shell (after core upgrade completes) for you to execute module upgrades manually.

If the upgrade tool’s autoUpgrade property is set to true (the default setting), upgrade processes for all installed modules are run too.

If you set autoUpgrade="false" in a file called com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config and copy the file into the [Liferay Home]/osgi/configs folder, the upgrade tool opens Gogo shell after the core upgrade. In the Gogo shell, you can administer module upgrades.

Now that you’ve decided how to do non-core module upgrades, examine the core upgrade configuration options.

Configuring the Core Upgrade

The core upgrade requires configuration. You can configure it at runtime via the command line interface or pre-configure it in these files in [Liferay Home]/tools/portal-tools-db-upgrade-client/:

  • Specifies the server’s location and libraries.
  • Configures the database connection.
  • Sets the rest of the portal properties that the upgrade requires. You might want to copy your current portal properties (except your database properties) into this file. Before copying your current properties, make sure you’ve updated the portal properties for Liferay DXP 7.1.

Each file’s properties are described next.


Specify the following information to configure the app server on which Liferay DXP 7.1 is installed:

dir: the absolute path of the application server directory. (required)

extra.lib.dirs: a comma delimited list of extra directories containing any binaries or resources to add to the class path. Use relative paths to dir. (required)

global.lib.dir: the application server’s global library directory. Use a path relative to dir. (required)

portal.dir: the directory where portal is installed in your app server. Use a path relative to dir. (required) ID of a supported application server. (required) Here are the IDs:

  • jboss
  • jonas
  • resin
  • tomcat
  • weblogic
  • websphere
  • wildfly

Relative paths must use Unix style format (forward slashes) and start with a /. For example, the following properties are for Windows:


As another example, the following properties are for Linux:



Specify the following information to configure the database you’re upgrading. Note that these properties correspond exactly to the JDBC portal properties you’d use in a file.

jdbc.default.driverClassName (required)

jdbc.default.url (required)

jdbc.default.username (required)

jdbc.default.password (required)


Add all portal properties, such as file properties, from your backup. The following properties are especially important to configure the upgrade:

liferay.home: the Liferay home folder (required)

locales: Liferay upgrades data for all of the specified locales. If you added locales to the property in your, specify the updated property here. the implementation for persisting documents to the document library store. This property’s default value is If you updated the property in your to use a different implementation, specify the updated property here.

hibernate.jdbc.batch_size: the JDBC batch size used to improve performance; set to 250 by default (optional)

Example Upgrade Configuration

Here’s an example interaction with the upgrade tool’s command line interface:

Please enter your application server (tomcat): 
Please enter your application server directory (../../tomcat-8.0.32): 

Please enter your extra library directories (../../tomcat-8.0.32/bin): 

Please enter your global library directory (../../tomcat-8.0.32/lib): 

Please enter your portal directory (../../tomcat-8.0.32/webapps/ROOT): 

[ db2 mariadb mysql oracle postgresql sqlserver sybase ]
Please enter your database (mysql): 
Please enter your database host (localhost):


The command line interface creates the configuration files based on your input. If you want to set all of this up ahead of time, however, you’ll want to put this information into configuration files.

Here are example upgrade configuration files that you can customize and copy into [Liferay Home]/tools/portal-tools-db-upgrade-client/:





It’s time to start the core upgrade.

Running and Managing the Core Upgrade

Start the upgrade tool, as explained in the upgrade tool usage. Here are the core upgrade stages:

  1. Show the upgrade patch level

  2. Execute the core upgrade processes

  3. Execute the core verifiers

Monitor the upgrade via the upgrade tool log file (default file is upgrade.log). If a core upgrade process fails, analyze the failure and resolve it. If a core upgrade step for Liferay DXP 7.1 (or newer) fails, executing the upgrade tool again starts it from that step.

If you configured the upgrade tool to upgrade non-core modules, the tool opens a Gogo shell and starts upgrading them. The Gogo shell lets you upgrade modules, check module upgrade status, verify upgrades, and restart module upgrades. Read on to learn how to use Gogo shell commands to complete Liferay DXP upgrades.

« Running the Upgrade ProcessGogo Shell Commands for Module Upgrades »
Was this article helpful?
0 out of 0 found this helpful