Backing Up and Restoring Spring Cloud Gateway for VMware Tanzu

Page last updated:

Spring Cloud Gateway for VMware Tanzu is compatible with the BOSH Backup and Restore (BBR) framework. You can use BBR to back up your installation of Spring Cloud Gateway for VMware Tanzu and to restore it from a backup. See below for information about backing up and restoring Spring Cloud Gateway for VMware Tanzu using BBR.

Note: This feature was added in Spring Cloud Gateway for VMware Tanzu v1.0.3.

Data Included in a Backup

The backup file contains all of the state of the Spring Cloud Gateway for VMware Tanzu BOSH VM. This includes the following data:

  • The scg-service-broker database used by the Spring Cloud Gateway service broker to store service instance information.

Backing apps and network policies for Spring Cloud Gateway for VMware Tanzu service instances are included in a backup of the platform. For more information, see Backing Up and Restoring Pivotal Cloud Foundry.

Requirements

You will need:

  • The BOSH command line credentials ([client_id] and [client_secret] below). These are available from the Credentials tab of the BOSH Director tile in the Ops Manager Installation Dashboard, in the Bosh Commandline Credentials row. Bosh cli credentials
  • The BOSH Director’s IP address ([bosh_director_ip] below). This is available from the Status tab of the BOSH Director tile in the Installation Dashboard, in the IPs column of the BOSH Director row. Bosh director ip
  • The BOSH Director’s CA certificate ([bosh_ca_cert] below). This is available on the Ops Manager VM at /var/tempest/workspaces/default/root_ca_certificate, or via the Ops Manager API (see the Ops Manager documentation about how to Retrieve the Ops Manager Root CA).
  • (If restoring) A BBR backup artifact from which to restore your Spring Cloud Gateway for VMware Tanzu installation (the path to this artifact is [path_to_artifact] below).
  • The name of the Spring Cloud Gateway for VMware Tanzu BOSH deployment. This can be found by running the bosh deployments command shown below and looking for the deployment named p_spring-cloud-gateway-service-[UNIQUE_HASH]:
    $ BOSH_CLIENT=[client_id] \
    BOSH_CLIENT_SECRET=[client_secret] \
    bosh --environment [bosh_director_ip] \
    --ca-cert [bosh_ca_cert] \
    deployments
    

Backing Up Spring Cloud Gateway for VMware Tanzu

To back up your Spring Cloud Gateway for VMware Tanzu installation, run the bbr deployment backup command as shown below:

$ BOSH_CLIENT=[client_id] \
BOSH_CLIENT_SECRET=[client_secret] \
bbr deployment \
  --target [bosh_director_ip] \
  --deployment [p_spring_cloud_gateway_deployment_name] \
  --ca-cert [bosh_ca_cert] \
  backup

Restoring Spring Cloud Gateway for VMware Tanzu from a Backup

To restore your Spring Cloud Gateway for VMware Tanzu installation from an existing backup, run the bbr deployment restore command as shown below:

$ BOSH_CLIENT=[client_id] \
BOSH_CLIENT_SECRET=[client_secret] \
bbr deployment \
  --target [bosh_director_ip]> \
  --deployment [p_spring_cloud_gateway_deployment_name] \
  --ca-cert [bosh_ca_cert] \
  restore \
  --artifact-path [path_to_artifact]