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 Test Hub, you can migrate those user data..
Before you begin
About this task
The following table lists the variables that you must replace with the actual value in the command.
Variables | Description |
---|---|
{main} |
The name of the release that you provided during the installation of Test Hub. |
{backup-release} |
The Helm release name of Test Hub where you store the backup data. |
{target-release} |
The Helm release name of Test Hub where you want to restore the data. |
The devops-system is the name of the namespace that is created during the setting up of the k3s environment.
Procedure
-
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
- Stop the Kubernetes cluster by running the k3s-killall.sh command.
-
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.
-
- Restart the Kubernetes cluster by running the systemctl start k3s command to start Test Hub.
-
Run the following script from the hcl-onetest-server/files directory to create all the missing
databases:
migrate.sh create-missing-dbs {{main}}
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. -
Run the following script from the hcl-devops/files directory to verify and test the installed
instance:
hcl-devops/files/helm-test-diag.sh {main} -n devops-system
Results
What to do next
-
Configure licenses for team spaces. See Configuring licenses for team spaces.
-
Configure Test Hub. See Configuration of DevOps Test Hub.