Migrate the UFT Mobile server (on-premises)

This topic describes how to migrate a UFT Mobile 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 relevant only for on-premises deployments of UFT Mobile.

Overview

UFT Mobile stores data in a database and in the file system.

File system

You can use any location to which the UFT Mobile server service has access and permissions.

Database

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

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

Migration flow Steps
From one UFT Mobile server with an embedded database to another UFT Mobile 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 UFT Mobile server with an embedded database to another UFT Mobile 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 UFT Mobile server already uses an external database. Skip to Install the new server.

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 UFT Mobile server to an external database. If the new UFT Mobile server will be using 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 UFT Mobile server to the external PostgreSQL server.

  2. In the command line change the directory to the PostgreSQL bin folder.
  3. Create a database for UFT Mobile 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 <uftm database admin> -c -d hp4m <path to the hp4m.dump>

    Linux:

    ./pg_restore -U <uftm 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 UFT Mobile database user:

    1. Open the PostgreSQL pg_hba.conf file for editing.
    2. Enable the access with a host command.
      For example, if the UFTM database user is uftm_admin and the UFT Mobile server static IP is 172.30.10.2, add the line:
      host postgres,hp4m uftm_admin 127.0.0.1/32,172.30.10.2/32 md5
  3. Enable the connection to the database from the UFT Mobile 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 UFT Mobile 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 will be connecting the new UFT Mobile server to the same external database used by the original UFT Mobile server, stop and disable the service of the existing UFT Mobile server.
  2. On the new machine, install the same version of the UFT Mobile 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.
    WindowsSelect Stop UFT Mobile Server service from the Start menu.
    LinuxRun the following command:
    service UFTM 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 UFT Mobile server to the embedded database of the new UFT Mobile 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:

Windows C:\Program Files\UFT Mobile Server\mcStorage
Linux /opt/UFTMobile/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 UFT Mobile server, or on another server on the network.
  2. On Linux, add permissions to the folder by running the following command:
    sudo chmod -R 666 <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 UFT Mobile services are running, by default the Local System account. If needed you can change the account, see Run the services as a different user.
    Linux The UFT Mobile user which was selected during the installation.

UFT Mobile stores the path to the file storage folder in the database. To update the path:

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

    Windows psql.exe -U <UFTM DB admin> hp4m
    Linux ./psql -U <UFTM 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\UFT Mobile Server\mcStorage' WHERE key = 'storage.path';

     

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

    Linux:

    UPDATE public.property SET value = '/opt/UFTMobile/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. If you are using your own CA certificate for UFT Mobile, reimport them. For details, see Using SSL certificates issued by a Certification Authority (CA).
  2. Install the latest UFT Mobile patch on the server. For details, see UFT Mobile Downloads.
  3. Verify the installation:

    1. Start the service:
    2. Windows select Start UFT Mobile Server service from the Start menu
      Linux service UFTM start
    3. Log in to UFT Mobile and make sure the data (the apps and users) is available.
  4. 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 UFT Mobile console and use it in the Modify Configuration wizard. For details, see Generate a new access key.

    2. Install the latest UFT Mobile patch on the connectors. For details, see UFT Mobile Downloads.
  5. If you have devices connected directly to the server machine, open the Lab console CONNECTORS tab, and distribute the Agents to the UFT Mobile server. For details, see View and manage devices.

  6. Update the address and port in Appium scripts and in the client tools (UFT One, UFT Developer, TruClient, Sprinter). This is only required if the new UFT Mobile server does not use the address and port of the old server.

  7. Back to top