Migrating user data on Ubuntu from 10.1.3 or later

When you want to use the data, which was in your earlier version, in a new version of HCL OneTest Server, you can migrate those user data..

Before you begin

You must have upgraded HCL OneTest Server to a new version.

About this task

The following table lists the variables that you must replace with the actual value in the command.

Variables Description
{my-ots}

The name of the release that you provided during the installation of the server software.

{backup-release}

The Helm release name of the server where you store the backup data.

{target-release}

The Helm release name of the server where you want to restore the data.

The test-system is the name of the namespace that is created during the setting up of the k3s environment.

Procedure

  1. Run the following script from the hcl-onetest-base directory to create a directory that contains metadata related to the Persistent Volume Claims and their Persistent Volumes:
    sudo backup.sh create-pvc-links
  2. Stop the Kubernetes cluster by running the k3s-killall.sh command.
  3. Restore the backed-up user data by running the following commands:
    sudo ./backup.sh restore [options] {backup-file-name}

    You can use the following parameters along with the restore command:

    • --namespace or -n: Use this parameter to restore a specific namespace from the backup file. If you do not mention the namespace, then volumes from all the namespaces in the backup file are restored. You can map one namespace to another namespace by using a colon (:). The syntax is:
      --namespace <name of the namespace> [:<target-namespace>]
    • --release or -r: Use this parameter if the Helm release name of the server to which the backup is being restored is different than the Helm release name of the server where the backup was taken. The syntax is:
      --release <backup-release>:<target-release>
    • --volumes or -v: Use this parameter to specify the directory path of the volumes. The syntax is:
      --volumes <path-of-the-directory>
    • -k or --confirm: Use this parameter to skip the confirmation step.

  4. Restart the Kubernetes cluster by running the systemctl start k3s command to start HCL OneTest Server.
  5. Run the following script from the hcl-onetest-server/files directory to create all the missing databases:
    migrate.sh create-missing-dbs {my-ots}
    Note: You can expect the output of the command to contain several errors on objects that already exist. They do not indicate a problem with the execution of the script.
  6. Run the following script from the hcl-onetest-server/files directory to verify and test the installed server software:
    hcl-onetest-server/files/helm-test-diag.sh {my-ots} -n test-system

Results

You have migrated the user data from the earlier version to the new version.

What to do next

You can perform the following tasks: