You can backup and restore across clusters using AWS S3 or vSAN.
To perform backup and restore across clusters, set
acrossClusters to true on the source cluster, which can make the backup visible to other clusters.
apiVersion: tcx.vmware.com/v1alpha1 kind: Backup metadata: name: group-backup spec: acrossClusters: enabled: true # <----- HERE components: postgres: enabled: true timeout: 10m dbs: - "analyticsservice" - "alarmservice" - "collector" - "grafana" - "keycloak" collectors: enabled: true timeout: 10m configmaps: enabled: true timeout: 10m nameList: - name: "product-info" namespace: "default" elastic: enabled: true timeout: 30m indices: "ELASTICSEARCH_EVENTS,ELASTICSEARCH_CONFIG,ELASTICSEARCH_KAFKA_MAPPER" secrets: enabled: true timeout: 10m nameList: - name: "collector.tcops-postgres.credentials" namespace: "default" zookeeper: enabled: true timeout: 10m rootPaths: - "/vmware/vsa/gateway" - "/vmware/vsa/smarts" - "/omega/enrichment" - "/omega/kpi" retentionPolicy: numberOfDaysToKeep: 45
After the backup is successful, configure MinIO on the target cluster and use the same settings as the source cluster and perform a sync operation.
apiVersion: tcx.vmware.com/v1alpha1 kind: SyncBackup metadata: name: sync-backup
Run the following command to sync the backup in the target cluster. After the sync operation is complete, you can see the status as
SUCCESSFUL. The backups available in the AWS S3 or vSAN will be visible in the new cluster.
~> kubectl get syncbackup.tcx.vmware.com/sync-backup NAME STATUS MESSAGE sync-backup SUCCESSFUL # <---- HERE
In case of any failure, the MESSAGE field is populated with the error message.
Note: When you take backup, update the existing respository in
VMware Telco Cloud Service Assurance 2.0.1 by executing the following command.
kubectl exec -it elasticsearch-master-0 -- curl -X PUT elasticsearch:9200/_snapshot/elasticsearch?pretty -H 'Content-Type: application/json' -d' { "type": "s3", "settings": { "bucket": "<s3_bucket_name>", "region": "<aws_region>", "base_path":"backups/elasticsearch" } }'