Configuring Cloud Foundry for BOSH Backup and Restore

This topic describes the configuration you need for your Cloud Foundry (CF) deployment to work with BOSH Backup and Restore (BBR).

This topic assumes that you are using cf-deployment with ops files for your Cloud Foundry deployment.

If you do not use ops files for customization, you can still customize your Cloud Foundry to use BBR. Examine the contents of the ops files on this page, and use them as a guide to customize your deployment manifest directly.

WARNING:
  • Backup artifacts can contain secrets. Secure backup artifacts with encryption or by other means.
  • The restore is a destructive operation. BBR is designed to restore CF after a disaster. If it fails, the environment can be left in an unusable state and require re-provisioning. For the generic method of restoring a deployment, see Restoring with BOSH Backup and Restore.
  • Developers are unable to push apps for a few minutes during backup and restore. This is because the Cloud Controller API (CC API) stops sending and receiving calls between the pre-backup-lock and post-backup-unlock stages of the process.
  • BBR does not back up any service data. Back up Service data, such as Redis or RabbitMQ data, separately.

Supported CF Configurations

To enable backup and restore for your cf-deployment, deploy it with the enable-backup-restore.yml ops file. This enables BBR backup and restore for default CF components.

To enable BBR backup and restore for different configurations you must also use the appropriate backup and restore ops files as shown in this table:

Configuration Configuration Ops File Backup and Restore Ops File
A versioned S3-compatible external blobstore. For instructions, see Backup and Restore with External Blobstores. use-s3-blobstore.yml enable-backup-restore-s3-versioned.yml
An un-versioned S3-compatible external blobstore. For instructions, see Backup and Restore with External Blobstores. use-s3-blobstore.yml enable-backup-restore-s3-unversioned.yml
An Azure blobstore with soft delete enabled. For instructions, see Backup and Restore with External Blobstores. use-azure-blobstore.yml enable-backup-restore-azure.yml
A supported external database use-external-dbs.yml No BBR ops file required
An NFS broker and volume driver for volume support enable-nfs-volume-service.yml enable-backup-restore-nfs-broker.yml
Use CredHub for service credentials (Experimental)
secure-service-credentials.yml enable-backup-restore-credhub.yml

BBR can communicate with external blobstores and databases over TLS if they are configured accordingly.

Supported External Databases

Cloud Foundry components use the backup and restore SDK to interface with databases for backup and restore. The backup and restore SDK supports the following database versions:

Name Version
MariaDB 10.1.x
MySQL 5.5.x
MySQL 5.6.x
MySQL 5.7.x
Postgres 9.4.x
Postgres 9.6.x

Apply Ops Files in the Correct Order

Select the ops files you need and apply them in the following order:

Note: This is the relative order. You do not have to apply all ops files listed below and you can apply other ops files in between.
For example, you can apply an ops file between use-external-dbs.yml and enable-backup-restore.yml, but do not apply enable-backup-restore.yml before use-external-dbs.yml.

  1. use-s3-blobstore.yml

  2. use-external-dbs.yml

  3. enable-nfs-volume-service.yml

  4. secure-service-credentials.yml

  5. enable-backup-restore.yml

  6. enable-backup-restore-s3-versioned.yml or enable-backup-restore-s3-unversioned.yml

  7. enable-backup-restore-nfs-broker.yml

  8. enable-backup-restore-credhub.yml

Next Steps

After you have configured Cloud Foundry to be compatible with BBR, you can back up and restore Cloud Foundry.

Follow the procedures in the Back up a BOSH Deployment section of Backing up with BOSH Backup and Restore and the Restore a BOSH Deployment section of Restoring with BOSH Backup and Restore.

At minimum, run the pre-backup check against your Cloud Foundry deployment by following the first two steps of the Back up a BOSH Deployment section of Backing up with BOSH Backup. This lists the scripts that run during a backup and the order in which they are applied.

Create a pull request or raise an issue on the source for this page in GitHub