Add new backup target on RHOSO18.0

Please follow the below steps to add new backup target on RHOSO18.

1] Mount Backup target on Trilio Control Plane

Navigate to trilio ctlplane-scripts directory

cd /PATH/TO/triliovault-cfg-scripts/redhat-director-scripts/rhosp18/ctlplane-scripts

Plan which type of backup target you want to add. T4O supports two types of backup targets.

  1. nfs

  2. s3

If you want to add backup target of type 'nfs' then edit the following yaml file and create TVOBackupTarget resource.

vi tvo-backup-target-cr-nfs.yaml
oc apply -f tvo-backup-target-cr-nfs.yaml

If you want to add backup target of type 's3' then edit the following yaml file. If your S3 is amazon s3 then edit following file and create TVOBackupTarget resource

vi tvo-backup-target-cr-amazon-s3.yaml
oc apply -f tvo-backup-target-cr-amazon-s3.yaml

If your S3 is of any other type edit following file and create TVOBackupTarget resource

vi tvo-backup-target-cr-other-s3.yaml
oc apply -f tvo-backup-target-cr-other-s3.yaml

Check deployment progress

oc get pods -n trilio-openstack
oc get daemonsets -n trilio-openstack

2] Mount Backup target on Trilio Data Plane

Navigate to data plane scripts directory

cd /PATH/TO/triliovault-cfg-scripts/redhat-director-scripts/rhosp18/dataplane-scripts/

Create templates needed for adding backup targets. Please note that use unique backup target name for parameter <BACKUP_TARGET_NAME>. You should not have used this backup target name earlier for any other trilio backup target. For parameter <BACKUP_TARGET_TYPE>, valid choices are ‘s3' and 'nfs’

./create-templates.sh <BACKUP_TARGET_NAME> <BACKUP_TARGET_TYPE>
./create-templates.sh s3-bt8 s3

A new directory gets created with backup target name having necessary templates. You can list these templates.

cd <BACKUP_TARGET_NAME>/
ls -ll

Backup target name gets set in all the yaml files created in this directory. BACKUP_TARGET_NAME gets converted to all small case and if any underscore ‘_' character is there in it, it gets replaced by hyphen character '-'. Add backup target details to template

Change to <BACKUP_TARGET_NAME> if not done already

cd <BACKUP_TARGET_NAME>/

Edit config map file

vi cm-trilio-backup-target.yaml

Create config map

oc -n openstack apply -f cm-trilio-backup-target.yaml

Set Trilio Ansible Runner container image url and tag in parameter 'openStackAnsibleEERunnerImage:' of trilio-add-backup-target-service.yaml You don’t need to change any other parameter.

vi trilio-add-backup-target-service.yaml

Create custom data plane service for this backup target

oc -n openstack apply -f trilio-add-backup-target-service.yaml
sleep 5s

Edit trilio-add-backup-target-deployment.yaml file and set parameter ‘nodeSets' with correct value from your environment. You don’t need to change any other parameter.

Get OpenStackDataPlaneNodeSet name

oc -n openstack get OpenStackDataPlaneNodeSet 

Set 'nodeSets' parameter

vi trilio-add-backup-target-deployment.yaml

Trigger deployment of this backup target

oc -n openstack apply -f trilio-add-backup-target-deployment.yaml

Check logs Edit <DEPLOYMENT_NAME>, take it from above deployment yaml.

# Get deployment pod name
oc -n openstack get pods -l openstackdataplanedeployment=<DEPLOYMENT_NAME>
# Example:
oc -n openstack get pods -l openstackdataplanedeployment=edpm-trilio-add-backup-target-s3-bt8   
## Check logs
oc logs <POD_NAME>
# Example:
oc logs trilio-add-backup-target-s3-bt8-edpm-trilio-add-backup-tarkx5xx

If this pod does not get created, it means you have not used unique backup target name or some other issue happend. Please verify that

oc get openstackdataplanedeployment | grep trilio

3] Add Backup Target Records

Login to triliovault-wlm-api pod and run below CLI command to create backup target in Trilio DB.

oc get pods -n trilio-openstack | grep wlm-api
oc exec -n trilio-openstack -it <trilio wlm api pod name> bash
source <admin rc file>

For NFS Backup Target:

workloadmgr backup-target-create --type nfs --filesystem-export <filesystem_export> --btt-name <btt name>

Sample command:

workloadmgr backup-target-create --type nfs --filesystem-export 192.168.0.53:/home/rhosp2 --btt-name bt3-nfs

For Object lock enabled S3 Backup Target:

workloadmgr backup-target-create --type s3 --s3-endpoint-url <s3_endpoint_url> --s3-bucket <s3_bucket> --btt-name <btt name> --immutable --metadata object_lock=1 bucket=s3-object-lock

Sample command:

workloadmgr backup-target-create --type s3 --s3-endpoint-url https://s3.wasabisys.com --s3-bucket object-locked-s3-2 --btt-name bt5-s3 --immutable --metadata object_lock=1 bucket=s3-object-lock 

For non-object lock S3 Backup Target:

workloadmgr backup-target-create --type s3 --s3-endpoint-url <s3_endpoint_url> --s3-bucket <s3_bucket> --btt-name <btt name>

Sample command:

workloadmgr backup-target-create --type s3 --s3-endpoint-url https://s3.wasabisys.com --s3-bucket qa-sachin --btt-name s3-bt5

Last updated

Was this helpful?