We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfbe35f commit 5112097Copy full SHA for 5112097
1 file changed
027-cluster-data_protection-export.sh
@@ -18,6 +18,13 @@ mkdir -p ${DPDIR}
18
# Save backup location for both org and clsuter
19
echo "Saving backup-location ......"
20
tanzu tmc data-protection backup-location list -o yaml -s org > ${DPDIR}/backup_location_org.yaml
21
+i=0
22
+while read -r name; do
23
+ ca_certs=$(tanzu tmc data-protection backup-location get ${name} -o yaml | yq -r '.spec.caCert')
24
+ yq -i ".backupLocations[$i].spec.caCert=\"${ca_certs}\"" ${DPDIR}/backup_location_org.yaml
25
+ i=$((i+1))
26
+done < <(yq -r '.backupLocations[] | .fullName.name' ${DPDIR}/backup_location_org.yaml)
27
+
28
tanzu tmc data-protection backup-location list -o yaml -s cluster > ${DPDIR}/backup_location_cluster.yaml
29
30
# Save schedule
0 commit comments