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.
In this topic:
- Overview
- Export the embedded database
- Migrate the exported data to an external database
- Install the new server
- Import a database to an embedded database
- Migrate the file storage system
- Final migration steps
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. |
|
From one UFT Mobile server with an embedded database to another UFT Mobile server with an external database. |
|
The UFT Mobile server already uses an external database. | Skip to Install the new server. |
Important: From UFTM 3.5 and later, you can choose whether to install the UFTM server with the embedded connector. When migrating your server, make sure that the source and target are aligned in terms of the embedded connector. Migrating an instance installed without the embedded connector into an instance installed with the embedded connector, and vice versa, is not supported,
Export the embedded database
To migrate an embedded database, you first export the database from the original server machine as follows:
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:
-
Copy the exported database file, hp4m.dump, from the existing UFT Mobile server to the external PostgreSQL server.
- In the command line change the directory to the PostgreSQL bin folder.
-
Create a database for UFT Mobile with the name hp4m.
Windowscreatedb.exe -U <database admin> hp4m
Linux:
./createdb -U <database admin> hp4m
-
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.
-
Enable remote access to the database for the UFT Mobile database user:
- Open the PostgreSQL pg_hba.conf file for editing.
- 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
-
Enable the connection to the database from the UFT Mobile server:
- Open the postgresql.conf file for editing.
- 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'
Install the new server
This section describes how to set up the new server.
- 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.
- On the new machine, install the same version of the UFT Mobile server.
- If you are using an external database, select Use external PostgreSQL database during the installation and provide the required details.
- 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.
Windows Select Stop UFT Mobile Server service from the Start menu. Linux Run the following command: service UFTM stop
-
Copy the following files from the conf folder on the original server to the conf folder on the new server:
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.
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/ |
- 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.
- On Linux, add permissions to the folder by running the following command:
sudo chmod -R 774 <path to storage folder>
-
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:
- In the command line window, navigate to the PostgreSQL bin folder.
-
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
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';
Final migration steps
This section describes the final steps in setting up and validating your new server with the migrated data.
-
Verify that the db.hibernate.connection.username parameter in hp4mExt.properties matches the username of the UFT Mobile database admin user in the target server. If not, update the parameter in the hp4mExt.properties file.
- 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).
- Install the latest UFT Mobile patch on the server. For details, see UFT Mobile Downloads.
-
Verify the installation:
- Start the service:
- Log in to UFT Mobile and make sure the data (the apps and users) is available.
Windows select Start UFT Mobile Server service from the Start menu Linux service UFTM start
- Start the service:
-
Reconnect the connectors.
-
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.
- Install the latest UFT Mobile patch on the connectors. For details, see UFT Mobile Downloads.
-
-
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 Manage devices.
-
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.