Migrate the Digital Lab server

This topic describes how to migrate a Digital 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 relevant only for UFT Digital Lab.

Overview

Digital Lab stores data in a database and in the file system.

File system

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

Database

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

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

Migration flow Steps
From one Digital Lab server with an embedded database to another Digital Lab 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 Digital Lab server with an embedded database to another Digital Lab 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 Digital Lab 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 Digital Lab server to an external database. If the new Digital Lab 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 Digital Lab server to the external PostgreSQL server.

  2. In the command line change the directory to the PostgreSQL bin folder.
  3. Create a database for Digital 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 Digital 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 Digital Lab database user is dl_admin and the Digital 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 Digital 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 Digital 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 Digital Lab server to the same external database used by the original Digital Lab server, stop and disable the service of the existing Digital Lab server.
  2. On the new machine, install the same version of the Digital 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 Stop Digital Lab Server service 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 Digital Lab server to the embedded database of the new Digital Lab 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\UFT Digital Lab Server\mcStorage
Linux /opt/UFTDigitalLab/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 Digital 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 Digital 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 Digital Lab user which was selected during the installation.

Digital Lab 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 <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\UFT Digital Lab Server\mcStorage' WHERE key = 'storage.path';

     

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

    Linux:

    UPDATE public.property SET value = '/opt/UFTDigitalLab/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 Digital 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 Digital Lab, reimport them. For details, see Using SSL certificates issued by a Certification Authority.
  3. Install the latest Digital Lab patch on the server. For details, see Software Licenses and Downloads.
  4. Verify the installation:

    1. Start the service:
    2. Windows select Start Digital Lab Server service from the Start menu
      Linux service DL start
    3. Log in to Digital 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 Digital Lab console and use it in the Modify Configuration wizard. For details, see Generate a new access key.

    2. Install the latest Digital Lab 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 Digital Lab server. For details, see Manage devices.

  7. 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 Digital Lab server does not use the address and port of the old server.

  8. Back to top