Migrate the server

This topic describes how to migrate an OpenText Functional Testing Lab server to a different machine. You can migrate to a machine with the same operating system (for example, Linux to Linux) or to a different operating system (for example, Linux to Windows).

This section is not relevant for OpenText Core SDP and OpenText Core Functional Testing Lab.

Overview

OpenText Functional Testing Lab stores data in a database and in the file system.

File system

You can use any location to which the OpenText Functional Testing Lab server service has access and permissions.

Database

You can use the embedded PostgreSQL database or an external PostgreSQL database.

When migrating the server, you can migrate your database as follows:

Migration flow Steps
From one server with an embedded database to another server with an embedded database.
  1. Export the embedded database.
  2. Install the new server.
  3. Import the database to the new server machine.
From one server with an embedded database to another server with an external database.
  1. Export the embedded database.
  2. Migrate the exported database to an external database.
  3. Install the new server using the Use external PostgreSQL database option.
The server already uses an external database. Skip to Install the new server.

Important: If using the embedded connector, make sure that the source and target are aligned in terms of the embedded connector when migrating your server. Migrating an instance installed without the embedded connector into an instance installed with the embedded connector, and vice versa, is not supported,

Back to top

Export the embedded database

To migrate an embedded database, you first export the database from the original server machine as follows:

Back to top

Migrate the exported data to an external database

This section describes how to migrate the data exported from the embedded database of the original server to an external database. If the new server uses an embedded database, or if you already have an existing external database, skip to Install the new server.

To migrate to an external database:

  1. Copy the exported database file, hp4m.dump, from the existing server to the external PostgreSQL server.

  2. In the command line change the directory to the PostgreSQL bin folder.
  3. Create a database for OpenText Functional Testing Lab with the name hp4m.
    Windows

    createdb.exe -U <database admin> hp4m

    Linux:

    ./createdb -U <database admin> hp4m

  1. Import the database:

    Windows:

    pg_restore -U <dl database admin> -c -d hp4m <path to the hp4m.dump>

    Linux:

    ./pg_restore -U <dl database admin> -c -d hp4m <path to the hp4m.dump>

    Ignore any warnings issued during the restore.

  2. Enable remote access to the database for the OpenText Functional Testing Lab database user:

    1. Open the PostgreSQL pg_hba.conf file for editing.
    2. Enable the access with a host command.
      For example, if the OpenText Functional Testing Lab database user is dl_admin and the OpenText Functional Testing Lab server static IP is 172.30.10.2, add the line:
      host postgres,hp4m dl_admin 127.0.0.1/32,172.30.10.2/32 md5
  3. Enable the connection to the database from the OpenText Functional Testing Lab server:

    1. Open the postgresql.conf file for editing.
    2. Enable the access with a listen_addresses command. For example, if the database receives connections from OpenText Functional Testing Lab on IP 172.30.10.10 you can add the line:
      listen_addresses = '127.0.0.1,172.30.10.10'

Back to top

Install the new server

This section describes how to set up the new server.

  1. If you are connecting the new server to the same external database used by the original server, stop and turn off the service of the existing server.
  2. On the new machine, install the same version of the OpenText Functional Testing Lab server.
  3. If you are using an external database, select Use external PostgreSQL database during the installation and provide the required details.
  4. Do not start the server, when prompted to do so at the end of the installation. If the service was started then manually stop it.
    Operating systemDetails
    WindowsSelect the option to stop the server from the Start menu.
    LinuxRun the following command:
    service DL stop
  5. Copy the following files from the conf folder on the original server to the conf folder on the new server:

Back to top

Import a database to an embedded database

This section describes how to import the data exported from the embedded database of the original server to the embedded database of the new server.

Back to top

Migrate the file storage system

This section describes how to migrate the data stored in the file system.

The default storage folders are:

Operating system Details
Windows C:\Program Files\Functional Testing Lab for Mobile and Web Server Server\mcStorage
Linux /opt/FunctionalTestingLabForMobileAndWeb/mcStorage/
  1. To change the files storage location, copy the files storage folder from the existing location to the new location. The location can be local on the new OpenText Functional Testing Lab server, or on another server on the network.
  2. On Linux, add permissions to the folder by running the following command:
    sudo chmod -R 774 <path to storage folder>
  3. Make sure the user/account has access and read and write permissions for the location:

    Windows The account under which the OpenText Functional Testing Lab services are running, by default the Local System account. If needed you can change the account, see Run the service as a different user.
    Linux The OpenText Functional Testing Lab user which was selected during the installation.

OpenText Functional Testing Lab stores the path to the file storage folder in the database. To update the path:

  1. In the command line window, go to the PostgreSQL bin folder.
  2. Open the PostgreSQL command line and run the following commands:

    Windows psql.exe -U <DL DB admin> hp4m
    Linux ./psql -U <DL DB admin> hp4m
  3. Update the files storage path:

    UPDATE public.property SET value = '<storage location>' WHERE key = 'storage.path';

    For Example:

    Windows:

    UPDATE public.property SET value = 'C:\Program Files\Functional Testing Lab for Mobile and Web Server Server\mcStorage' WHERE key = 'storage.path';

     

    UPDATE public.property SET value = '\\myFilesServer\dl' WHERE key = 'storage.path';

    Linux:

    UPDATE public.property SET value = '/opt/FunctionalTestingLabForMobileAndWeb/mcStorage/' WHERE key = 'storage.path';

Back to top

Final migration steps

This section describes the final steps in setting up and validating your new server with the migrated data.

  1. Verify that the db.hibernate.connection.username parameter in hp4mExt.properties matches the username of the OpenText Functional Testing Lab database admin user in the target server. If not, update the parameter in the hp4mExt.properties file.

  2. If you are using your own CA certificate for OpenText Functional Testing Lab, reimport them. For details, see Using SSL certificates issued by a Certification Authority.
  3. Install the latest OpenText Functional Testing Lab patch on the server. For details, see Software Licenses and Downloads.
  4. Verify the installation:

    1. Start the service:
    2. Windows select the option to start the lab from the Start menu
      Linux service DL start
    3. Log in to OpenText Functional Testing Lab and make sure the data (the apps and users) is available.
  5. Reconnect the connectors.

    1. Run the modify configuration wizard on each of the connectors. For Windows, see Modify a connector. For Linux see, Change the configuration of the connector.

      If the new server does not have the address and port of the original server, generate a new Connector access key from the lab console and use it in the Modify Configuration wizard. For details, see Generate a new access key.

    2. Install the latest patch on the connectors. For details, see Software Licenses and Downloads.
  6. If you have devices connected directly to the server machine, open the Lab console CONNECTORS tab, and distribute the Agents to the server. For details, see Manage devices.

  7. Update the address and port in Appium scripts and in the testing tool clients. This is only required if the new server does not use the address and port of the old server.

  8. Back to top