Skip to content

Commit 487f41d

Browse files
ChunyiLyuMirahImage
authored andcommitted
Add opsfiles to enable backup/restore of azure blobstore
[#154209539] Signed-off-by: Mirah Gary <[email protected]>
1 parent 123b84f commit 487f41d

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

Diff for: operations/backup-and-restore/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ To learn more about `cf-deployment`, go to the main [README](../README.md).
1818
| [`enable-backup-restore-credhub.yml`](enable-backup-restore-credhub.yml) | Collocate database-backup-restorer job on the credhub instance. Should be applied after `secure-service-credentials.yml` Ops-file. | |
1919
| [`enable-backup-restore-credhub-postgres.yml`](enable-backup-restore-credhub-postgres.yml) | Collocate database-backup-restorer job on the credhub instance. Should be applied after `secure-service-credentials-postgres.yml` Ops-file. | |
2020
| [`enable-backup-restore-credhub-external-db.yml`](enable-backup-restore-credhub-external-db.yml) | Collocate database-backup-restorer job on the credhub instance. Should be applied after `secure-service-credentials-external-db.yml` Ops-file. | |
21+
| [`enable-backup-restore-azure.yml`](enable-backup-restore-azure.yml) | Enables the backup and restore of Azure blobstores with soft delete enabled. | Requires `enable-backup-restore.yml` and `use-azure-storage-blobstore.yml` |
22+
| [`enable-restore-azure-clone.yml`](enable-restore-azure-clone.yml) | Deploy with this Ops-files when restoring to a different Azure storage account. | Requires `enable-backup-restore.yml` and `use-azure-storage-blobstore.yml` |
2123
| [`enable-backup-restore-s3-versioned.yml`](enable-backup-restore-s3-versioned.yml) | Enables the backup and restore of versioned S3 blobstores. | Requires `enable-backup-restore.yml` and `use-s3-blobstore.yml` |
2224
| [`enable-backup-restore-s3-unversioned.yml`](enable-backup-restore-s3-unversioned.yml) | Enables the backup and restore of unversioned S3 blobstores. | Requires `enable-backup-restore.yml` and `use-s3-blobstore.yml`. Introduces [new variables](example-vars-files/vars-enable-backup-restore-s3-unversioned.yml) |
2325
| [`enable-backup-restore-nfs-broker.yml`](enable-backup-restore-nfs-broker.yml) | Deploy BOSH backup and restore scripts for the NFS service broker. | Requires `enable-backup-restore.yml` and `operations/enable-nfs-volume-service.yml`. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
- type: replace
3+
path: /instance_groups/name=backup-restore/jobs/-
4+
value:
5+
name: azure-blobstore-backup-restorer
6+
release: backup-and-restore-sdk
7+
properties:
8+
enabled: true
9+
containers:
10+
droplets:
11+
name: "((droplet_directory_key))"
12+
azure_storage_account: "((blobstore_storage_account_name))"
13+
azure_storage_key: "((blobstore_storage_access_key))"
14+
packages:
15+
name: "((app_package_directory_key))"
16+
azure_storage_account: "((blobstore_storage_account_name))"
17+
azure_storage_key: "((blobstore_storage_access_key))"
18+
buildpacks:
19+
name: "((buildpack_directory_key))"
20+
azure_storage_account: "((blobstore_storage_account_name))"
21+
azure_storage_key: "((blobstore_storage_access_key))"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
- type: replace
3+
path: /instance_groups/name=backup-restore/jobs/-
4+
value:
5+
name: azure-blobstore-backup-restorer
6+
release: backup-and-restore-sdk
7+
properties:
8+
enabled: true
9+
containers:
10+
droplets:
11+
name: "((droplet_directory_key))"
12+
azure_storage_account: "((blobstore_storage_account_name))"
13+
azure_storage_key: "((blobstore_storage_access_key))"
14+
restore_from:
15+
azure_storage_account: "((restore_from_blobstore_storage_account_name))"
16+
azure_storage_key: "((restore_from_blobstore_storage_access_key))"
17+
packages:
18+
name: "((app_package_directory_key))"
19+
azure_storage_account: "((blobstore_storage_account_name))"
20+
azure_storage_key: "((blobstore_storage_access_key))"
21+
restore_from:
22+
azure_storage_account: "((restore_from_blobstore_storage_account_name))"
23+
azure_storage_key: "((restore_from_blobstore_storage_access_key))"
24+
buildpacks:
25+
name: "((buildpack_directory_key))"
26+
azure_storage_account: "((blobstore_storage_account_name))"
27+
azure_storage_key: "((blobstore_storage_access_key))"
28+
restore_from:
29+
azure_storage_account: "((restore_from_blobstore_storage_account_name))"
30+
azure_storage_key: "((restore_from_blobstore_storage_access_key))"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
restore_from_blobstore_storage_account_name: name # account name for azure storage account to restore from
2+
restore_from_blobstore_storage_access_key: key # access key for azure storage account to restore from

Diff for: scripts/test-backup-and-restore-ops.sh

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ test_backup_and_restore_ops() {
1212
check_interpolation "name: enable-backup-restore-credhub-external-db.yml" "enable-backup-restore.yml" "-o ${home}/operations/experimental/enable-instance-identity-credentials.yml" "-o ${home}/operations/experimental/secure-service-credentials.yml" "-o ${home}/operations/experimental/secure-service-credentials-external-db.yml" "-o enable-backup-restore-credhub-external-db.yml"
1313
check_interpolation "name: enable-backup-restore-s3-versioned.yml" "enable-backup-restore.yml" "-o ${home}/operations/use-s3-blobstore.yml" "-o enable-backup-restore-s3-versioned.yml" "-l ${home}/operations/example-vars-files/vars-use-s3-blobstore.yml"
1414
check_interpolation "name: enable-backup-restore-s3-unversioned.yml" "enable-backup-restore.yml" "-o ${home}/operations/use-s3-blobstore.yml" "-o enable-backup-restore-s3-unversioned.yml" "-l ${home}/operations/example-vars-files/vars-use-s3-blobstore.yml" "-l example-vars-files/vars-enable-backup-restore-s3-unversioned.yml"
15+
check_interpolation "name: enable-backup-restore-azure.yml" "enable-backup-restore.yml" "-o ${home}/operations/use-azure-storage-blobstore.yml" "-o enable-backup-restore-azure.yml" "-l ${home}/operations/example-vars-files/vars-use-azure-storage-blobstore.yml"
16+
check_interpolation "name: enable-restore-azure-clone.yml" "enable-backup-restore.yml" "-o ${home}/operations/use-azure-storage-blobstore.yml" "-o enable-restore-azure-clone.yml" "-l ${home}/operations/example-vars-files/vars-use-azure-storage-blobstore.yml" "-l example-vars-files/vars-enable-restore-azure-clone.yml"
1517
check_interpolation "name: enable-backup-restore-nfs-broker.yml" "enable-backup-restore.yml -o enable-backup-restore-nfs-broker.yml -v nfs-broker-database-password=i_am_a_password"
1618
popd > /dev/null
1719
popd > /dev/null

0 commit comments

Comments
 (0)