Oracle GlassFish Server 3.0.1 Upgrade Guide

Performing an Upgrade

When you use the Upgrade Tool, the source server and the target server are normally installed on the same machine, but under different install locations. Both server file systems must be accessible from the system on which you perform the upgrade.

The Upgrade Tool upgrades your server configuration and deployed applications.

To perform the upgrade, the user who runs the upgrade needs to have read permissions for the source and target directories and write permission for the target directory.


Note –

Ensure that you have stopped all domains in the source server before you start the upgrade process.


There are two ways to upgrade your server installation:

To Upgrade From the Command Line

To run Upgrade Tool in command-line mode, use the -c option. You can run the upgrade tool in command-line mode using the following syntax:

asupgrade 
[--console] 
[--version] 
[--help] 
[--source source-path] 
[--target target-path] 
[--passwordfile password-file]

Table 2–1 describes the command options in greater detail, including the short form, the long form, and a description.

Table 2–1 asupgrade Utility Command Options

Short Form 

Long Form 

Description 

-c

--console

Launches the upgrade command line utility. 

-V

--version

The version of the GlassFish Server. 

-h

--help

Displays the arguments for launching the upgrade utility. 

-s source-path

--source source-path

The installation directory of the older server installation. 

-t target-path

--target target-path

The domains directory of the GlassFish Server 3.0.1 installation.

-f password-file

--passwordfile password-file

The file containing the administration password and the master password. 

The following example shows how to use the asupgrade command-line utility to upgrade an existing Sun GlassFish Enterprise Server v2.1 installation to GlassFish Server 3.0.1.


asupgrade -c --source /home/glassfish/domains/domain1 --target /home/glassfishv3/glassfish/domains

If you invoke the tool only with the -c/--console option, the tool enters the interactive CLI mode, where you are asked to supply the needed options.

After you issue the asupgrade command, the tool informs you that domain1 already exists in the target directory and asks if you would like to rename it. If you type y, the directory is renamed domain1.original. If domain1.original already exists, the directory is named domain1.original.0.

ProcedureTo Upgrade by Using the Upgrade Tool Wizard

  1. Start the wizard as follows.

    • On a UNIX system, change to the as-install/bin directory and type asupgrade.

    • On a Windows system, double-click the asupgrade.bat icon in the as-install/bin directory.

  2. In the Source Domain Directory field, type the domain directory of the existing installation from which to import the configuration, or click Browse.

    For example, you might type c:\glassfish\domains\domain1.

  3. In the Target Domains Root Directory field, type the location of the GlassFish Server 3.0.1 installation to which to transfer the configuration, or click Browse.

    The default is the full path name of the domains directory of your GlassFish Server 3.0.1 installation (for example, c:\glassfishv3\glassfish\domains).

  4. (Optional) Provide the master password of the source application server.

    The domain will be upgraded using these credentials.

  5. Click Next.

    A dialog box informs you that domain1 already exists in the target directory and asks if you would like to rename it. If you click OK, the directory is renamed domain1.original. If domain1.original already exists, the directory is named domain1.original.0.

    The Upgrade Results page displays the status of the upgrade operation.

  6. Click Finish to exit the Upgrade Tool when the upgrade process is complete.

Next Steps

After you complete the upgrade, start the GlassFish Server using the asadmin start-domain command. Log in to the Administration Console with the user name and password you used in the older server.

To register your installation of GlassFish Server from the Administration Console, select the Registration node. For step-by-step instructions on the registration process, click the Help button on the Administration Console.

Visit the URL http://localhost:8080 to view the domain-dir/docroot/index.html file. This file is brought over during the upgrade. You may want to copy the default GlassFish Server 3.0.1 file from the domain1.original/docroot directory and customize it for your GlassFish Server 3.0.1 installation.