Share this page

# Remove and restore tenants

This section describes how to remove and restore tenants.

In this topic:

## About removing and restoring tenants

You can temporarily remove tenants from the Tenants grid. This does not delete the database nor the tenant repository from the server and you can restore the tenant with all tenant-related database users if necessary. For details, see Remove a tenant.

You can later restore a tenant by selecting the .json file for the tenant you want to restore. For details, see Restore tenants.

You can also use the remove and restore process to access tenants from another server, or to move tenants across SaaS production or staging environments or from an on‑prem to a SaaS environment. For details, see Move tenants to a new environment.

Note: The dbid.json file structure from 2020 SP2 and 2020 SP3 is not compatible with the current release. You must use a JSON file from 2021 or later. For details, see dbid.json file structure.

Back to top

## Remove a tenant

This task describes how to remove a tenant from the Tenants grid. You can remove only one tenant at a time.

1. In Site Management, select the Tenants tab.

2. Select a tenant in the grid and click the Remove button to remove a tenant from the grid.

   When you remove a tenant, two .json files are created: tenant_<tenant UID>.json is downloaded to the client's Downloads folder, and TenantConfig-<tenant UID>.json is created under the root repository folder.

   Note:

   - The LRE tenant cannot be removed.

   - A tenant cannot be removed until all tenant jobs have stopped and all hosts are in Idle state. Removing a tenant removes all the tenant's hosts.

   - We recommend that you make a note of the tenant UID in case you later need to restore it.

Back to top

## Restore tenants

This task describes how to restore a tenant to the Tenants grid.

1. Prerequisites.

   - Remove a tenant as described in Remove a tenant.

   - You must manually copy all tenant databases (including it’s Site Admin, Lab, and projects) and project repositories to the new environment before restoring the tenant on the new environment.

2. Restore the tenant.

   1. On the destination environment, select Site Management > Tenants.

   2. Click Restore. The Open File dialog box opens.

   3. Locate the dbid.json that includes the tenant you want to restore file. When you restore a tenant, you can either restore it from the json file that was downloaded to the client's Download folder, or from the project's root folder.

   4. Select the dbid.json file and click Open. The Restore Tenant dialog box opens and displays the selected file.

   5. Click the Restore button . The Restore Tenant dialog box closes and the tenant is added to the Tenants grid in Site Management.

      If the restored tenant is of the current version, all its hosts (including private ones) are automatically reset to `Unavailable` and `Idle` immediately after the restore process is completed. If the restored tenant has an older version than the server, this happens after an upgrade.

      Note: You must delete hosts from a restored tenant if they already exist in the target environment. Otherwise they fail in the host assignment stage.

Back to top

## Move tenants to a new environment

This task describes how to move a tenant to a new environment using the remove and restore process.

1. Prerequisites.

   - You must upgrade to the latest version if the tenant you want to move was created in an earlier version. For details, see Upgrade tenants.

   - You must manually copy all tenant databases (including it’s Site Admin, Lab, and projects) and project repositories to the new environment before restoring the tenant on the new environment.

2. Create a dbid.json file for each tenant you want to move.

   1. On the source environment, select a tenant in Site Management > Tenants and click Generate DBID File.

   2. Select a folder in which to save the file, and click OK. The file is created in the root folder of the tenant repository and is downloaded to the Downloads folder of the client user.

      Note: When working in a Chrome or Edge browser, the file is automatically downloaded to the Downloads folder.

      Resolution: Change the browser's default download location.

   3. Repeat for every tenant (except LRE) that you want to move to the new environment.

3. Restore the tenant on the new environment.

   Continue with step 2 of Restore tenants (repeat for every tenant that you want to move to the new environment).

Back to top

## dbid.json file structure

When restoring a tenant, a dbid.json file is generated for the tenant with the following structure.

Elements | Description
--- | ---
tenantUID | The unique tenant ID as defined in the Tenants table in Site Management.
dbTypeId | The database type: 6 (PostgreSQL) 2 (MS-SQL) 3 (Oracle)
createTime | The date and time that the tenant was created.
description | (Optional) A description of the tenant.
tenantVersion | The OpenText Enterprise Performance Engineering version in which the tenant was created. For example, v2020p2, v2020p3, v2021, v2021r1, v2021r2.
name | The tenant name as defined in the Tenants table in Site Management.
id | This is an internal value that is overwritten.
tenantDbAdminInfo | The Tenant Admin schema name.
tenantDbNameForPostgreSQL | The tenant database server name (for PostgreSQL only). For an Oracle or MS-SQL database, this is displayed as "null".

Sample dbid.json file:

Copy code

    {
       "tenant": {
          "tenantUId": "393dec31-45c3-449e-b7d5-cd85f422f73b",
          "dbTypeId": 6,
          "createTime": "2020-11-02T15:37:28.520817",
          "description": "",
          "tenantVersion": "v2020p3",
          "name": "peter",
          "id": 5
       },
       "tenantDbAdminInfo": "lre_393_tenant_admin_db",
       "tenantDbNameForPostgreSQL": "lre_peter_tenant_db"
    }

Back to top

See also:

- Manage tenants

https://admhelp.microfocus.com Enterprise Performance Engineering,LoadRunner Enterprise 8942
Tips to improve your search results...OpenText™ Enterprise Performance Engineering Help Center OpenText™ Enterprise Performance Engineering Help 26.1 All View Local Help Center View Online Help Center Version: