Delete a dynamic S3 backup target on RHOSO
Please follow the below steps to remove a dynamic S3 backup target on RHOSO18.
1. Clean Workloads and Backups (Optional)
All data related to workloads and the cloud resides on the backup target. The administrator can clean this data from the backup target before deletion, but this step is optional and should not prevent the user from deleting the backup target.
Before cleaning up workloads or snapshots, log in to the correct OpenStack project, as each backup target and its workloads belong to that specific project. Select the right project you need before proceeding.
Delete all backups stored on the required dynamically added S3 backup target using the UI (Horizon) or Trilio CLI.
Delete Snapshots
Refer to this documentation for detailed steps.
Delete a Workload
Refer to this documentation for detailed steps.
Note: Repeat this procedure for each backup and workload that needs to be deleted from the S3 backup target created earlier.
2] Remove Target from WLM Records
To delete a backup target in TrilioVault, follow these steps carefully. Deleting a backup target removes it from the TrilioVault database. Make sure you don’t need this backup target anymore before you delete it.
Delete a Backup Target
Using Horizon Dashboard
Log in to the OpenStack Horizon Dashboard as an Admin user.
Navigate to Admin → Backups-Admin → Backup Targets.
On the page, you can see the list of Backup Targets.
Click the
button, and confirm the deletion once prompted.Deletion of multiple BTTs can be done by selecting the checkboxes of the desired BTTs and then clicking the
button at the top-right corner.
Using CLI
Steps to follow on Trilio CLI:
Identify the TrilioVault WLM API pod first, find the WLM API pod running in the
trilio-openstacknamespace.Access the WLM API pod and log in to the identified pod:
This gives you a shell inside the WLM API pod to run TrilioVault CLI commands.
Set up the environment variables and source the admin RC file to load the necessary OpenStack credentials and environment variables.
Without this, the CLI commands may fail due to missing authentication details.
List all the backup targets. Run the following command to view all the existing backup targets along with their Backup Target ID and Backend Endpoint:
Note: If you do not find the required backup target Backend Endpoint and Backup Target ID in the list, you can skip the delete backup target step and continue from Step 3. This situation can occur if a new backup target was created but has not yet been added to the database records.
Delete the Backup Target. Use the Backup Target ID in the following delete command:
Replace
<backup_target_id>with the Backup Target ID you extracted in the previous command.Verify deletion. After deletion, confirm that the backup target is removed by listing all backup targets:
The deleted target should no longer appear in the list.
3] Unmount Backup Target from Data Plane
3.1] Delete Old Deployment Resource
List
OpenStackDataPlaneDeploymentresources and following command only list deployment names matching with the backup target nameDelete the deployment resource:
3.2] Delete Old Service Resource
List
OpenStackDataPlaneServiceresources and Identify service name which was responsible to add this backup targetDelete the selected
OpenStackDataPlaneService:
3.3] Prepare openshift yamls to delete backup target
Run the following script to prepare the YAMLs:
The above script will create a directory with
<BACKUP_TARGET_NAME>in the current working directory. It creates two YAML files in this new directory. We will use those files in the next steps.
3.4] Create Custom Service Resource
Edit
trilio-delete-backup-target-service.yaml. Set parameter value foropenStackAnsibleEERunnerImage:Save changes.
Verify ConfigMap and Secret resources referenced in the above service YAML file exist in the
openstacknamespace:Apply this YAML to create
OpenStackDataPlaneService:Verify the changes:
3.5] Trigger Deployment to clean backup target
Edit the following file and add all compute node set names where this backup target was added, in list format under the
nodeSetssection.Save changes.
Apply this YAML to create
OpenStackDataPlaneDeployment. This step will launch a new pod in theopenstacknamespace and will execute Ansible scripts. These Ansible scripts delete the container launched to mount this backup target and will clean related configuration files as well.List deployments:
Check logs of the Ansible runner pod:
Copy the pod name related to this deployment and check its logs.
If Ansible execution fails, debug it and fix the issue. You can re-run the Ansible scripts by recreating a new
OpenStackDataPlaneDeploymentresource using thetrilio-delete-backup-target-deployment.yamlfile. Make sure you set a unique deployment name inside this YAML, and also clean any older deployment with the same name.
4] Unmount Backup Target from Control Plane
4.1] Identify tvobackuptarget name that you want to remove
Run the following command from the bastion node. This will list the Trilio backup targets that were added dynamically. From the command output, select the backup target name that you want to delete.
Sample command output:
4.2] Delete tvobackuptarget
Run the following command to delete the selected backup target:
Sample command output:
4.3] Verify that backup target got deleted
Run the following command to check whether the given backup target still appears in the list:
Sample command output:
Also, verify that the object store pods have been cleaned. You should not see pods with names matching your backup target.
Last updated
Was this helpful?
