Share this page

# 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.

In this topic:

## Overview

Data is stored in both 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. | Export the embedded database. Install the new server. Import the database to the new server machine.
From one server with an embedded database to another server with an external database. | Export the embedded database. Migrate the exported database to an external database. 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:

Export database from a Windows machine:

1. Navigate to the PostgreSQL bin folder.
   Default C:\Program Files\PostgreSQL\<postgres version>\bin

2. Issue the following command from a command line prompt (you are prompted for the DB password):

   `pg_dump -Fc -b -U <FTLab database admin> hp4m > <path to dump file>`

   For example, using the default admin, `pg_dump -Fc -b -U FTLabadmin hp4m > C:\Temp\hp4m.dump`

Export database from a Linux machine:

1. Navigate to the PostgreSQL bin folder, by default /user/pgsql-11/bin.

2. Issue the following command (you are prompted for the DB password):

   `./pg_dump -Fc -b -U <FTLab admin user> hp4m> <path for dump file>`

   For example, using the default admin, `./pg_dump -Fc -b -U FTLabadmin hp4m > /tmp/hp4m.dump`

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 <FTLab database admin> -c -d hp4m <path to the hp4m.dump>`

   Linux:

   `./pg_restore -U <FTLab 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 FTLab_admin and the OpenText Functional Testing Lab server static IP is 172.30.10.2, add the line:
      `host postgres,hp4m FTLab_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.

   OS | Details
   --- | ---
   Windows | Select the option to stop the server from the Start menu.
   Linux | Run the following command: `service FTLab stop`

5. Copy the following files from the conf folder on the original server to the conf folder on the new server:

   OS | Files to copy
   --- | ---
   Windows | The default conf folder is C:\Program Files\Functional Testing Lab for Mobile and Web Server\server\conf …/encrypted.properties …/hp4mExt-audit.properties …/hp4mExt-console.properties …/hp4mExt.properties …/hp4mExt-security.properties …/osp-config/admin_users.csv …/osp-config/osp-configuration.properties
   Linux | The default conf folder is /opt/FunctionalTestingLabForMobileAndWeb/server/conf …\encrypted.properties …\hp4mExt-audit.properties …\hp4mExt-console.properties …\hp4mExt.properties …\hp4mExt-security.properties …\osp-config\admin_users.csv …\osp-config\osp-configuration.properties Add permissions to the copied files by running: `sudo chmod 664 <path to conf folder>/<file name>`

Back to top

## Import a database to an embedded database - Windows

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

1. Copy the exported database file, hp4m.dump, from the existing server to the new server.
2. At the command prompt, go to the PostgreSQL bin folder, by default C:\Program Files\PostgreSQL\<postgres version>\bin.
3. Drop the current database. Run `dropdb.exe -U <FTLab DB admin> hp4m` (default DB admin is FTLabadmin)
4. Recreate the database. Run `createdb.exe -U <FTLab DB admin> hp4m` (default DB admin is FTLabadmin)
5. Import the database, ignoring the warnings issued during the import. Run `pg_restore -U <FTLab DB admin> -c -d hp4m <path to the hp4m.dump>` (default DB admin is FTLabadmin)

6. Renew the password for the database sa users.

   Navigate to the server installation's server\bin folder, by default C:\Program Files\Functional Testing Lab for Mobile and Web Server\server\bin, and run the following file: renew_FTLab_dbuser_password.bat together with the password for the OpenText Functional Testing Lab admin DB user. For example:

       renew_FTLab_dbuser_password.bat <FTLab admin DB user password>

7. Add the required database permissions:

   1. Open a PostgreSQL command line. Run `psql.exe -U <FTLab DB admin> hp4m`

   2. Execute the following commands:

      GRANT USAGE ON SCHEMA public TO mc_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_sa;

      GRANT USAGE ON SCHEMA public TO mc_security_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_security_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_security_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_security_sa;

      GRANT USAGE ON SCHEMA public TO mc_audit_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_audit_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_audit_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_audit_sa;

Back to top

## Import a database to an embedded database - Linux

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

1. Copy the exported database file, hp4m.dump, from the existing server to the new server.
2. At the command prompt, go to the PostgreSQL bin folder, by default /usr/pgsql-11/bin.
3. Drop the current database. Run `./dropdb -U <FTLab DB admin> hp4m` (default DB admin is FTLabadmin)
4. Recreate the database. Run `./createdb -U <FTLab DB admin> hp4m` (default DB admin is FTLabadmin)
5. Import the database, ignoring the warnings issued during the import. Run `./pg_restore -U <FTLab DB admin> -c -d hp4m <path to the hp4m.dump>` (default DB admin is FTLabadmin)

6. Renew the password for database sa users

   In the command line, change directory to the server installation's server/bin folder, by default /opt/FunctionalTestingLabForMobileAndWeb/server/bin and run the following file: renew_FTLab_dbuser_password.sh together with the password for the OpenText Functional Testing Lab admin DB user. For example:

       ./renew_FTLab_dbuser_password.sh <FTLab admin DB user password>

7. Add the required database permissions:

   1. Open a PostgreSQL command line. Run
      `./psql -U <FTLab DB admin> hp4m`

   2. Execute the following commands:

      GRANT USAGE ON SCHEMA public TO mc_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_sa;

      GRANT USAGE ON SCHEMA public TO mc_security_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_security_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_security_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_security_sa;

      GRANT USAGE ON SCHEMA public TO mc_audit_sa;

      GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON ALL TABLES IN SCHEMA public TO mc_audit_sa;

      GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO mc_audit_sa;

      GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO mc_audit_sa;

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\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 <FTLab DB admin> hp4m`
   Linux | `./psql -U <FTLab DB admin> hp4m`

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

UPDATE public.property SET value = '\\myFilesServer\FTLab' 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:

   Windows | select the option to start the lab from the Start menu
   Linux | `service FTLab start`

   2. 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.

Back to top

https://admhelp.microfocus.com/Functional Testing Lab 8942
Tips to improve your search results... OpenText™ Functional Testing Lab for Mobile and Web Help Center OpenText™ Functional Testing Lab Help 25.2 All View Local Help Center View Online Help Center Version: